Move to PostgreSQL
This commit is contained in:
parent
a8c1288959
commit
9601776aa9
|
@ -48,8 +48,12 @@ WSGI_APPLICATION = 'idre.wsgi.application'
|
||||||
|
|
||||||
DATABASES = {
|
DATABASES = {
|
||||||
'default': {
|
'default': {
|
||||||
'ENGINE': 'django.db.backends.sqlite3',
|
'ENGINE': 'django.db.backends.postgresql_psycopg2',
|
||||||
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
|
'NAME': 'idre',
|
||||||
|
'HOST': '',
|
||||||
|
'PORT': '5432',
|
||||||
|
'USER': '',
|
||||||
|
'PASSWORD': '',
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
11
idre/urls.py
11
idre/urls.py
|
@ -1,8 +1,8 @@
|
||||||
|
from django.conf import settings
|
||||||
from django.conf.urls import 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
|
||||||
|
|
||||||
import idre.settings
|
|
||||||
import idre.views
|
import idre.views
|
||||||
import label.urls
|
import label.urls
|
||||||
import news.urls
|
import news.urls
|
||||||
|
@ -11,14 +11,11 @@ admin.autodiscover()
|
||||||
|
|
||||||
|
|
||||||
urlpatterns = (
|
urlpatterns = (
|
||||||
[ url(r"^about/$", idre.views.about_view, name = "about") ] +
|
[ url(r"^about/$", idre.views.about_view, name="about") ] +
|
||||||
label.urls.urlpatterns +
|
label.urls.urlpatterns +
|
||||||
news.urls.urlpatterns +
|
news.urls.urlpatterns +
|
||||||
[ url(r"^admin/", include(admin.site.urls)) ]
|
[ url(r"^admin/", include(admin.site.urls)) ]
|
||||||
)
|
)
|
||||||
|
|
||||||
if idre.settings.DEBUG:
|
if settings.DEBUG:
|
||||||
urlpatterns += static(
|
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
|
||||||
idre.settings.MEDIA_URL,
|
|
||||||
document_root = idre.settings.MEDIA_ROOT
|
|
||||||
)
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
django == 1.11
|
django == 1.11
|
||||||
|
psycopg2 == 2.7.1
|
||||||
|
|
||||||
markdown
|
markdown
|
||||||
Pillow
|
Pillow
|
||||||
|
|
Loading…
Reference in a new issue