From 13e70fdd51c58ce5dfdfd3cc90ed24d96476d6f7 Mon Sep 17 00:00:00 2001 From: nathaniel smith Date: Sun, 18 Dec 2016 21:15:06 -0800 Subject: [PATCH] start on help app --- ttadmin/help/__init__.py | 0 ttadmin/help/forms.py | 5 +++++ ttadmin/help/models.py | 4 ++++ ttadmin/help/templates/help/tickets.html | 1 + ttadmin/help/urls.py | 8 ++++++++ ttadmin/help/views.py | 12 ++++++++++++ ttadmin/settings.py | 3 ++- ttadmin/urls.py | 1 + 8 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 ttadmin/help/__init__.py create mode 100644 ttadmin/help/forms.py create mode 100644 ttadmin/help/models.py create mode 100644 ttadmin/help/templates/help/tickets.html create mode 100644 ttadmin/help/urls.py create mode 100644 ttadmin/help/views.py diff --git a/ttadmin/help/__init__.py b/ttadmin/help/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/ttadmin/help/forms.py b/ttadmin/help/forms.py new file mode 100644 index 0000000..aac9da8 --- /dev/null +++ b/ttadmin/help/forms.py @@ -0,0 +1,5 @@ +from django.forms import Form + + +class TicketForm(Form): + pass diff --git a/ttadmin/help/models.py b/ttadmin/help/models.py new file mode 100644 index 0000000..1564ad2 --- /dev/null +++ b/ttadmin/help/models.py @@ -0,0 +1,4 @@ +from django.db.models import Model + +class Ticket(Model): + pass diff --git a/ttadmin/help/templates/help/tickets.html b/ttadmin/help/templates/help/tickets.html new file mode 100644 index 0000000..1bc0e28 --- /dev/null +++ b/ttadmin/help/templates/help/tickets.html @@ -0,0 +1 @@ +lololol diff --git a/ttadmin/help/urls.py b/ttadmin/help/urls.py new file mode 100644 index 0000000..b3a375e --- /dev/null +++ b/ttadmin/help/urls.py @@ -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'), +] diff --git a/ttadmin/help/views.py b/ttadmin/help/views.py new file mode 100644 index 0000000..cba1270 --- /dev/null +++ b/ttadmin/help/views.py @@ -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 diff --git a/ttadmin/settings.py b/ttadmin/settings.py index db54752..8ab6658 100644 --- a/ttadmin/settings.py +++ b/ttadmin/settings.py @@ -24,7 +24,8 @@ INSTALLED_APPS = [ 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', - 'users' + 'users', + 'help', ] MIDDLEWARE = [ diff --git a/ttadmin/urls.py b/ttadmin/urls.py index e05c4d7..f1c10ee 100644 --- a/ttadmin/urls.py +++ b/ttadmin/urls.py @@ -2,6 +2,7 @@ from django.conf.urls import url, include from django.contrib import admin urlpatterns = [ + url(r'^help/', include('help.urls')), url(r'^users/', include('users.urls')), url(r'^admin/', admin.site.urls), ]