This repository has been archived by the owner on Apr 8, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
improving | sqlite3 suppr | see MongoEngine/django-mongoengine#65
- Loading branch information
maxperei
committed
Apr 23, 2017
1 parent
e9b0be5
commit 4c97ded
Showing
6 changed files
with
41 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,8 +11,6 @@ | |
""" | ||
|
||
import os | ||
import sys | ||
import mongoengine | ||
|
||
# Build paths inside the project like this: os.path.join(BASE_DIR, ...) | ||
|
||
|
@@ -28,6 +26,12 @@ | |
# SECURITY WARNING: don't run with debug turned on in production! | ||
DEBUG = True | ||
|
||
ADMINS = ( | ||
('Max Perei', '[email protected]'), | ||
) | ||
|
||
MANAGERS = ADMINS | ||
|
||
ALLOWED_HOSTS = ['127.0.0.1', 'local.dev', 'localhost'] | ||
|
||
# Application definition | ||
|
@@ -48,6 +52,12 @@ | |
'somnium.apps.SomniumConfig', | ||
] | ||
|
||
STATICFILES_FINDERS = ( | ||
'django.contrib.staticfiles.finders.FileSystemFinder', | ||
'django.contrib.staticfiles.finders.AppDirectoriesFinder', | ||
# 'django.contrib.staticfiles.finders.DefaultStorageFinder', | ||
) | ||
|
||
MIDDLEWARE_CLASSES = [ | ||
'django.middleware.security.SecurityMiddleware', | ||
'django.contrib.sessions.middleware.SessionMiddleware', | ||
|
@@ -82,7 +92,6 @@ | |
|
||
WSGI_APPLICATION = 'primoprim.wsgi.application' | ||
|
||
|
||
# Database | ||
# https://docs.djangoproject.com/en/1.9/ref/settings/#databases | ||
|
||
|
@@ -98,17 +107,19 @@ | |
|
||
DATABASES = { | ||
'default': { | ||
# 'ENGINE': 'django.db.backends.dummy' | ||
'ENGINE': 'django.db.backends.sqlite3', | ||
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), | ||
'ENGINE': 'django.db.backends.dummy' | ||
} | ||
} | ||
|
||
# AUTHENTICATION_BACKENDS = ( | ||
# 'mongoengine.django.auth.MongoEngineBackend', | ||
# ) | ||
AUTH_USER_MODEL = 'mongo_auth.MongoUser' | ||
|
||
AUTHENTICATION_BACKENDS = ( | ||
'django_mongoengine.mongo_auth.backends.MongoEngineBackend', | ||
) | ||
|
||
SESSION_ENGINE = 'django_mongoengine.sessions' | ||
|
||
#SESSION_ENGINE = 'mongoengine.django.sessions' | ||
SESSION_SERIALIZER = 'django_mongoengine.sessions.BSONSerializer' | ||
|
||
# Password validation | ||
# https://docs.djangoproject.com/en/1.9/ref/settings/#auth-password-validators | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,11 @@ | ||
from django.contrib import admin | ||
from django_mongoengine import mongo_admin as admin | ||
from .models import Artist, Performance | ||
|
||
# Register your models here. | ||
# @admin.register(Artist) | ||
class ArtistAdmin(admin.DocumentAdmin): | ||
pass | ||
|
||
# @admin.register(Performance) | ||
class PerformanceAdmin(admin.DocumentAdmin): | ||
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4c97ded
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Site Django Admin