Updated settings, urls, restframework
This commit is contained in:
		
							
								
								
									
										14
									
								
								.idea/carom-server.iml
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										14
									
								
								.idea/carom-server.iml
									
									
									
										generated
									
									
									
								
							@@ -1,10 +1,24 @@
 | 
				
			|||||||
<?xml version="1.0" encoding="UTF-8"?>
 | 
					<?xml version="1.0" encoding="UTF-8"?>
 | 
				
			||||||
<module type="PYTHON_MODULE" version="4">
 | 
					<module type="PYTHON_MODULE" version="4">
 | 
				
			||||||
 | 
					  <component name="FacetManager">
 | 
				
			||||||
 | 
					    <facet type="django" name="Django">
 | 
				
			||||||
 | 
					      <configuration>
 | 
				
			||||||
 | 
					        <option name="rootFolder" value="$MODULE_DIR$" />
 | 
				
			||||||
 | 
					        <option name="settingsModule" value="caromserver/settings.py" />
 | 
				
			||||||
 | 
					        <option name="manageScript" value="manage.py" />
 | 
				
			||||||
 | 
					        <option name="environment" value="<map/>" />
 | 
				
			||||||
 | 
					        <option name="commandsToSkip" value="" />
 | 
				
			||||||
 | 
					      </configuration>
 | 
				
			||||||
 | 
					    </facet>
 | 
				
			||||||
 | 
					  </component>
 | 
				
			||||||
  <component name="NewModuleRootManager">
 | 
					  <component name="NewModuleRootManager">
 | 
				
			||||||
    <content url="file://$MODULE_DIR$" />
 | 
					    <content url="file://$MODULE_DIR$" />
 | 
				
			||||||
    <orderEntry type="inheritedJdk" />
 | 
					    <orderEntry type="inheritedJdk" />
 | 
				
			||||||
    <orderEntry type="sourceFolder" forTests="false" />
 | 
					    <orderEntry type="sourceFolder" forTests="false" />
 | 
				
			||||||
  </component>
 | 
					  </component>
 | 
				
			||||||
 | 
					  <component name="TemplatesService">
 | 
				
			||||||
 | 
					    <option name="TEMPLATE_CONFIGURATION" value="Django" />
 | 
				
			||||||
 | 
					  </component>
 | 
				
			||||||
  <component name="TestRunnerService">
 | 
					  <component name="TestRunnerService">
 | 
				
			||||||
    <option name="PROJECT_TEST_RUNNER" value="Unittests" />
 | 
					    <option name="PROJECT_TEST_RUNNER" value="Unittests" />
 | 
				
			||||||
  </component>
 | 
					  </component>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -37,6 +37,8 @@ INSTALLED_APPS = [
 | 
				
			|||||||
    'django.contrib.sessions',
 | 
					    'django.contrib.sessions',
 | 
				
			||||||
    'django.contrib.messages',
 | 
					    'django.contrib.messages',
 | 
				
			||||||
    'django.contrib.staticfiles',
 | 
					    'django.contrib.staticfiles',
 | 
				
			||||||
 | 
					    'rest_framework',
 | 
				
			||||||
 | 
					    'rest_framework.authtoken',
 | 
				
			||||||
]
 | 
					]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
MIDDLEWARE = [
 | 
					MIDDLEWARE = [
 | 
				
			||||||
@@ -118,3 +120,11 @@ USE_TZ = True
 | 
				
			|||||||
# https://docs.djangoproject.com/en/1.10/howto/static-files/
 | 
					# https://docs.djangoproject.com/en/1.10/howto/static-files/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
STATIC_URL = '/static/'
 | 
					STATIC_URL = '/static/'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					REST_FRAMEWORK = {
 | 
				
			||||||
 | 
					    # Use Django's standard `django.contrib.auth` permissions,
 | 
				
			||||||
 | 
					    # or allow read-only access for unauthenticated users.
 | 
				
			||||||
 | 
					    'DEFAULT_PERMISSION_CLASSES': [
 | 
				
			||||||
 | 
					        'rest_framework.permissions.DjangoModelPermissionsOrAnonReadOnly'
 | 
				
			||||||
 | 
					    ]
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -13,9 +13,10 @@ Including another URLconf
 | 
				
			|||||||
    1. Import the include() function: from django.conf.urls import url, include
 | 
					    1. Import the include() function: from django.conf.urls import url, include
 | 
				
			||||||
    2. Add a URL to urlpatterns:  url(r'^blog/', include('blog.urls'))
 | 
					    2. Add a URL to urlpatterns:  url(r'^blog/', include('blog.urls'))
 | 
				
			||||||
"""
 | 
					"""
 | 
				
			||||||
from django.conf.urls import url
 | 
					from django.conf.urls import url, include
 | 
				
			||||||
from django.contrib import admin
 | 
					from django.contrib import admin
 | 
				
			||||||
 | 
					
 | 
				
			||||||
urlpatterns = [
 | 
					urlpatterns = [
 | 
				
			||||||
    url(r'^admin/', admin.site.urls),
 | 
					    url(r'^admin/', admin.site.urls),
 | 
				
			||||||
 | 
					    url(r'^api-auth/', include('rest_framework.urls', namespace='rest_framework'))
 | 
				
			||||||
]
 | 
					]
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user