Hi Malik,
Ah - in that case, you're not looking at anything special that Django is doing; you're just seeing the result of importing Python code.
Running something like ./manage.py runserver sets of a sequence of complex code internally - effectively, all the code in your project (or, at least, all your models.py, views.py and urls.py files) will be imported. If there are any problems in any of them, the first error encountered by the interpreter will be surfaced.
The fact that you're seeing a NameError means that *something* in your code is generating it. Unfortunately, for a variety of reasons, the actual source of the error can be hard to track down from the stack trace Django provides. The best was I know of to debug the problem is to open up a shell and try importing modules until you find the one that fails to import.
Yours,
Russ Magee %-)
On Sun, Aug 17, 2014 at 9:28 PM, Malik Rumi <malik.a.rumi@gmail.com> wrote:
Thanks for both the reply and it's speed. Yes, this looks to be part of what I am looking for. I say part because the link you gave does not specifically reference checking views and urls.py, but whatever check is being run for me is clearly looking there, too. I am using 1.7c1, and the reason I asked specifically about the sequence of these checks is because I am trying to track down a NameError that is showing up in urls.py even though my import from views.py is *.On Sun, Aug 17, 2014 at 8:15 AM, Russell Keith-Magee <russell@keith-magee.com> wrote:
HI Malik,It sounds like you might be referring to the validation/system check framework.In Django 1.6, this is implemented using a single huge method that looks for specific problems in your model definitions. This functionality isn't well documented, and isn't extensible as an end user. If you want to run the validation manually, you can invoke `python manage.py validate` - that will *just* run the validation. Commands like syncdb and runserver hook into the same functionality and force a validation check before they do what they're supposed to do.In Django 1.7 (soon to be released), the validation tools have been replaced but the system checks framework. This capability *is* documented, and *is* user extensible.You invoke the system check framework by calling `python manage.py check` (calls to validate will redirect to check).I hope that helps.Yours,Russ Magee %-)On Sun, Aug 17, 2014 at 8:08 PM, Malik Rumi <malik.a.rumi@gmail.com> wrote:
--When you run python mange.py *, Django runs through your code and stops to point out errors instead of giving you runserver or shell or whatever you were trying to do. What is that sequence? Is it the same every time? Where can I find out more about it? I looked in the docs, but I couldn't find it. I assume that's because I don't know the right keywords. Thx.
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 http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/f9cb25aa-784e-4512-9172-19df8b67b3ed%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAJxq84_sM6am%3DnU2WU6ShPY%2BwBi%2BkeLKrAHCuUCTJV%3DA5gsVMA%40mail.gmail.com.
You received this message because you are subscribed to a topic in the Google Groups "Django users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/django-users/MpGtEwlt8rc/unsubscribe.
To unsubscribe from this group and all its topics, 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 http://groups.google.com/group/django-users.--To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAKd6oBwnSn6vPC8UZCTBLtPwxBg5quFZACkoY6X0kbzZPZ4N-g%40mail.gmail.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+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
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 http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAJxq849dbh1bKgnKdHcTVccG3xczTZ_QAXF627_auBgHkqBj0Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment