diff --git a/RIGS/models.py b/RIGS/models.py
index 385a1fd1..43da5c03 100644
--- a/RIGS/models.py
+++ b/RIGS/models.py
@@ -30,7 +30,7 @@ class Person(models.Model):
address = models.TextField(blank=True, null=True)
- comments = models.ManyToManyField('ModelComment')
+ comments = models.ManyToManyField('ModelComment', blank=True)
def __unicode__(self):
string = self.name
diff --git a/RIGS/templates/RIGS/person_form.html b/RIGS/templates/RIGS/person_form.html
new file mode 100644
index 00000000..6faeac05
--- /dev/null
+++ b/RIGS/templates/RIGS/person_form.html
@@ -0,0 +1,46 @@
+{% extends request.is_ajax|yesno:'base_ajax.html,base.html' %}
+{% load widget_tweaks %}
+
+{% block title %}Add Person{% endblock %}
+
+{% block content %}
+
+{% endblock %}
\ No newline at end of file
diff --git a/RIGS/templatetags/__init__.py b/RIGS/templatetags/__init__.py
new file mode 100644
index 00000000..e69de29b
diff --git a/RIGS/urls.py b/RIGS/urls.py
index 1c8884cf..db37348a 100644
--- a/RIGS/urls.py
+++ b/RIGS/urls.py
@@ -12,6 +12,7 @@ urlpatterns = patterns('',
url('^user/login/$', 'RIGS.views.login', name='login'),
# People
- url(r'^people/$', permission_required_with_403('RIGS.view_person')(views.PersonIndex.as_view()), name='person')
+ url(r'^people/$', permission_required_with_403('RIGS.view_person')(views.PersonIndex.as_view()), name='person_list'),
+ url(r'^people/add$', permission_required_with_403('RIGS.add_person')(views.PersonCreate.as_view()), name='person_add'),
)
diff --git a/RIGS/views.py b/RIGS/views.py
index f7c4ec73..5b49cc79 100644
--- a/RIGS/views.py
+++ b/RIGS/views.py
@@ -1,5 +1,5 @@
-from django.shortcuts import render
from django.http.response import HttpResponseRedirect
+from django.core.urlresolvers import reverse_lazy
from django.views import generic
import models
@@ -13,4 +13,8 @@ def login(request, **kwargs):
return login(request)
class PersonIndex(generic.ListView):
- model = models.Person
\ No newline at end of file
+ model = models.Person
+
+class PersonCreate(generic.CreateView):
+ model = models.Person
+ success_url = reverse_lazy('person_list')
\ No newline at end of file
diff --git a/db.sqlite3 b/db.sqlite3
index c77fd3b1..45294db2 100644
Binary files a/db.sqlite3 and b/db.sqlite3 differ