very basic view/form/template workflow added

This commit is contained in:
Benni Bärmann 2020-12-23 15:08:27 +01:00
parent 66a79e89ea
commit e9c6066ff0
4 changed files with 16 additions and 1 deletions

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("evapp.urls")),
path('admin/', admin.site.urls),
]

View File

@ -0,0 +1 @@
{{form}}

7
evapp/urls.py Normal file
View File

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

View File

@ -1,3 +1,9 @@
from django.shortcuts import render
from django.views.generic.edit import CreateView
from .models import Employee
# Create your views here.
class EvaFormView(CreateView):
model = Employee
fields = ['firstname']