Fix deprecated stuff
This commit is contained in:
parent
521f844e2e
commit
539c1199bf
|
@ -8,22 +8,16 @@ For the full list of settings and their values, see
|
||||||
https://docs.djangoproject.com/en/1.7/ref/settings/
|
https://docs.djangoproject.com/en/1.7/ref/settings/
|
||||||
"""
|
"""
|
||||||
|
|
||||||
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
|
|
||||||
import os
|
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
|
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
|
DEBUG = idre.local_settings.DEBUG
|
||||||
TEMPLATE_DEBUG = idre.local_settings.TEMPLATE_DEBUG
|
|
||||||
|
|
||||||
ALLOWED_HOSTS = ["idre.shgck.io", "idre.xyz"]
|
ALLOWED_HOSTS = ["idre.shgck.io", "idre.xyz"]
|
||||||
|
|
||||||
|
@ -33,45 +27,46 @@ ADMINS = ( ("Shgck", "shgck@pistache.land"), )
|
||||||
# Application definition
|
# Application definition
|
||||||
|
|
||||||
INSTALLED_APPS = (
|
INSTALLED_APPS = (
|
||||||
'django.contrib.admin',
|
"django.contrib.admin",
|
||||||
'django.contrib.auth',
|
"django.contrib.auth",
|
||||||
'django.contrib.contenttypes',
|
"django.contrib.contenttypes",
|
||||||
'django.contrib.sessions',
|
"django.contrib.sessions",
|
||||||
'django.contrib.messages',
|
"django.contrib.messages",
|
||||||
'django.contrib.staticfiles',
|
"django.contrib.staticfiles",
|
||||||
'label'
|
"label"
|
||||||
)
|
)
|
||||||
|
|
||||||
MIDDLEWARE_CLASSES = (
|
MIDDLEWARE_CLASSES = (
|
||||||
'django.contrib.sessions.middleware.SessionMiddleware',
|
"django.contrib.sessions.middleware.SessionMiddleware",
|
||||||
'django.middleware.common.CommonMiddleware',
|
"django.middleware.common.CommonMiddleware",
|
||||||
'django.middleware.csrf.CsrfViewMiddleware',
|
"django.middleware.csrf.CsrfViewMiddleware",
|
||||||
'django.contrib.auth.middleware.AuthenticationMiddleware',
|
"django.contrib.auth.middleware.AuthenticationMiddleware",
|
||||||
'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
|
"django.contrib.auth.middleware.SessionAuthenticationMiddleware",
|
||||||
'django.contrib.messages.middleware.MessageMiddleware',
|
"django.contrib.messages.middleware.MessageMiddleware",
|
||||||
'django.middleware.clickjacking.XFrameOptionsMiddleware',
|
"django.middleware.clickjacking.XFrameOptionsMiddleware"
|
||||||
)
|
)
|
||||||
|
|
||||||
ROOT_URLCONF = 'idre.urls'
|
ROOT_URLCONF = "idre.urls"
|
||||||
|
|
||||||
WSGI_APPLICATION = 'idre.wsgi.application'
|
WSGI_APPLICATION = "idre.wsgi.application"
|
||||||
|
|
||||||
|
|
||||||
# Database
|
# Database
|
||||||
# https://docs.djangoproject.com/en/1.7/ref/settings/#databases
|
# https://docs.djangoproject.com/en/1.7/ref/settings/#databases
|
||||||
|
|
||||||
DATABASES = {
|
DATABASES = {
|
||||||
'default': {
|
"default": {
|
||||||
'ENGINE': 'django.db.backends.sqlite3',
|
"ENGINE": "django.db.backends.sqlite3",
|
||||||
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
|
"NAME": os.path.join(BASE_DIR, "db.sqlite3"),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
# Internationalization
|
# Internationalization
|
||||||
# https://docs.djangoproject.com/en/1.7/topics/i18n/
|
# https://docs.djangoproject.com/en/1.7/topics/i18n/
|
||||||
|
|
||||||
LANGUAGE_CODE = 'fr-FR'
|
LANGUAGE_CODE = "fr-FR"
|
||||||
TIME_ZONE = 'Europe/Paris'
|
TIME_ZONE = "Europe/Paris"
|
||||||
USE_I18N = True
|
USE_I18N = True
|
||||||
USE_L10N = True
|
USE_L10N = True
|
||||||
USE_TZ = True
|
USE_TZ = True
|
||||||
|
@ -80,13 +75,28 @@ USE_TZ = True
|
||||||
# Static files (CSS, JavaScript, Images)
|
# Static files (CSS, JavaScript, Images)
|
||||||
# https://docs.djangoproject.com/en/1.6/howto/static-files/
|
# https://docs.djangoproject.com/en/1.6/howto/static-files/
|
||||||
|
|
||||||
MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
|
MEDIA_ROOT = os.path.join(BASE_DIR, "media")
|
||||||
MEDIA_URL = '/media/'
|
MEDIA_URL = "/media/"
|
||||||
|
|
||||||
STATICFILES_DIRS = ( os.path.join(BASE_DIR, 'static'), )
|
STATICFILES_DIRS = ( os.path.join(BASE_DIR, "static"), )
|
||||||
STATIC_URL = '/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
|
# Misc options
|
||||||
|
|
27
idre/urls.py
27
idre/urls.py
|
@ -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.conf.urls.static import static
|
||||||
from django.contrib import admin
|
from django.contrib import admin
|
||||||
|
|
||||||
from idre import settings
|
import idre.settings
|
||||||
import label.views
|
import label.views
|
||||||
|
|
||||||
|
|
||||||
admin.autodiscover()
|
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(
|
urlpatterns += static(
|
||||||
settings.MEDIA_URL,
|
idre.settings.MEDIA_URL,
|
||||||
document_root = settings.MEDIA_ROOT
|
document_root = idre.settings.MEDIA_ROOT
|
||||||
)
|
)
|
|
@ -2,7 +2,7 @@ body {
|
||||||
font-family: 'Lato', sans-serif;
|
font-family: 'Lato', sans-serif;
|
||||||
color: #393939;
|
color: #393939;
|
||||||
background-color: white;
|
background-color: white;
|
||||||
background-image: url("/static/img/background.png");
|
background-image: url("/static/img/bg.png");
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
background-position: top center;
|
background-position: top center;
|
||||||
background-attachment: fixed;
|
background-attachment: fixed;
|
||||||
|
@ -15,7 +15,6 @@ body {
|
||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
padding: 10px 10px 10px 10px;
|
padding: 10px 10px 10px 10px;
|
||||||
/* background-color: white; */
|
|
||||||
box-shadow: h-pos v-pos (blur) (spread) (color) (inset);
|
box-shadow: h-pos v-pos (blur) (spread) (color) (inset);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
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 |
Loading…
Reference in a new issue