start on help app

pull/1/head
nathaniel smith 2016-12-18 21:15:06 -08:00
parent 3dc5a7ba2b
commit 13e70fdd51
8 changed files with 33 additions and 1 deletions

View File

View File

@ -0,0 +1,5 @@
from django.forms import Form
class TicketForm(Form):
pass

View File

@ -0,0 +1,4 @@
from django.db.models import Model
class Ticket(Model):
pass

View File

@ -0,0 +1 @@
lololol

View File

@ -0,0 +1,8 @@
from django.conf.urls import url
from .views import TicketView
app_name = 'help'
urlpatterns = [
url(r'^tickets/?$', TicketView.as_view(), name='tickets'),
]

View File

@ -0,0 +1,12 @@
from django.views.generic.edit import FormView
from .forms import TicketForm
from .models import Ticket
class TicketView(FormView):
form_class = TicketForm
template_name = 'help/tickets.html'
def form_valid(self, form):
# TODO
pass

View File

@ -24,7 +24,8 @@ INSTALLED_APPS = [
'django.contrib.sessions', 'django.contrib.sessions',
'django.contrib.messages', 'django.contrib.messages',
'django.contrib.staticfiles', 'django.contrib.staticfiles',
'users' 'users',
'help',
] ]
MIDDLEWARE = [ MIDDLEWARE = [

View File

@ -2,6 +2,7 @@ from django.conf.urls import url, include
from django.contrib import admin from django.contrib import admin
urlpatterns = [ urlpatterns = [
url(r'^help/', include('help.urls')),
url(r'^users/', include('users.urls')), url(r'^users/', include('users.urls')),
url(r'^admin/', admin.site.urls), url(r'^admin/', admin.site.urls),
] ]