Skip to content

Commit

Permalink
Base design
Browse files Browse the repository at this point in the history
  • Loading branch information
the-glu committed Jan 4, 2014
1 parent 472da3e commit 2301d55
Show file tree
Hide file tree
Showing 51 changed files with 17,874 additions and 10 deletions.
10 changes: 6 additions & 4 deletions app/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,18 +41,18 @@

# Absolute filesystem path to the directory that will hold user-uploaded files.
# Example: "/var/www/example.com/media/"
MEDIA_ROOT = ''
MEDIA_ROOT = normpath(join(DJANGO_ROOT, 'media')) + '/'

# URL that handles the media served from MEDIA_ROOT. Make sure to use a
# trailing slash.
# Examples: "http://example.com/media/", "http://media.example.com/"
MEDIA_URL = ''
MEDIA_URL = '/media/'

# Absolute path to the directory static files should be collected to.
# Don't put anything in this directory yourself; store your static files
# in apps' "static/" subdirectories and in STATICFILES_DIRS.
# Example: "/var/www/example.com/static/"
STATIC_ROOT = ''
STATIC_ROOT = normpath(join(DJANGO_ROOT, 'static')) + '/'

# URL prefix for static files.
# Example: "http://example.com/static/", "http://static.example.com/"
Expand Down Expand Up @@ -113,6 +113,8 @@
# 'django.contrib.admindocs',

'south',

'main',
)

SESSION_SERIALIZER = 'django.contrib.sessions.serializers.JSONSerializer'
Expand Down Expand Up @@ -147,7 +149,7 @@
}

AUTHENTICATION_BACKENDS = ('tequila.Backend', )
LOGIN_URL = '/login'
LOGIN_URL = '/users/login'

TEQUILA_SERVER = 'https://tequila.epfl.ch' # Url of tequila server, for API
TEQUILA_SERVER2 = 'https://tequila.epfl.ch' # Url of tequila server, for redirection
Expand Down
9 changes: 7 additions & 2 deletions app/urls.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from django.conf.urls import patterns, include, url
from django.conf import settings

# Uncomment the next two lines to enable the admin:
# from django.contrib import admin
Expand All @@ -16,7 +17,11 @@
# Uncomment the next line to enable the admin:
# url(r'^admin/', include(admin.site.urls)),

(r'^login$', 'tequila.login'),
(r'^users/login$', 'tequila.login'),
(r'^users/logout$', 'django.contrib.auth.views.logout', {'next_page': '/'}),

url(r'^main/', include('main.urls')),
url(r'', include('main.urls')),

(r'^' + settings.MEDIA_URL[1:] + '(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT}), # In prod, use apache !
(r'^' + settings.STATIC_URL[1:] + '(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.STATIC_ROOT}), # In prod, use apache !
)
11 changes: 10 additions & 1 deletion main/templates/main/home.html
Original file line number Diff line number Diff line change
@@ -1 +1,10 @@
Test
{% extends "base.html" %}
{% load i18n %}

{% block title %}{{block.super}} :: {% trans "Home" %}{% endblock %}

{% block content %}

<h2>{% trans "Welcome !" %}</h2>

{% endblock %}
Loading

0 comments on commit 2301d55

Please sign in to comment.