Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Nounous
re2o
Commits
e5153609
Commit
e5153609
authored
Apr 16, 2018
by
Gabriel Detraz
Committed by
chirac
Apr 16, 2018
Browse files
Oublie du fichier de génération de la page d'accueil
parent
b118e119
Changes
1
Hide whitespace changes
Inline
Side-by-side
re2o/views.py
View file @
e5153609
...
...
@@ -41,7 +41,12 @@ from django.utils.translation import ugettext as _
from
django.views.decorators.cache
import
cache_page
import
preferences
from
preferences.models
import
Service
,
GeneralOption
,
AssoOption
from
preferences.models
import
(
Service
,
GeneralOption
,
AssoOption
,
AccueilOption
)
import
users
import
cotisations
import
topologie
...
...
@@ -63,7 +68,17 @@ def index(request):
services
=
[[],
[],
[]]
for
indice
,
serv
in
enumerate
(
Service
.
objects
.
all
()):
services
[
indice
%
3
].
append
(
serv
)
return
form
({
'services_urls'
:
services
},
're2o/index.html'
,
request
)
twitter_url
=
AccueilOption
.
get_cached_value
(
'twitter_url'
)
facebook_url
=
AccueilOption
.
get_cached_value
(
'facebook_url'
)
twitter_account_name
=
AccueilOption
.
get_cached_value
(
'twitter_account_name'
)
asso_name
=
AssoOption
.
get_cached_value
(
'pseudo'
)
return
form
({
'services_urls'
:
services
,
'twitter_url'
:
twitter_url
,
'twitter_account_name'
:
twitter_account_name
,
'facebook_url'
:
facebook_url
,
'asso_name'
:
asso_name
},
're2o/index.html'
,
request
)
#: Binding the corresponding char sequence of history url to re2o models.
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment