add first view to digital.glarus

Signed-off-by: Nico Schottelius <nico@freiheit.schottelius.org>
This commit is contained in:
Nico Schottelius 2015-05-02 17:15:20 +02:00
parent 6bb80d117c
commit 5d1b26d4f7
4 changed files with 36 additions and 1 deletions

View file

@ -0,0 +1,24 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
]
operations = [
migrations.CreateModel(
name='Message',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, primary_key=True, auto_created=True)),
('name', models.CharField(max_length=200)),
('email', models.EmailField(max_length=254)),
('phone_number', models.CharField(max_length=200)),
('message', models.TextField()),
('received_date', models.DateTimeField(verbose_name='date received')),
],
),
]

7
digital_glarus/urls.py Normal file
View file

@ -0,0 +1,7 @@
from django.conf.urls import url
from . import views
urlpatterns = [
url(r'^$', views.index, name='index'),
]

View file

@ -1,3 +1,6 @@
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 polls index.")

View file

@ -7,4 +7,5 @@ urlpatterns = [
# url(r'^blog/', include('blog.urls')),
url(r'^admin/', include(admin.site.urls)),
url(r'^digital.glarus/', include('digital_glarus.urls')),
]