-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #54 from AnjaneyuluBatta505/TestSettings
test settings added
- Loading branch information
Showing
6 changed files
with
118 additions
and
7 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
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,21 @@ | ||
from django.conf.urls import url | ||
from .views import * | ||
|
||
urlpatterns = [ | ||
url(r'^$', admin_login, name='admin_login'), | ||
url(r'^logout/$', admin_logout, name='admin_logout'), | ||
url(r'^blog/$', blog, name='blog'), | ||
url(r'^add/$', blog_add, name='blog_add'), | ||
url(r'^view/(?P<blog_slug>[-\w]+)/$', view_blog, name='view_blog'), | ||
url(r'^delete/(?P<blog_slug>[-\w]+)/$', delete_blog, name='delete_blog'), | ||
url(r'^edit/(?P<blog_slug>[-\w]+)/$', edit_blog, name='edit_blog'), | ||
url(r'^add_category/$', add_category, name='add_category'), | ||
url(r'^category/$', categories, name='categories'), | ||
url(r'^delete_category/(?P<category_slug>[-\w]+)/$', delete_category, name='delete_category'), | ||
url(r'^edit_category/(?P<category_slug>[-\w]+)/$', edit_category, name='edit_category'), | ||
|
||
url(r'^bulk_actions_blog/$', bulk_actions_blog, name='bulk_actions_blog'), | ||
url(r'^bulk_actions_category/$', bulk_actions_category, name='bulk_actions_category'), | ||
url(r'upload_photos/$', upload_photos, name='upload_photos'), | ||
url(r'recent_photos/$', recent_photos, name='recent_photos'), | ||
] |
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
from django.conf.urls import url | ||
from .views import * | ||
|
||
urlpatterns = [ | ||
url(r'^$', index, name='index'), | ||
url(r'^blog/category/(?P<category_slug>[-\w]+)/$', selected_category, | ||
name='selected_category'), | ||
url(r'^blog/tags/(?P<tag_slug>[-\w]+)/$', | ||
selected_tag, name='selected_tag'), | ||
url(r'^blog/(?P<year>\w{0,})/(?P<month>\w{0,})/$', | ||
archive_posts, name='archive_posts'), | ||
url(r'^blog/(?P<blog_slug>[-\w]+)/$', | ||
blog_post_view, name='blog_post_view'), | ||
] |
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,77 @@ | ||
# Build paths inside the project like this: os.path.join(BASE_DIR, ...) | ||
import os | ||
BASE_DIR = os.path.dirname(os.path.dirname(__file__)) | ||
|
||
SECRET_KEY = '_nc9_+ntllx!ptq5tzh96nn^$a#81#auhrdw#8t#+n0#4ig(lz' | ||
|
||
TEMPLATE_LOADERS = ( | ||
'django.template.loaders.app_directories.Loader', | ||
) | ||
|
||
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', | ||
) | ||
|
||
ROOT_URLCONF = 'django_blog_it.urls' | ||
|
||
INSTALLED_APPS = ( | ||
'django.contrib.auth', | ||
'django.contrib.contenttypes', | ||
'django.contrib.sessions', | ||
'django.contrib.sites', | ||
'django.contrib.messages', | ||
'django.contrib.staticfiles', | ||
'django.contrib.humanize', | ||
'simple_pagination', | ||
'django_blog_it.django_blog_it', | ||
'django_blog_it.posts', | ||
) | ||
|
||
DATABASES = { | ||
'default': { | ||
'ENGINE': 'django.db.backends.sqlite3', | ||
'NAME': BASE_DIR + 'sqlite3.db' | ||
} | ||
} | ||
|
||
LANGUAGE_CODE = 'en-us' | ||
|
||
TIME_ZONE = 'UTC' | ||
|
||
USE_I18N = True | ||
|
||
USE_L10N = True | ||
|
||
USE_TZ = True | ||
|
||
STATIC_URL = '/static/' | ||
|
||
STATICFILES_FINDERS = ( | ||
'django.contrib.staticfiles.finders.AppDirectoriesFinder', | ||
) | ||
TEMPLATES = [ | ||
{ | ||
'BACKEND': 'django.template.backends.django.DjangoTemplates', | ||
'DIRS': [ | ||
], | ||
'APP_DIRS': True, | ||
'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', | ||
'django.core.context_processors.request', | ||
], | ||
}, | ||
|
||
}, | ||
] |
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,10 +1,10 @@ | ||
#!/usr/bin/env python | ||
import os | ||
import sys | ||
|
||
if __name__ == "__main__": | ||
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "django_blog_it.settings") | ||
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "django_blog_it.test_settings") | ||
|
||
from django.core.management import execute_from_command_line | ||
|
||
execute_from_command_line(sys.argv) | ||
|