Maybe a bug, about app and view function name collision

26 views
Skip to first unread message

Xin Belter

unread,
Dec 19, 2016, 7:17:09 AM12/19/16
to Django users
Here is the strange thing I just met:

My project's name is showMetDDA, and has only one app named showTable,  in my app's vimes.py file, I have a view function named show_table().

When I import my view function in urls.py(~/djcode/showMetDDA/showMetDDA/urls.py) file, I cannot import it.


error like this:



When I comment the line where has show_table, It works:





What happened? Is it normal???









Antonis Christofides

unread,
Dec 19, 2016, 7:40:21 AM12/19/16
to django...@googlegroups.com

in my app's vimes.py file

Do you really mean "vimes.py"? Could you show the first line of the definition of the show_table() function?

Antonis Christofides
http://djangodeployment.com
--
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...@googlegroups.com.
To post to this group, send email to django...@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/15e2dfd3-74d6-4988-929b-22c553b50591%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Xin Belter

unread,
Dec 21, 2016, 8:34:01 PM12/21/16
to Django users
It works, I didn't change anything(maybe somewhere I didn't realize)... interesting...

在 2016年12月19日星期一 UTC+8下午8:17:09,Xin Belter写道:
Reply all
Reply to author
Forward
0 new messages