Re: unbound method __unicode__() error in Admin page with ManyToMany

2009-11-11 Thread django_fo...@codechimp.net
I honestly dont know how that got in there. I probably copied/pasted it in there by mistake, but that was indeed the problem. Thanks! On Nov 11, 12:33 pm, Karen Tracey wrote: > On Wed, Nov 11, 2009 at 12:06 PM, django_fo...@codechimp.net < > > codech...@gmail.com> wrote: >

Re: unbound method __unicode__() error in Admin page with ManyToMany

2009-11-11 Thread django_fo...@codechimp.net
n2.5/django/db/models/fields/ __init__.py", line 306, in formfield defaults = {'required': not self.blank, 'label': capfirst (self.verbose_name), 'help_text': self.help_text} File "/var/lib/python-support/python2.5/django/utils/functional.py", line

unbound method __unicode__() error in Admin page with ManyToMany

2009-11-11 Thread django_fo...@codechimp.net
I have a class, A, that has a ManyToMany reference to another class, B like so: class B(models.Model): name = models.CharField() def __unicode__(self) return self.name class A(models.Model): name = models.CharField() bees = models.ManyToManyFi

Auth/Session modules and JSON views

2009-09-24 Thread django_fo...@codechimp.net
This is probably a dumb question, but I am working on some JSON views that I need to apply authentication too. I thought maybe I could use the Django built-in auth/session apps to wrapper the JSON View methods, but when I do testing I am not seeing the session id being sent back. I tried hitting

Re: Thoughts on nested Model references and JSON serialization

2009-02-13 Thread django_fo...@codechimp.net
Obviously I was tired when I wrote this. I apologize for the grammatical errors, which were a-plenty. On Feb 12, 5:51 pm, Russell Keith-Magee wrote: > On Thu, Feb 12, 2009 at 10:17 PM, django_fo...@codechimp.net > > > > wrote: > > > I wanted to get the communities thou

Re: Thoughts on nested Model references and JSON serialization

2009-02-13 Thread django_fo...@codechimp.net
/wolfram.kriesing.de/blog/index.php/2007/json-serialization-for-django. On Feb 12, 5:51 pm, Russell Keith-Magee wrote: > On Thu, Feb 12, 2009 at 10:17 PM, django_fo...@codechimp.net > > > > wrote: > > > I wanted to get the communities thoughts on this subject.  I a

Thoughts on nested Model references and JSON serialization

2009-02-12 Thread django_fo...@codechimp.net
I wanted to get the communities thoughts on this subject. I am working on a simple site that has news articles, each of which has a reference to a User object provided by django.contrib.auth that is the author of the news article. This is done right now using the following code: class NewsArtic

Admin list exclusions

2009-01-21 Thread django_fo...@codechimp.net
I have a class called Entry that has a one-to-many relationship with itself like: class Entry(models.Model): title = models.CharField(max_length=255) body = models.TextField() author = models.ForeignKey(User) date_published = models.DateTimeField() parent = models.ForeignKey('

Re: new django user - no images appear on my site :(

2009-01-13 Thread django_fo...@codechimp.net
You know, its really sad to see the disdain like this thrust upon a newbie. We all know you are superior, and that your understanding of Django and python is massive, and we bow to your intellect, but there are hundreds if not thousands of pages of reading, and we newbs are sorry if we don't read

Re: Newb needs help with tracking variables in Templates

2009-01-05 Thread django_fo...@codechimp.net
On Jan 5, 5:56 pm, bruno desthuilliers wrote: > On 5 jan, 23:39, "django_fo...@codechimp.net" > wrote: > > > I have a pretty simple template that needs to print some data in a > > bunch of table rows.  I have done something like this: > > > > >

Newb needs help with tracking variables in Templates

2009-01-05 Thread django_fo...@codechimp.net
I am very new to Django and Python. I have been working on a pet project that has a table of rows. My thought was to have a counter in the template, and use modulus to write out the row start/stops out. The code looks like this: {% if my_art_list %} {% count = 0 %} {% for art i

Newb needs help with tracking variables in Templates

2009-01-05 Thread django_fo...@codechimp.net
I have a pretty simple template that needs to print some data in a bunch of table rows. I have done something like this: {% if my_art_list %} {% count = 0 %} {% for art in my_art_list %} {% if count%3 = 0 %} {% endif %}