1
0
Fork 0

Fix deprecated stuff

This commit is contained in:
Shgck 2016-02-01 17:52:43 +01:00
parent 521f844e2e
commit 539c1199bf
5 changed files with 62 additions and 52 deletions

View file

@ -8,22 +8,16 @@ For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.7/ref/settings/
"""
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import os
BASE_DIR = os.path.dirname(os.path.dirname(__file__))
# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/1.7/howto/deployment/checklist/
import idre.local_settings
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = idre.local_settings.SECRET_KEY
# SECURITY WARNING: don't run with debug turned on in production!
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR = os.path.dirname(os.path.dirname(__file__))
SECRET_KEY = idre.local_settings.SECRET_KEY
DEBUG = idre.local_settings.DEBUG
TEMPLATE_DEBUG = idre.local_settings.TEMPLATE_DEBUG
ALLOWED_HOSTS = ["idre.shgck.io", "idre.xyz"]
@ -33,45 +27,46 @@ ADMINS = ( ("Shgck", "shgck@pistache.land"), )
# Application definition
INSTALLED_APPS = (
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'label'
"django.contrib.admin",
"django.contrib.auth",
"django.contrib.contenttypes",
"django.contrib.sessions",
"django.contrib.messages",
"django.contrib.staticfiles",
"label"
)
MIDDLEWARE_CLASSES = (
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
"django.contrib.sessions.middleware.SessionMiddleware",
"django.middleware.common.CommonMiddleware",
"django.middleware.csrf.CsrfViewMiddleware",
"django.contrib.auth.middleware.AuthenticationMiddleware",
"django.contrib.auth.middleware.SessionAuthenticationMiddleware",
"django.contrib.messages.middleware.MessageMiddleware",
"django.middleware.clickjacking.XFrameOptionsMiddleware"
)
ROOT_URLCONF = 'idre.urls'
ROOT_URLCONF = "idre.urls"
WSGI_APPLICATION = 'idre.wsgi.application'
WSGI_APPLICATION = "idre.wsgi.application"
# Database
# https://docs.djangoproject.com/en/1.7/ref/settings/#databases
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
"default": {
"ENGINE": "django.db.backends.sqlite3",
"NAME": os.path.join(BASE_DIR, "db.sqlite3"),
}
}
# Internationalization
# https://docs.djangoproject.com/en/1.7/topics/i18n/
LANGUAGE_CODE = 'fr-FR'
TIME_ZONE = 'Europe/Paris'
LANGUAGE_CODE = "fr-FR"
TIME_ZONE = "Europe/Paris"
USE_I18N = True
USE_L10N = True
USE_TZ = True
@ -80,13 +75,28 @@ USE_TZ = True
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/1.6/howto/static-files/
MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
MEDIA_URL = '/media/'
MEDIA_ROOT = os.path.join(BASE_DIR, "media")
MEDIA_URL = "/media/"
STATICFILES_DIRS = ( os.path.join(BASE_DIR, 'static'), )
STATIC_URL = '/static/'
STATICFILES_DIRS = ( os.path.join(BASE_DIR, "static"), )
STATIC_URL = "/static/"
TEMPLATE_DIRS = ( os.path.join(BASE_DIR, 'templates'), )
TEMPLATES = [{
"APP_DIRS": True,
"BACKEND": "django.template.backends.django.DjangoTemplates",
"DIRS": [ os.path.join(BASE_DIR, "templates") ],
"OPTIONS": {
"context_processors": [
"django.contrib.auth.context_processors.auth",
"django.template.context_processors.debug",
"django.template.context_processors.i18n",
"django.template.context_processors.media",
"django.template.context_processors.static",
"django.template.context_processors.tz",
"django.contrib.messages.context_processors.messages"
]
}
}]
# Misc options

View file

@ -1,24 +1,25 @@
from django.conf.urls import patterns, include, url
from django.conf.urls import include, url
from django.conf.urls.static import static
from django.contrib import admin
from idre import settings
import idre.settings
import label.views
admin.autodiscover()
urlpatterns = patterns("",
url(r"^$", label.views.home, name = "home"),
url(r"^artists/$", "label.views.artists", name = "artists"),
url(r"^artists/(?P<slug>\S+)$", "label.views.artist", name = "artist"),
url(r"^releases/$", "label.views.releases", name = "releases"),
url(r"^releases/(?P<tag>\S+)$", "label.views.release", name = "release"),
url(r"^admin/", include(admin.site.urls)),
)
if settings.DEBUG:
urlpatterns = [
url(r"^$", label.views.home, name = "home"),
url(r"^artists/$", label.views.artists, name = "artists"),
url(r"^artists/(?P<slug>\S+)$", label.views.artist, name = "artist"),
url(r"^releases/$", label.views.releases, name = "releases"),
url(r"^releases/(?P<tag>\S+)$", label.views.release, name = "release"),
url(r"^admin/", include(admin.site.urls)),
]
if idre.settings.DEBUG:
urlpatterns += static(
settings.MEDIA_URL,
document_root = settings.MEDIA_ROOT
)
idre.settings.MEDIA_URL,
document_root = idre.settings.MEDIA_ROOT
)

View file

@ -2,7 +2,7 @@ body {
font-family: 'Lato', sans-serif;
color: #393939;
background-color: white;
background-image: url("/static/img/background.png");
background-image: url("/static/img/bg.png");
background-repeat: no-repeat;
background-position: top center;
background-attachment: fixed;
@ -15,7 +15,6 @@ body {
margin-top: 20px;
margin-bottom: 20px;
padding: 10px 10px 10px 10px;
/* background-color: white; */
box-shadow: h-pos v-pos (blur) (spread) (color) (inset);
}

View file

Before

Width:  |  Height:  |  Size: 845 KiB

After

Width:  |  Height:  |  Size: 845 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 682 KiB

After

Width:  |  Height:  |  Size: 116 KiB