Skip to content
Browse files

better base.html with twitter bootstrap 2, add git ignore, fix settin…

…gs_common
  • Loading branch information...
1 parent 50e10b0 commit b634f86a2aba81d4eaadebdf30f7d1500dc956e4 @nicpottier nicpottier committed Mar 31, 2012
View
14 nsms/skeleton/.gitignore
@@ -0,0 +1,14 @@
+*.*~
+*.db
+*.pyc
+#*#
+.DS_Store
+env
+\#*
+\.#*
+/dump.sql
+.coverage
+coverage
+coverage-report
+./bootstrap.css
+bootstrap/*.css
View
8 nsms/skeleton/pip-requires.txt
@@ -1,19 +1,19 @@
-nsms
-Django==1.3.1
+-e git+http://github.com/nyaruka/nsms#egg=nsms-dev
+Django==1.4
Markdown==2.0.3
RapidSMS==0.9.6a
South==0.7.3
celery==2.4.4
coverage==3.5.1
django-celery==2.4.2
django-compressor==1.1
-django-debug-toolbar==0.8.4
+django-debug-toolbar
django-digest==1.13
django-guardian==1.0.3
-e git+https://github.com/nyaruka/django-modeltranslation.git#egg=django_modeltranslation-dev
django-nose==0.1.3
django-quickblocks
-django-reversion==1.5.1
+django-reversion
django-rosetta==0.6.2
django-sentry==1.12.1
gunicorn==0.13.4
View
4 nsms/skeleton/project/settings_common.py
@@ -12,7 +12,7 @@
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
- 'NAME': 'foo.db', # Or path to database file if using sqlite3.
+ 'NAME': '!!PROJECT_NAME!!.db', # Or path to database file if using sqlite3.
'USER': '', # Not used with sqlite3.
'PASSWORD': '', # Not used with sqlite3.
'HOST': '', # Set to empty string for localhost. Not used with sqlite3.
@@ -124,7 +124,7 @@
'django.middleware.locale.LocaleMiddleware'
)
-ROOT_URLCONF = 'foo.urls'
+ROOT_URLCONF = '!!PROJECT_NAME!!.urls'
CACHES = {
'default': {
View
57 nsms/skeleton/templates/base.html
@@ -1,7 +1,7 @@
<!doctype html>
<head>
<meta charset="utf-8">
- <title>{% block title %}RapidSMS{% endblock %}</title>
+ <title>{% block title %}Nyaruka SMS{% endblock %}</title>
<meta name="description" content="">
<meta name="author" content="">
@@ -29,10 +29,19 @@
<body>
- <div class="topbar">
- <div class="fill">
+ <div class="navbar navbar-fixed-top">
+ <div class="navbar-inner">
<div class="container">
- <a class="brand" href="/">RapidSMS</a>
+ <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ </a>
+
+ <a class="brand" href="/">Nyaruka SMS</a>
+
+ <div class="nav-collapse">
+
<ul class="nav">
{% if perms.mileage.car_list %}
<li><a href="{% url mileage.car_list %}">Cars</a></li>
@@ -42,34 +51,33 @@
<li><a href="{% url mileage.mileagereport_list %}">Mileage Reports</a></li>
{% endif %}
- {% if perms.rapidsms_httprouter.message_list %}
- <li><a href="/console/message/">Console</a></li>
+ {% if perms.message.message_list %}
+ <li><a href="{% url console.message_list %}">Console</a></li>
{% endif %}
{% if perms.nsms.text_list %}
- <li class="dropdown" data-dropdown="dropdown">
- <a href="#" class="dropdown-toggle">Configuration</a>
+ <li class="dropdown">
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown">Configuration<b class="caret"></b></a>
<ul class="dropdown-menu">
- {% if perms.nsms.text_list %}
- <li><a href="{% url nsms.text_list %}">Translations</a></li>
- {% endif %}
{% if perms.auth.user_list %}
<li><a href="/users/user/">Users</a></li>
{% endif %}
</ul>
</li>
{% endif %}
</ul>
-
- {% block login %}
- <div class="nav secondary-nav">
+
+ <ul class="nav pull-right">
+ {% block login %}
{% if request.user and request.user.is_authenticated %}
- <a href="{% url users.user_logout %}?go=/">{{ request.user.username }} | logout</a>
+ <li class="pull-right"><a href="{% url users.user_logout %}?go=/">{{ request.user.username }} | logout</a></li>
{% else %}
- <a href="{% url users.user_login %}">Login</a>
+ <li class="pull-right"><a href="{% url users.user_login %}">Login</a></li>
{% endif %}
+ {% endblock %}
+ </ul>
+
</div>
- {% endblock %}
</div>
</div>
</div>
@@ -83,9 +91,9 @@
{% block messages %}
{% if messages %}
{% for message in messages %}
- <div class="alert-message {{ message.tags }} fade in" data-alert="alert">
- <a class="close" href="#">×</a>
- <p>{{ message }}</p>
+ <div class="alert alert-{{ message.tags }}">
+ <a class="close" data-dismiss="alert">×</a>
+ {{ message }}
</div>
{% endfor %}
{% endif %}
@@ -104,7 +112,7 @@
<footer>
{% block footer %}
- <a href="http://www.nyaruka.com/"><div class="pull-right" id="footer"><img src="{{ STATIC_URL }}img/nyaruka.png" /></div></a>
+ <a href="http://www.nyaruka.com/"><div class="pull-right" id="footer"></div></a>
{% endblock %}
</footer>
@@ -113,17 +121,16 @@
<!-- JavaScript at the bottom for fast page loading, conditional based on whether we are serving locally -->
<script>
if (window.location.hostname == "localhost"){
- document.write(unescape('%3Cscript src="{{ STATIC_URL }}js/libs/jquery-1.5.0.js"%3E%3C/script%3E'));
+ document.write(unescape('%3Cscript src="{{ STATIC_URL }}js/libs/jquery-1.7.2.js"%3E%3C/script%3E'));
} else {
- document.write(unescape('%3Cscript src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"%3E%3C/script%3E'));
+ document.write(unescape('%3Cscript src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"%3E%3C/script%3E'));
}
</script>
{# compress js #}
<script type="text/javascript" src="{{ STATIC_URL }}js/jquery.pjax.js"></script>
<script type="text/javascript" src="{{ STATIC_URL }}js/scripts.js"></script>
-<script type="text/javascript" src="{{ STATIC_URL }}js/bootstrap-alerts.js"></script>
-<script type="text/javascript" src="{{ STATIC_URL }}js/bootstrap-dropdown.js"></script>
+<script type="text/javascript" src="{{ STATIC_URL }}js/bootstrap.min.js"></script>
{# media associated with any form we are displaying #}
{% if form %}

0 comments on commit b634f86

Please sign in to comment.
Something went wrong with that request. Please try again.