-
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.
- Loading branch information
Showing
7 changed files
with
3,123 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import os | ||
from django.conf import settings | ||
|
||
|
||
def pytest_configure(): | ||
if not settings.configured: | ||
os.environ['DJANGO_SETTINGS_MODULE'] = 'tests.settings' |
Large diffs are not rendered by default.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,71 @@ | ||
DEBUG = False | ||
TEMPLATE_DEBUG = DEBUG | ||
|
||
TIME_ZONE = 'UTC' | ||
LANGUAGE_CODE = 'en-US' | ||
SITE_ID = 1 | ||
USE_L10N = True | ||
USE_TZ = True | ||
|
||
SECRET_KEY = 'local' | ||
|
||
ROOT_URLCONF = 'tests.urls' | ||
|
||
DATABASES = { | ||
'default': { | ||
'ENGINE': 'django.db.backends.sqlite3', | ||
'NAME': ':memory:', | ||
# 'NAME': 'dev.db', | ||
} | ||
} | ||
|
||
MIDDLEWARE_CLASSES = [ | ||
'django.middleware.common.CommonMiddleware', | ||
'django.contrib.sessions.middleware.SessionMiddleware', | ||
'django.middleware.csrf.CsrfViewMiddleware', | ||
'django.contrib.auth.middleware.AuthenticationMiddleware', | ||
'django.contrib.messages.middleware.MessageMiddleware', | ||
'django.middleware.clickjacking.XFrameOptionsMiddleware', | ||
'django.contrib.flatpages.middleware.FlatpageFallbackMiddleware', | ||
] | ||
|
||
TEMPLATE_CONTEXT_PROCESSORS = [ | ||
'django.contrib.auth.context_processors.auth', | ||
'django.core.context_processors.i18n', | ||
'django.core.context_processors.media', | ||
'django.core.context_processors.static', | ||
'django.core.context_processors.tz', | ||
'django.core.context_processors.request', | ||
'django.contrib.messages.context_processors.messages' | ||
] | ||
|
||
STATICFILES_FINDERS = ( | ||
'django.contrib.staticfiles.finders.FileSystemFinder', | ||
'django.contrib.staticfiles.finders.AppDirectoriesFinder', | ||
) | ||
|
||
INSTALLED_APPS = ( | ||
'django.contrib.auth', | ||
'django.contrib.contenttypes', | ||
'django.contrib.sessions', | ||
'django.contrib.messages', | ||
'django.contrib.staticfiles', | ||
'django.contrib.sites', | ||
'django.contrib.flatpages', | ||
'south', | ||
|
||
'sales_flatpages', | ||
|
||
'tests', | ||
) | ||
|
||
PASSWORD_HASHERS = ( | ||
'django.contrib.auth.hashers.MD5PasswordHasher', | ||
) | ||
|
||
import django | ||
if django.VERSION < (1, 4): | ||
TEMPLATE_CONTEXT_PROCESSORS.remove('django.core.context_processors.tz') | ||
MIDDLEWARE_CLASSES.remove( | ||
'django.middleware.clickjacking.XFrameOptionsMiddleware' | ||
) |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
<h1>404!!!!</h1> |
Empty file.
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<html> | ||
<head></head> | ||
<body> | ||
{% if messages %} | ||
{% for message in messages %} | ||
{{ message }} | ||
{% endfor %} | ||
{% endif %} | ||
|
||
{{ form.as_p }} | ||
</body> | ||
</html> |
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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
from __future__ import unicode_literals | ||
|
||
from django.conf import settings | ||
from django.conf.urls import patterns, include, url | ||
from django.conf.urls.static import static | ||
|
||
# Uncomment the next two lines to enable the admin: | ||
from django.contrib import admin | ||
admin.autodiscover() | ||
|
||
|
||
urlpatterns = patterns('', | ||
# Uncomment the next line to enable the admin: | ||
url(r'^admin/', include(admin.site.urls)), | ||
|
||
# Your stuff: custom urls go here | ||
|
||
) + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) | ||
|
||
|
||
urlpatterns += patterns( | ||
'django.contrib.auth.views', | ||
# login page, required by some tests | ||
url(r'^accounts/login/$', 'login', {'template_name': 'blank.html'}), | ||
url(r'^auth/login/$', 'login', {'template_name': 'blank.html'}), | ||
) |