Skip to content

Commit

Permalink
Remove Deprecation Warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
shiva committed Aug 8, 2016
1 parent 0068c65 commit 482fafc
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 25 deletions.
18 changes: 10 additions & 8 deletions leave_tracker/urls.py
@@ -1,10 +1,12 @@
from django.conf.urls import patterns, include, url

urlpatterns = patterns('leave_tracker.views',
url(r'^$', 'index', name='index'),
url(r'^apply/$', 'apply', name='apply'),
url(r'^all/$', 'all', name='all'),
url(r'^personal/$', 'personal', name='personal'),
url(r'^openid/logout/$', 'oidlogout', name='oidlogout'),
url(r'^get_prev_leaves/', 'get_prev_leaves', name='get_prev_leaves'),
)
from leave_tracker import views

urlpatterns = [
url(r'^$', views.index, name='index'),
url(r'^apply/$', views.apply, name='apply'),
url(r'^all/$', views.all, name='all'),
url(r'^personal/$', views.personal, name='personal'),
url(r'^openid/logout/$', views.oidlogout, name='oidlogout'),
url(r'^get_prev_leaves/', views.get_prev_leaves, name='get_prev_leaves'),
]
38 changes: 24 additions & 14 deletions leaves/settings.py
Expand Up @@ -77,13 +77,6 @@
# Make this unique, and don't share it with anybody.
SECRET_KEY = '^5rs2_#d_=!(gppn@^yc-+dpgi&&k%mmmp16w3l8p@hd!9$-hd'

# List of callables that know how to import templates from various sources.
TEMPLATE_LOADERS = (
'django.template.loaders.filesystem.Loader',
'django.template.loaders.app_directories.Loader',
# 'django.template.loaders.eggs.Loader',
)

MIDDLEWARE_CLASSES = (
'django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
Expand All @@ -99,12 +92,6 @@
# Python dotted path to the WSGI application used by Django's runserver.
WSGI_APPLICATION = 'leaves.wsgi.application'

TEMPLATE_DIRS = (
os.path.join(PROJECT_DIR, 'templates'),
# Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
# Always use forward slashes, even on Windows.
# Don't forget to use absolute paths, not relative paths.
)

INSTALLED_APPS = (
'django.contrib.auth',
Expand Down Expand Up @@ -189,7 +176,30 @@
}


TEMPLATE_DEBUG = DEBUG
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [
os.path.join(PROJECT_DIR, 'templates'),
],
'APP_DIRS': True,
'OPTIONS': {
'debug': DEBUG,
'context_processors': [
# Insert your TEMPLATE_CONTEXT_PROCESSORS here or use this
# list if you haven't customized them:
'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',
],
},
},
]


LEAVE_CONST = 20

Expand Down
9 changes: 6 additions & 3 deletions leaves/urls.py
@@ -1,10 +1,13 @@
from django.conf.urls import patterns, include, url
from django.contrib.staticfiles.urls import staticfiles_urlpatterns

# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()

urlpatterns = patterns('',
from social.apps import django_app

urlpatterns = [
# Examples:
url(r'', include('leave_tracker.urls')),

Expand All @@ -14,7 +17,7 @@
# Uncomment the next line to enable the admin:
url(r'^admin/', include(admin.site.urls)),
url('google_auth/', include('social.apps.django_app.urls', namespace='social')),
url('google_auth/login/google-oauth2/', 'social.apps.django_app.views.auth', name='login'),
)
url('google_auth/login/google-oauth2/', django_app.views.auth, name='login'),
]

urlpatterns += staticfiles_urlpatterns()

0 comments on commit 482fafc

Please sign in to comment.