diff --git a/cash/static/style.css b/cash/static/style.css index f82bce9..f6ba592 100644 --- a/cash/static/style.css +++ b/cash/static/style.css @@ -17,3 +17,8 @@ img.product-thumbnail { #account-info dd { margin-bottom: 1em; } + +#version-number { + color: #c29100; +} + diff --git a/cash/templates/cash/base.html b/cash/templates/cash/base.html index e74822d..6ae9361 100644 --- a/cash/templates/cash/base.html +++ b/cash/templates/cash/base.html @@ -142,6 +142,14 @@ + +
+
+

+ cashonly v{{version_number}} +

+
+
diff --git a/cash/version.py b/cash/version.py new file mode 100644 index 0000000..725ae00 --- /dev/null +++ b/cash/version.py @@ -0,0 +1,3 @@ + +CASHONLY_VERSION='2.1' + diff --git a/cash/views.py b/cash/views.py index 7b5ca54..94d244b 100644 --- a/cash/views.py +++ b/cash/views.py @@ -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 diff --git a/lugcash2/settings.py b/lugcash2/settings.py index c983e3d..e0b1357 100644 --- a/lugcash2/settings.py +++ b/lugcash2/settings.py @@ -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/' 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' EMAIL_SUBJECT_PREFIX = '[LUGSaar Kassensystem] ' DEFAULT_FROM_EMAIL = 'cypher@lug-saar.de' +THUMBNAIL_SIZE = (150, 150) +