diff --git a/.idea/PyRIGS.iml b/.idea/PyRIGS.iml
index eb7f7ac7..2b9ccb41 100644
--- a/.idea/PyRIGS.iml
+++ b/.idea/PyRIGS.iml
@@ -11,7 +11,7 @@
-
+
diff --git a/.idea/dataSources.xml b/.idea/dataSources.xml
index d0308fd0..b2d4bb74 100644
--- a/.idea/dataSources.xml
+++ b/.idea/dataSources.xml
@@ -4,7 +4,7 @@
sqlite.xerial
org.sqlite.JDBC
- jdbc:sqlite:$PROJECT_DIR$/db.sqlite3
+ jdbc:sqlite:D:\Users\Ghost\PycharmProjects\pyrigs\db.sqlite3
.*
diff --git a/RIGS/templates/RIGS/index.html b/RIGS/templates/RIGS/index.html
new file mode 100644
index 00000000..6266854e
--- /dev/null
+++ b/RIGS/templates/RIGS/index.html
@@ -0,0 +1,43 @@
+{% extends 'base.html' %}
+{% block title %}RIGS{% endblock %}
+
+{% block content %}
+
+
Rig Information Gathering System
+
+
+
+ {% if request.user %}
+
Welcome back {{ request.user.get_full_name }}.
+ Your rigboard initials are {{ request.user.initials }}
+ {% endif %}
+
There are currently {{ rig_count }} rigs coming up.
+
View Rigboard
+
+
+
+{% endblock %}
\ No newline at end of file
diff --git a/RIGS/urls.py b/RIGS/urls.py
index 096b750a..f2a4c312 100644
--- a/RIGS/urls.py
+++ b/RIGS/urls.py
@@ -8,6 +8,7 @@ urlpatterns = patterns('',
# Examples:
# url(r'^$', 'PyRIGS.views.home', name='home'),
# url(r'^blog/', include('blog.urls')),
+ url('^$', views.Index.as_view(), name='index'),
url(r'^closemodal/$', views.CloseModal.as_view(), name='closemodal'),
url('^user/login/$', 'RIGS.views.login', name='login'),
diff --git a/RIGS/views.py b/RIGS/views.py
index 65d8ddbb..c90e39b4 100644
--- a/RIGS/views.py
+++ b/RIGS/views.py
@@ -5,13 +5,22 @@ from django.views import generic
from django.db.models import Q
from django.shortcuts import get_object_or_404
from django.core import serializers
+import simplejson
+from django.contrib import messages
from RIGS import models
-import simplejson
+"""
+Displays the current rig count along with a few other bits and pieces
+"""
+class Index(generic.TemplateView):
+ template_name = 'RIGS/index.html'
+ def get_context_data(self, **kwargs):
+ context = super(Index, self).get_context_data(**kwargs)
+ context['rig_count'] = models.Event.objects.rig_count()
+ return context
-# Create your views here.
def login(request, **kwargs):
if request.user.is_authenticated():
next = request.REQUEST.get('next', '/')
@@ -33,9 +42,7 @@ class CloseModal(generic.TemplateView):
template_name = 'closemodal.html'
def get_context_data(self, **kwargs):
- from django.contrib import messages
-
- return {'messages', messages.get_messages(self.request)}
+ return {'messages': messages.get_messages(self.request)}
class PersonList(generic.ListView):
diff --git a/db.sqlite3 b/db.sqlite3
index d1da847f..0cef2603 100644
Binary files a/db.sqlite3 and b/db.sqlite3 differ
diff --git a/templates/base.html b/templates/base.html
index 87a4bf18..dcd198f2 100644
--- a/templates/base.html
+++ b/templates/base.html
@@ -41,8 +41,6 @@
{% if perms.RIGS.view_invoice %}