diff options
| author | Étienne Loks <etienne.loks@iggdrasil.net> | 2017-05-29 11:23:15 +0200 | 
|---|---|---|
| committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2017-05-29 11:23:15 +0200 | 
| commit | 9468e980d15a8df5d92dc84cf86b097ae6d0ba6c (patch) | |
| tree | 1c8d2b01e2d099663452ca1e21f6e5acab636192 /ishtar_common/views.py | |
| parent | e5dc6268a843e216ccf14469447d9b6f1ad43b49 (diff) | |
| download | Ishtar-9468e980d15a8df5d92dc84cf86b097ae6d0ba6c.tar.bz2 Ishtar-9468e980d15a8df5d92dc84cf86b097ae6d0ba6c.zip | |
Alert when PROJECT_SLUG or profile slug is set to "default"
Diffstat (limited to 'ishtar_common/views.py')
| -rw-r--r-- | ishtar_common/views.py | 10 | 
1 files changed, 9 insertions, 1 deletions
| diff --git a/ishtar_common/views.py b/ishtar_common/views.py index d1ba4478f..0be382866 100644 --- a/ishtar_common/views.py +++ b/ishtar_common/views.py @@ -90,8 +90,16 @@ def index(request):      """      Main page      """ -    dct = {} +    dct = {'warnings': []} +    if settings.PROJECT_SLUG == 'default': +        dct['warnings'].append(_( +            u"PROJECT_SLUG is set to \"default\" change it in your " +            u"local_settings (or ask your admin to do it)."))      profile = get_current_profile() +    if profile.slug == 'default': +        dct['warnings'].append(_( +            u"The slug of your current profile is set to \"default\" change it " +            u"on the administration page (or ask your admin to do it)."))      image = get_random_item_image_link(request)      if hasattr(profile, 'homepage') and profile.homepage:          dct['homepage'] = markdown(profile.homepage) | 
