From 0ec0e61c19d120cfead5266a24cbb855c4db9f9f Mon Sep 17 00:00:00 2001 From: Bradlee Speice Date: Mon, 31 Mar 2014 14:23:57 -0400 Subject: [PATCH] Wire up the URLs, and add scavenger to apps --- .../UNCCScavenger_Server/UNCCScavenger_Server/settings.py | 6 ++++-- .../UNCCScavenger_Server/UNCCScavenger_Server/urls.py | 1 + .../UNCCScavenger_Server/scavenger/urls.py | 8 ++++++++ 3 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 UNCCScavenger-Server/UNCCScavenger_Server/scavenger/urls.py diff --git a/UNCCScavenger-Server/UNCCScavenger_Server/UNCCScavenger_Server/settings.py b/UNCCScavenger-Server/UNCCScavenger_Server/UNCCScavenger_Server/settings.py index cd49d61..0603c9f 100644 --- a/UNCCScavenger-Server/UNCCScavenger_Server/UNCCScavenger_Server/settings.py +++ b/UNCCScavenger-Server/UNCCScavenger_Server/UNCCScavenger_Server/settings.py @@ -11,8 +11,8 @@ MANAGERS = ADMINS DATABASES = { 'default': { - 'ENGINE': 'django.db.backends.', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'. - 'NAME': '', # Or path to database file if using sqlite3. + 'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'. + 'NAME': 'scavenger.db', # Or path to database file if using sqlite3. 'USER': '', # Not used with sqlite3. 'PASSWORD': '', # Not used with sqlite3. 'HOST': '', # Set to empty string for localhost. Not used with sqlite3. @@ -123,6 +123,8 @@ INSTALLED_APPS = ( # 'django.contrib.admin', # Uncomment the next line to enable admin documentation: # 'django.contrib.admindocs', + + 'scavenger', ) # A sample logging configuration. The only tangible logging diff --git a/UNCCScavenger-Server/UNCCScavenger_Server/UNCCScavenger_Server/urls.py b/UNCCScavenger-Server/UNCCScavenger_Server/UNCCScavenger_Server/urls.py index 33054ae..a9a15de 100644 --- a/UNCCScavenger-Server/UNCCScavenger_Server/UNCCScavenger_Server/urls.py +++ b/UNCCScavenger-Server/UNCCScavenger_Server/UNCCScavenger_Server/urls.py @@ -14,4 +14,5 @@ urlpatterns = patterns('', # Uncomment the next line to enable the admin: # url(r'^admin/', include(admin.site.urls)), + url(r'^', include('scavenger.urls')), ) diff --git a/UNCCScavenger-Server/UNCCScavenger_Server/scavenger/urls.py b/UNCCScavenger-Server/UNCCScavenger_Server/scavenger/urls.py new file mode 100644 index 0000000..403d32e --- /dev/null +++ b/UNCCScavenger-Server/UNCCScavenger_Server/scavenger/urls.py @@ -0,0 +1,8 @@ +from django.conf.urls import patterns, url +from rest_framework.urlpatterns import format_suffix_patterns +from scavenger import views + +urlpatterns = patterns('', + url(r'^locations/$', views.LocationList.as_view()), + url(r'^validate/$', views.LocationResult.as_view()), + )