very basic view/form/template workflow added
This commit is contained in:
parent
66a79e89ea
commit
e9c6066ff0
|
@ -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),
|
||||
]
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
{{form}}
|
|
@ -0,0 +1,7 @@
|
|||
from django.urls import path
|
||||
|
||||
from .views import EvaFormView
|
||||
|
||||
urlpatterns = [
|
||||
path('', EvaFormView.as_view(), name='evaform'),
|
||||
]
|
|
@ -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']
|
||||
|
|
Loading…
Reference in New Issue