Missing stuff for new api testing

This commit is contained in:
Sebastian Lohff 2019-12-21 21:09:54 +01:00
parent 729eab6cf9
commit 8a728f1568
2 changed files with 6 additions and 1 deletions

View File

@ -112,7 +112,7 @@ TEMPLATES = [
# "django.core.context_processors.static", # "django.core.context_processors.static",
#) #)
MIDDLEWARE_CLASSES = ( MIDDLEWARE = (
'django.middleware.common.CommonMiddleware', 'django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.csrf.CsrfViewMiddleware', 'django.middleware.csrf.CsrfViewMiddleware',
@ -135,6 +135,7 @@ INSTALLED_APPS = (
'django.contrib.admin', 'django.contrib.admin',
'easy_thumbnails', 'easy_thumbnails',
'piston', 'piston',
'rest_framework',
) )
@ -143,3 +144,6 @@ STATICFILES_DIRS = [
] ]
STATIC_ROOT = os.path.join(BASE_DIR, "static") STATIC_ROOT = os.path.join(BASE_DIR, "static")
REST_FRAMEWORK = {
'DEFAULT_PREMISSION_CLASSES': 'rest_framework.permissions.DjangoModelPermissionsOrAnonReadOnly',
}

View File

@ -22,6 +22,7 @@ urlpatterns = (
# user stuff? go to main # user stuff? go to main
url(r'^$', main.views.startpage, name='main.views.startpage'), url(r'^$', main.views.startpage, name='main.views.startpage'),
url(r'^api2/', include('api2.urls')), url(r'^api2/', include('api2.urls')),
url(r'^api3/', include('api3.urls')),
url(r'^user/', include('main.urls')), url(r'^user/', include('main.urls')),
url(r'^transaction/', include('transaction.urls')), url(r'^transaction/', include('transaction.urls')),
url(r'^store/', include('buyable.urls')), url(r'^store/', include('buyable.urls')),