Raw query returns 1 row but outputting multiple rows in template

2016-10-06 Thread Thomas Brightwell
Hi, I have a raw query returning one row which is then shown 8 times in the template. I have debugged and there is only one line when this is executed in the shell and I do a simple for loop print output. So it seems to be something about the template tags? The raw query which definitely only

Exclude models from makemigrations

2015-11-19 Thread Thomas Brightwell
I'm working with django-salesforce and have salesforce models in my models.py, as well as local models which point to a Postgres database. I am excluding the salesforce models from the migrate command by using managed = False in a meta class on the models. However, makemigrations still generate

Re: Model not appearing in django admin

2014-08-13 Thread Thomas Brightwell
Ok, figured it. I have an admin folder as well as admin.py so they're conflicting. Removing it solved the issue and Retailer now appears in the admin interface. Thanks for the debugging steps! Cheers, Tom On Wednesday, 13 August 2014 14:38:51 UTC+1, Thomas Brightwell wrote: > >

Re: Model not appearing in django admin

2014-08-13 Thread Thomas Brightwell
Yes, have an __init__.py file. And yes, works fine importing. bash-3.2$ ./manage.py shell Python 2.7.5 (default, Mar 9 2014, 22:15:05) In [1]: import webapp.admin In [2]: webapp directory listing: bash-3.2$ ls __init__.py admin admin.pyc item migrations models.pyc templates tests view

Re: Model not appearing in django admin

2014-08-13 Thread Thomas Brightwell
Collin, Thanks for the help. I updated my admin.py with this (also been trying other variations of the register): from django.contrib import admin from .models import Retailer @admin.register(Retailer) class RetailerAdmin(admin.ModelAdmin): pass print 'foo' raise Exception() Restarted my

Re: Model not appearing in django admin

2014-08-12 Thread Thomas Brightwell
e non inclusion of certain urls depending on the order in > which they appear in the urls.py file. Can you comment the other ones and > just keep > > url(r'^admin/django_admin/', include(admin.site.urls)) > > to eliminate this possibility. > > On Wednesday, Aug

Re: Model not appearing in django admin

2014-08-12 Thread Thomas Brightwell
Collin, I'm running django v1.7c1 On Wednesday, 13 August 2014 02:50:14 UTC+1, Collin Anderson wrote: > > Do you have admin.autodiscover() in your urls.py? (assuming you're not > using version 1.7) > -- You received this message because you are subscribed to the Google Groups "Django users" g

Re: Model not appearing in django admin

2014-08-12 Thread Thomas Brightwell
g the model url manually after logging to the > admin interface, in your case it would be > > http://[host name]:[port]/admin/django_admin/webapp/retailer > > don't forget to set your DEBUG to True in the settings.py and if you are > restart your server if you are running

Model not appearing in django admin

2014-08-12 Thread Thomas Brightwell
I am trying to manage the data in a model through the default django admin site. I have several apps, which have all been included in INSTALLED_APPS, and I am registering the model with the default django admin. I have included the django admin app in urls.py and have verified that I am the sup

Re: Poll App part 3

2014-06-23 Thread Thomas Brightwell
Divyanshi, You may be looking at different versions of the documentation - see the bottom right of the page for what version you're on. I got caught out with that exact issue - poll/detail names when returning to the tutorial and accessing a different version. I believe they're consistent per