Tuesday, February 26, 2019

Re: 'URLPattern' Object is not a mapping

Hello,

Don't you have another urls.py file inside the directory that have the same name as your project.
Probably something like that:

+ yourproject
     + yourproject
          - __init__.py
          - settings.py
          - ....
          - urls.py
          - ....

If yes, what does it contain ? 
Furthermore, could you send us the full trace ? 

Thx

Le mardi 26 février 2019 13:21:20 UTC+1, Tina Upadhyay a écrit :
Getting this error and the urls.py of my model is as shown below:


from django.conf.urls import url
from new import views
app_name = 'new'


urlpatterns = [
url(r'^export/csv/$', views.export_users_csv, name='export_users_csv'),
# url(r'^$', views.upload, name='uplink'),
url(r'^download/(.*)', views.download, name="download"),
url(r'^download_attachment/(.*)/(.*)', views.download_as_attachment,
name="download_attachment"),
url(r'^exchange/(.*)', views.exchange, name="exchange"),
url(r'^parse/(.*)', views.parse, name="parse"),
url(r'^import/', views.import_data, name="import"),
url(r'^import_sheet/', views.import_sheet, name="import_sheet"),
url(r'^export/(.*)', views.export_data, name="export"),
url(r'^handson_view/', views.handson_table, name="handson_view"),

# handson table view
url(r'^embedded_handson_view/',
views.embed_handson_table, name="embed_handson_view"),
url(r'^embedded_handson_view_single/',
views.embed_handson_table_from_a_single_table,
name="embed_handson_view"),
# survey_result
# url('^survey_result/',
# views.survey_result, name='survey_result'),

# testing purpose
url(r'^import_using_isave/',
views.import_data_using_isave_book_as),
url(r'^import_sheet_using_isave/',
views.import_sheet_using_isave_to_database),
url(r'^import_without_bulk_save/',
views.import_without_bulk_save, name="import_no_bulk_save")
]

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/1f653d1a-1d64-415a-bdae-60ff39f81c79%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment