Can you post the line in urls.py that is calling the view function?

On Friday, November 8, 2013 6:48:28 PM UTC+1, Keith Edmiston wrote:
>
> Sorry...I was trying to be careful of not putting so much info in the 
> email that it became too much.
>
> My project structure is (in part):
> --bus/certs
>     |_ application
>       |_ __init__
>       |_ models.py --> empty, using common/models.py & bus_models/models.py
>       |_ urls.py
>       |_ views.py
>
>     |_ bus_models (svn: externals)
>       |_ __init__
>       |_ models.py --> Person
>
>     |_ bus_shared_common (svn: externals)
>       |_ __init__
>       |_ static (css, js, etc.)
>       |_ templates
>
>     |_ common
>       |_ __init__
>       |_ models.py --> Program, Status, Application, Notes, Action, 
> Correspondence
>
>     |_ listing
>       |_ __init__
>       |_ models.py --> empty, using common/models.py & bus_models/models.py
>       |_ urls.py --> only one regex so far..."listing", which calls 
> "listing" in views.py
>       |_ views.py --> "listing" function
>
> So, in answer to your question Vincenzo, bus.certs.listing does not make a 
> call to any model just yet.  Thanks for suggesting I look though.
>
> Keith
>
>
> On Fri, Nov 8, 2013 at 10:39 AM, Vincenzo Prignano 
> <[email protected]<javascript:>
> > wrote:
>
>> 'bus.certs.listing' is this entry in your installed apps referring to the 
>> "Listing" models perhaps? We can't really help you with much more info btw.
>>
>>
>> On Friday, November 8, 2013 4:55:04 PM UTC+1, Keith Edmiston wrote:
>>>
>>> Hi,
>>>
>>> I am building a new site in Django 1.4 and I'm using the South migration 
>>> tool to keep my dev MySQL database in sync with changes made to my models. 
>>> It should be said that I use one MySQL database account to serve various 
>>> Django projects/apps (confusing, yes). It all seems to be working fine 
>>> until I attempt to open up the Admin site from the project currently in 
>>> development (bus/certs/admin/).
>>>
>>> It *appears* that the autodiscover is trying to find a model "Listing" 
>>> that is no longer in existence, but did exist in earlier development 
>>> stages. I deleted that model and have since run a South migration to extend 
>>> that deletion to the database.  That seems to have worked fine. What did 
>>> not seem to happen is the removal of references to the "listing" table in 
>>> the django_content_type and auth_permission tables, so I removed those 
>>> manually thinking the autodiscover might be "seeing" those entries and 
>>> subsequently attempting to find the model in "bus_models.models". That 
>>> seems to have made no difference, the error still exists.
>>>
>>> Not sure if this matters or not, but I had initially used the admin up 
>>> in a separate project ("deans" vs. "certs") and it still works.  It even 
>>> still lists the "Bus_models.Listing" model and only fails once I click on 
>>> that link...gives me a "Table does not exist" error, as I would expect. 
>>> This does make me think, however, that there is a lingering pointer 
>>> somewhere that I'm unable to locate.
>>>
>>> I can reliably cause this error to occur and go away again by 
>>> uncommenting/commenting the following lines in my 
>>> bus(app)/certs(proj)/urls.py file:
>>>
>>> from django.contrib import admin
>>> admin.autodiscover()
>>> (r'^apps/bus/certs/admin/', include(admin.site.urls)),
>>>
>>> Here is the traceback of the error page that shows up when the above are 
>>> uncommented (no matter what url I use):
>>> Environment:
>>>
>>>
>>> Request Method: GET
>>> Request URL: https://local.utexas.edu:8000/apps/bus/certs/application/
>>> 1256/
>>>
>>> Django Version: 1.4.3
>>> Python Version: 2.6.7
>>> Installed Applications:
>>> ('django.contrib.auth',
>>>  'django.contrib.contenttypes',
>>>  'django.contrib.sessions',
>>>  'django.contrib.sites',
>>>  'django.contrib.messages',
>>>  'django.contrib.staticfiles',
>>>  'django.contrib.admin',
>>>  'utdirect',
>>>  'bus.certs.application',
>>>  'bus.certs.listing',
>>>  'bus.certs.common',
>>>  'bus.certs.bus_shared_common',
>>>  'bus.certs.bus_models',
>>>  'debug_toolbar',
>>>  'ut_debug_toolbar',
>>>  'south')
>>> Installed Middleware:
>>> ('django.middleware.gzip.GZipMiddleware',
>>>  'django.middleware.common.CommonMiddleware',
>>>  'django.contrib.sessions.middleware.SessionMiddleware',
>>>  'django.middleware.csrf.CsrfViewMiddleware',
>>>  'utdirect.middleware.HttpHeaderMiddleware',
>>>  'django.contrib.auth.middleware.AuthenticationMiddleware',
>>>  'django.contrib.messages.middleware.MessageMiddleware',
>>>  'django.middleware.clickjacking.XFrameOptionsMiddleware',
>>>  'debug_toolbar.middleware.DebugToolbarMiddleware')
>>>
>>>
>>> Traceback:
>>> File 
>>> "/usr/local/env/26.3.4a/lib/python2.6/site-packages/django/core/handlers/base.py"
>>>  
>>> in get_response
>>>   89.                     response = middleware_method(request)
>>> File 
>>> "/usr/local/env/26.3.4a/lib/python2.6/site-packages/utdirect/middleware.py" 
>>> in process_request
>>>   160.         request.urlconf = _build_urlconf(request)
>>> File 
>>> "/usr/local/env/26.3.4a/lib/python2.6/site-packages/utdirect/middleware.py" 
>>> in _build_urlconf
>>>   123.     class URLPatterns(object):
>>> File 
>>> "/usr/local/env/26.3.4a/lib/python2.6/site-packages/utdirect/middleware.py" 
>>> in URLPatterns
>>>   130.             url('', include(original_urlconf)),
>>> File 
>>> "/usr/local/env/26.3.4a/lib/python2.6/site-packages/django/conf/urls/__init__.py"
>>>  
>>> in include
>>>   24.         urlconf_module = import_module(urlconf_module)
>>> File 
>>> "/usr/local/env/26.3.4a/lib/python2.6/site-packages/django/utils/importlib.py"
>>>  
>>> in import_module
>>>   35.     __import__(name)
>>> File "/pype/bus/certs/urls.py" in <module>
>>>   7. admin.autodiscover()
>>> File "/usr/local/env/26.3.4a/lib/python2.6/site-packages/
>>> django/contrib/admin/__init__.py" in autodiscover
>>>   29.             import_module('%s.admin' % app)
>>> File 
>>> "/usr/local/env/26.3.4a/lib/python2.6/site-packages/django/utils/importlib.py"
>>>  
>>> in import_module
>>>   35.     __import__(name)
>>>
>>> Exception Type: NameError at /apps/bus/certs/application/1256/
>>> Exception Value: name 'Listing' is not defined
>>>
>>> Lastly, I have searched in as many ways I can think to search for any 
>>> reference to "Listing" in the database and code base, but cannot find 
>>> anything.
>>>
>>> Any help would be greatly appreciated.
>>>
>>> Regards,
>>>
>>> -- 
>>> Keith  
>>>
>>  -- 
>> 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 [email protected] <javascript:>.
>> To post to this group, send email to [email protected]<javascript:>
>> .
>> 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/4b59f61d-4537-42c8-af0a-79daa04aa19a%40googlegroups.com
>> .
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>
>
>
> -- 
> Keith Edmiston
> (512)970-7222 
>

-- 
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 [email protected].
To post to this group, send email to [email protected].
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/50a407f4-7baf-48e1-9d4e-2c85665df856%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to