Browse Source

first steps

master
Benni Baermann 4 years ago
parent
commit
8cebb0fcd3
7 changed files with 47 additions and 2 deletions
  1. +1
    -0
      foerderbarometer/settings.py
  2. +2
    -1
      foerderbarometer/urls.py
  3. +3
    -0
      input/admin.py
  4. +22
    -0
      input/migrations/0001_initial.py
  5. +7
    -1
      input/models.py
  6. +7
    -0
      input/urls.py
  7. +5
    -0
      input/views.py

+ 1
- 0
foerderbarometer/settings.py View File

@ -31,6 +31,7 @@ ALLOWED_HOSTS = []
# Application definition
INSTALLED_APPS = [
'input.apps.InputConfig',
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',

+ 2
- 1
foerderbarometer/urls.py View File

@ -14,8 +14,9 @@ Including another URLconf
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import path
from django.urls import path, include
urlpatterns = [
path('', include("input.urls")),
path('admin/', admin.site.urls),
]

+ 3
- 0
input/admin.py View File

@ -1,3 +1,6 @@
from django.contrib import admin
# Register your models here.
from .models import Project
admin.site.register(Project)

+ 22
- 0
input/migrations/0001_initial.py View File

@ -0,0 +1,22 @@
# Generated by Django 3.1.1 on 2020-09-22 09:13
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Project',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('project_name', models.CharField(max_length=200)),
('project_start', models.DateTimeField(verbose_name='start date')),
],
),
]

+ 7
- 1
input/models.py View File

@ -1,3 +1,9 @@
from django.db import models
# Create your models here.
class Project(models.Model):
project_name = models.CharField(max_length=200)
project_start = models.DateTimeField('start date')
def __str__(self):
return self.project_name

+ 7
- 0
input/urls.py View File

@ -0,0 +1,7 @@
from django.urls import path
from . import views
urlpatterns = [
path('', views.index, name='index'),
]

+ 5
- 0
input/views.py View File

@ -1,3 +1,8 @@
from django.shortcuts import render
# Create your views here.
from django.http import HttpResponse
def index(request):
return HttpResponse("Hello, world. You're at the input form")

Loading…
Cancel
Save