Browse Source

added version number

master
Frederic 10 years ago
parent
commit
c53fcf10d8
  1. 5
      cash/static/style.css
  2. 8
      cash/templates/cash/base.html
  3. 3
      cash/version.py
  4. 4
      cash/views.py
  5. 6
      lugcash2/settings.py

5
cash/static/style.css

@ -17,3 +17,8 @@ img.product-thumbnail { @@ -17,3 +17,8 @@ img.product-thumbnail {
#account-info dd {
margin-bottom: 1em;
}
#version-number {
color: #c29100;
}

8
cash/templates/cash/base.html

@ -142,6 +142,14 @@ @@ -142,6 +142,14 @@
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<p class="text-center" id="version-number">
cashonly v{{version_number}}
</p>
</div>
</div>
</div>
</div>

3
cash/version.py

@ -0,0 +1,3 @@ @@ -0,0 +1,3 @@
CASHONLY_VERSION='2.1'

4
cash/views.py

@ -7,8 +7,12 @@ from django.core import paginator @@ -7,8 +7,12 @@ from django.core import paginator
from cash.models import *
from django.utils.translation import ugettext as _
from django.utils.translation import ugettext_lazy
import cash.version
import datetime
def version_number_context_processor(request):
return {'version_number': cash.version.CASHONLY_VERSION}
@login_required
def overview(request):
a = request.user.account

6
lugcash2/settings.py

@ -58,7 +58,7 @@ MEDIA_ROOT = '' @@ -58,7 +58,7 @@ MEDIA_ROOT = ''
# URL that handles the media served from MEDIA_ROOT. Make sure to use a
# trailing slash.
# Examples: "http://media.lawrence.com/media/", "http://example.com/media/"
MEDIA_URL = ''
MEDIA_URL = 'http://localhost:8000/static/media/'
# Absolute path to the directory static files should be collected to.
# Don't put anything in this directory yourself; store your static files
@ -175,7 +175,7 @@ LOGIN_URL = '/login/' @@ -175,7 +175,7 @@ LOGIN_URL = '/login/'
LOGIN_REDIRECT_URL = '/'
# Add custom context processors
#TEMPLATE_CONTEXT_PROCESSORS = global_settings.TEMPLATE_CONTEXT_PROCESSORS + ('cash.views.user_context_processor',)
TEMPLATE_CONTEXT_PROCESSORS = global_settings.TEMPLATE_CONTEXT_PROCESSORS + ('cash.views.version_number_context_processor',)
AUTHENTICATION_BACKENDS = (
'django_auth_ldap.backend.LDAPBackend',
@ -199,3 +199,5 @@ EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend' @@ -199,3 +199,5 @@ EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
EMAIL_SUBJECT_PREFIX = '[LUGSaar Kassensystem] '
DEFAULT_FROM_EMAIL = 'cypher@lug-saar.de'
THUMBNAIL_SIZE = (150, 150)

Loading…
Cancel
Save