Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
humanities
gargantext
Commits
7905e2c8
Commit
7905e2c8
authored
Sep 08, 2014
by
Administrator
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
home example with authenticate
parent
7fcf8281
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
0 deletions
+26
-0
urls.py
gargantext_web/urls.py
+4
-0
views.py
gargantext_web/views.py
+22
-0
No files found.
gargantext_web/urls.py
View file @
7905e2c8
...
...
@@ -2,6 +2,8 @@ from django.conf.urls import patterns, include, url
from
django.contrib
import
admin
from
gargantext_web.views
import
home
admin
.
autodiscover
()
urlpatterns
=
patterns
(
''
,
...
...
@@ -9,7 +11,9 @@ urlpatterns = patterns('',
# url(r'^$', 'gargantext_web.views.home', name='home'),
# url(r'^blog/', include('blog.urls')),
url
(
r'^admin/'
,
include
(
admin
.
site
.
urls
)),
url
(
r'^login/'
,
include
(
admin
.
site
.
urls
)),
url
(
r'^grappelli/'
,
include
(
'grappelli.urls'
)),
# grappelli URLS
url
(
r'^$'
,
home
),
)
from
django.conf
import
settings
...
...
gargantext_web/views.py
0 → 100644
View file @
7905e2c8
from
django.shortcuts
import
redirect
from
django.shortcuts
import
render
import
datetime
from
django.http
import
Http404
,
HttpResponse
from
django.template.loader
import
get_template
from
django.template
import
Context
def
home
(
request
):
if
not
request
.
user
.
is_authenticated
():
return
redirect
(
'/login/?next=
%
s'
%
request
.
path
)
now
=
datetime
.
datetime
.
now
()
html
=
"<html><body>Il est
%
s.</body></html>"
%
now
return
HttpResponse
(
html
)
Write
Preview
Markdown
is supported
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