Iframe, IE and request.session data

2012-11-05 Thread James DeMichele
Hello, I’m hoping someone here might be able to help me figure out how to fix this issue I am seeing with IE and an iframe. I’m using Django 1.4 and there is some data that I store on the session like such: request.session[“KEY”] = “VALUE” And then on a different request, I am able to

Re: Can prefetch_related() look up reverse relationship?

2012-02-07 Thread James DeMichele
That's awesome, thanks for sharing! -Jamie On Tue, Feb 7, 2012 at 7:55 AM, Jonathanz wrote: > I found it! The correct query shoud be > > Book.objects.all().prefetch_related('price_set') > > > On Feb 7, 5:38 pm, Jonathanz wrote: > > I'm using

RE: ManyToMany problem

2011-09-29 Thread James DeMichele
to “RestaurantHoodMap”, and viola, it works. Can anyone explain why the string notation won’t work for a model in a different module? Thanks! -Jamie *From:* James DeMichele [mailto:james.demich...@redfin.com] *Sent:* Thursday, September 29, 2011 12:34 PM *To:* django-users@googlegroups.com

Re: ManyToMany problem

2011-09-29 Thread James DeMichele
many_related_manager class ManyRelatedManager(superclass): File "C:\Python\lib\site-packages\django\db\models\fields\related.py", line 501, in ManyRelatedManager if rel.through._meta.auto_created: AttributeError: 'str' object has no attribute '_meta' Please help if you can! Thanks.

RE: ManyToMany problem

2011-09-29 Thread James DeMichele
Thanks for the response, that's a completely inaccurate statement. Here's an example from the Django docs: https://docs.djangoproject.com/en/1.3/topics/db/models/#intermediary-manyt omany The Group object has through="Membership". Although, one thing I notice is that it looks like in the

ManyToMany problem

2011-09-29 Thread James DeMichele
Hello, I have created my own ManyToMany table, but am getting an error when I attempt to get a related item from one of my Models. Any insight would be greatly appreciated. I am on Django 1.3.1. *models/restuarant_hood_map.py* class RestaurantHoodMap(models.Model): restaurant =

Re: Django User (auth) question

2011-08-01 Thread James DeMichele
12:43 pm, bruno desthuilliers > <bruno.desthuilli...@gmail.com> wrote: > > On Aug 1, 7:28 am, James DeMichele <james.demich...@redfin.com> wrote: > > > > > Hello, > > > > > I have a question about tweaking the django.contrib.auth.models.User > class

Django User (auth) question

2011-08-01 Thread James DeMichele
Hello, I have a question about tweaking the django.contrib.auth.models.User class. I noticed that Django doesn't allow for overriding of attributes of "Field" instances, such as "email" or "first name". Yet, I'd like to my email and first name fields to be required and I'd also like to have my

RE: Django vs Postgres Connection

2010-12-17 Thread James DeMichele
This sounds more like a Postgresql settings problem than a Django/Python specific problem. I'd suggest taking a look at your pg_hba.conf file. It can be finicky, so you probably want to reference this if you haven't already: http://www.postgresql.org/docs/8.4/static/auth-pg-hba-conf.html -Jamie