add hobo.environment app to configure global settings and services
This commit is contained in:
parent
490120a007
commit
3c744deed8
|
@ -0,0 +1,3 @@
|
|||
from django.contrib import admin
|
||||
|
||||
# Register your models here.
|
|
@ -0,0 +1,3 @@
|
|||
from django.db import models
|
||||
|
||||
# Create your models here.
|
|
@ -0,0 +1,9 @@
|
|||
{% extends "hobo/base.html" %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block appbar %}
|
||||
<h2>{% trans 'Environment Settings' %}</h2>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% endblock %}
|
|
@ -0,0 +1,3 @@
|
|||
from django.test import TestCase
|
||||
|
||||
# Create your tests here.
|
|
@ -0,0 +1,7 @@
|
|||
from django.conf.urls import patterns, url
|
||||
|
||||
from .views import *
|
||||
|
||||
urlpatterns = patterns('',
|
||||
url(r'^$', HomeView.as_view(), name='environment-home'),
|
||||
)
|
|
@ -0,0 +1,8 @@
|
|||
from django.views.generic.base import TemplateView
|
||||
|
||||
class HomeView(TemplateView):
|
||||
template_name = 'environment/home.html'
|
||||
|
||||
def get_context_data(self, **kwargs):
|
||||
context = super(HomeView, self).get_context_data(**kwargs)
|
||||
return context
|
|
@ -18,7 +18,7 @@ msgstr ""
|
|||
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
|
||||
|
||||
#: views.py:21
|
||||
msgid "Global Settings"
|
||||
msgid "Environment Settings"
|
||||
msgstr "Paramétrage global"
|
||||
|
||||
#: templates/hobo/home.html:6
|
||||
|
|
|
@ -37,6 +37,7 @@ INSTALLED_APPS = (
|
|||
'django.contrib.messages',
|
||||
'django.contrib.staticfiles',
|
||||
'gadjo',
|
||||
'hobo.environment',
|
||||
)
|
||||
|
||||
MIDDLEWARE_CLASSES = (
|
||||
|
|
|
@ -5,6 +5,7 @@ admin.autodiscover()
|
|||
|
||||
urlpatterns = patterns('',
|
||||
url(r'^$', 'hobo.views.home', name='home'),
|
||||
url(r'^environment/', include('hobo.environment.urls')),
|
||||
|
||||
url(r'^admin/', include(admin.site.urls)),
|
||||
)
|
||||
|
|
|
@ -18,7 +18,7 @@ class Home(TemplateView):
|
|||
def get_context_data(self, **kwargs):
|
||||
context = super(Home, self).get_context_data(**kwargs)
|
||||
context['zones'] = [
|
||||
Zone(_('Global Settings'), 'settings', 'settings/'),
|
||||
Zone(_('Environment Settings'), 'settings', 'environment/'),
|
||||
]
|
||||
return context
|
||||
|
||||
|
|
Loading…
Reference in New Issue