Commit 9d588ff6 authored by okhin's avatar okhin
Browse files

Fix #3 removed patterns()

parent 20592a0d
......@@ -19,14 +19,14 @@ class Command(BaseCommand):
def handle(self, *args, **options):
print "download lastest data dump of meps from compotista"
print("download lastest data dump of meps from compotista")
urllib.urlretrieve('', JSON_DUMP_LOCALIZATION)
print "load json"
print("load json")
meps = json.load(open(JSON_DUMP_LOCALIZATION, "r"))
# This should not be used, since old contacts should stay in database
print "cleaning Contacts"
print("cleaning Contacts")
print "adding Contacts"
print("adding Contacts")
added = 0
for mep in meps:
insert_mep = False
......@@ -60,7 +60,7 @@ class Command(BaseCommand):
added += 1
print '%d - %s %s' % (added, first_name, last_name)
print('%d - %s %s' % (added, first_name, last_name))
if added>=50:
from django.conf.urls import patterns, include, url
from django.conf.urls import include, url
from django.contrib import admin
from rest_framework_nested import routers
......@@ -18,7 +18,8 @@ campaign_router.register(r'categories', CategoryViewSet)
campaign_router.register(r'feedbacks', FeedbackViewSet)
urlpatterns = patterns('',
url(r'^admin/', include(,
url(r'^', include(router.urls)),
url(r'^', include(campaign_router.urls)))
urlpatterns = [
url(r'^admin/', include(,
url(r'^', include(router.urls)),
url(r'^', include(campaign_router.urls))
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment