using adobe forms (fdf) to create PDF

2010-08-14 Thread Sells, Fred
Does anyone have experience doing this and can share a link or a snippet.

I've got a multi page PDF with editable fields, but I want to fill the whole 
thing in from my DB and then print it.

Thanks.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: python threading admin actions weird problem

2010-08-14 Thread rahul jain
Sorry one more thing

Sometimes it starts with

check = False

Its happening at random time.


--RJ

On Sat, Aug 14, 2010 at 7:36 PM, rahul jain  wrote:
> Hi there !
>
> Some weird problem happening with admin actions.
>
> My admin action create threads which access a shared variable.
> Those threads change the state of the variable for ex
>
> check = False (a boolean)
>
> One of the thread sets it to True
>
> At this time I am done with that entire request.
>
> Now if I run the admin action again the state of the variable "check" is
>
> check = True
>
> which is not right. It should be
>
> check = False since its a completely new request.
>
> Its happening on both on development (django local server ) and
> production (Apache server).
>
> What could be the problem ?
>
> -RJ
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



python threading admin actions weird problem

2010-08-14 Thread rahul jain
Hi there !

Some weird problem happening with admin actions.

My admin action create threads which access a shared variable.
Those threads change the state of the variable for ex

check = False (a boolean)

One of the thread sets it to True

At this time I am done with that entire request.

Now if I run the admin action again the state of the variable "check" is

check = True

which is not right. It should be

check = False since its a completely new request.

Its happening on both on development (django local server ) and
production (Apache server).

What could be the problem ?

-RJ

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: mod_wsgi+Apache+Postregsql on Windows

2010-08-14 Thread Graham Dumpleton


On Aug 14, 3:39 pm, John Yeukhon Wong  wrote:
> Hi, Graham
>
> I looked at the error log and I fully understood the problem.
>
> I spent an hour trying different ways to understand the whole thing.
> Here is the result.
>
> f:/public/testproject/apache/django.wsgi
>
> //code begins here
> import os, sys
> sys.path.append("f:/public")
>
> os.environ['DJANGO_SETTINGS_MODULE'] = 'testproject.settings'
>
> import django.core.handlers.wsgi
> application = django.core.handlers.wsgi.WSGIHandler()
>
> //code ends here
>
> if I add your hello world code in this file, and restarted the apache,
> I will have hello world.
> I created a hello.wsgi (and hello.py). For each, I had to manually set
> up an alias
> For example this works
> WSGIScriptAlias /hello "f:/public/testproject/apache/hello.wsgi"
>
> I noticed that if I have two of them co-exist simultaneously
> WSGIScriptAlias / "f:/public/testproject/apache/django.wsgi"
> WSGIScriptAlias /testproject "f:/public/testproject/apache/hello.wsgi"

Wrong order as someone else pointed out. Most deeply nested URL must
be first.

> I will get nothing but the same default blue page. I looked the error
> log, nothing showed up. The access log, however, is interesting, but I
> couldn't get any information from the web.
>
> // portion of the log
> 127.0.0.1 - - [14/Aug/2010:00:48:45 -0400] "GET / HTTP/1.1" 200 12
> 127.0.0.1 - - [14/Aug/2010:00:48:46 -0400] "GET / HTTP/1.1" 200 12
> 127.0.0.1 - - [14/Aug/2010:00:49:02 -0400] "GET / HTTP/1.1" 200 2061
> 127.0.0.1 - - [14/Aug/2010:01:27:17 -0400] "GET / HTTP/1.1" 200 2061
> 127.0.0.1 - - [14/Aug/2010:01:27:18 -0400] "GET / HTTP/1.1" 200 2061
> 127.0.0.1 - - [14/Aug/2010:01:27:19 -0400] "GET / HTTP/1.1" 200 2061
> 127.0.0.1 - - [14/Aug/2010:01:27:25 -0400] "GET /testproject/ HTTP/
> 1.1" 200 2061
> 127.0.0.1 - - [14/Aug/2010:01:27:26 -0400] "GET /testproject/ HTTP/
> 1.1" 200 2061
>
> The one with 200 12 happened long before 200 2061 did. The 200 12 was
> the access record of only having one alias (either one, and not both).
> The 200 2061 is when both exist, and I reqest to access them. There is
> no error, but this 2061 code probably suggest something. Do you know
> by any chance?

That is the Apache access log file, not the Apache error log file.
Those values after HTTP status code are number of bytes returned.

This is all moot now as your original 403 error has long gone now
since you have it worked.

The error in Apache error log corresponding to 403 might have been
something like:

  client denied by server configuration: /home/grumpy/example-1/
hello.wsgi

or:

  (13)Permission denied: access to / denied

as quoted in mod_wsgi talk slides (at bottom of error page shown by
browser).

which of those you got would have been clue to what was wrong way back
at that point.

Right now I figure you probably just hadn't restarted Apache after
making some change to Apache configuration and was only later when
making other changes and you restarted it, that picked up change.

Anyway, move on, as obviously have Django default page working now.

Graham


> Anyway. These tests conclude that I have my mod_wsgi working
> correctly.
>
> I understand that there are a few disadvantage of working on a MS, for
> example: lack of daemon mode, and a bit more complicated to handle
> users and file permission than on a UNIX.
>
> I do plan to deploy the project on a UNIX server in the future, and I
> still do want to follow up with the previous discussion:
>
> So in general,
>
> 1. When I write a django project, for each project I need a different /
> apache/ and the content within? I know mod_wgics is a module we use to
> allow apache to run python but I am not clear how we actually use
> it.
>
> 2. If I am going to work on a UNIX, let say a linux distro, if I
> create a wsgi folder outside /home/ (now i am clear which one you are
> referring to...), where do you prefer? How do I link it again? I am
> not very clear from the video because I am raised in United States,
> and your Australian accent troubled me a little...I am sorry...
>
> Thank you.
>
> John

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Django comment moderation error: AlreadyModerated at /

2010-08-14 Thread Ludovico Fischer
I have encountered the same problem; the reason is that every time
models.py is imported Django attempts to register the moderator
another time.
You can do as suggested here:
http://stackoverflow.com/questions/3277474/django-comment-moderation-error-alreadymoderated-at
but it looks as if _registry is meant to be a private API.
The ideal way would be to put the registration somewhere where it is
going to be only executed once. The question is where?

Regards,

Ludovico Fischer

On Jul 19, 6:23 am, Groady  wrote:
> I'm trying to add the comments framework to a weblog I'm creating in
> Django. Adding the comments system appears to be working fine until I
> attempt to enable comment moderation.
>
> I add the following code to my models.py as per the instructions on
> the django website. My model is called Post which represents a post in
> the weblog.
>
> class PostModerator(CommentModerator):
>     email_notification = False
>     enable_field = 'allow_comments'
>
> moderator.register(Post, PostModerator)
>
> If I attempt to preview the site I get errorAlreadyModeratedat /
> with the exception The model 'post' is already being moderated. I have
> no idea why I'm getting this error as I have only just enabled
> comments and am not sure why Post would already be moderated.
>
> Happy to post any code if that may help finding the cause. Any help
> would be great.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Best practice for maintaining the "Django stack"

2010-08-14 Thread Oivvio Polite
Thanks to everyone who replied. I'll read up on virtualenv and pip.

Oivvio

-- 
http://pipedreams.polite.se/about/


-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Best practice for maintaining the "Django stack"

2010-08-14 Thread Oivvio Polite
On Fri, Aug 13, 2010 at 04:40:06PM +0200, Thomas Guettler wrote:
> 
> What kind of error do you get? Please post the traceback.
> 


..E.FEEE.E...E..
==
ERROR: Does logging work when passing in a valid file?
--
Traceback (most recent call last):
  File 
"/usr/local/lib/python2.6/dist-packages/South-0.6.2-py2.6.egg/south/tests/logger.py",
 line 44, in test_db_execute_logging_validfile
os.remove(self.test_path)
OSError: [Errno 13] Permission denied: 
'/usr/local/lib/python2.6/dist-packages/South-0.6.2-py2.6.egg/south/tests/test.log'

==
ERROR: test_apply_migrations (south.tests.logic.TestMigrationLogic)
--
Traceback (most recent call last):
  File 
"/usr/local/lib/python2.6/dist-packages/South-0.6.2-py2.6.egg/south/tests/logic.py",
 line 140, in test_apply_migrations
migration.migrate_app(app, tree, target_name=None, resolve_mode=None, 
fake=False, verbosity=0)
  File 
"/usr/local/lib/python2.6/dist-packages/South-0.6.2-py2.6.egg/south/migration.py",
 line 581, in migrate_app
result = run_forwards(mapp, [mname], fake=fake, db_dry_run=db_dry_run, 
verbosity=verbosity)
  File 
"/usr/local/lib/python2.6/dist-packages/South-0.6.2-py2.6.egg/south/migration.py",
 line 388, in run_forwards
verbosity = verbosity,
  File 
"/usr/local/lib/python2.6/dist-packages/South-0.6.2-py2.6.egg/south/migration.py",
 line 327, in run_migrations
runfunc()
  File 
"/usr/local/lib/python2.6/dist-packages/South-0.6.2-py2.6.egg/south/tests/fakeapp/migrations/0001_spam.py",
 line 13, in forwards
('name', models.CharField(max_length=255))
  File 
"/usr/local/lib/python2.6/dist-packages/South-0.6.2-py2.6.egg/south/db/generic.py",
 line 168, in create_table
self.execute('CREATE TABLE %s (%s);' % (qn(table_name), ', '.join([col for 
col in columns if col])))
  File 
"/usr/local/lib/python2.6/dist-packages/South-0.6.2-py2.6.egg/south/db/generic.py",
 line 86, in execute
cursor.execute(sql, params)
  File "/usr/lib/pymodules/python2.6/django/db/backends/sqlite3/base.py", line 
193, in execute
return Database.Cursor.execute(self, query, params)
OperationalError: table "southtest_spam" already exists

==
ERROR: test_migration_merge_forwards (south.tests.logic.TestMigrationLogic)
--
Traceback (most recent call last):
  File 
"/usr/local/lib/python2.6/dist-packages/South-0.6.2-py2.6.egg/south/tests/logic.py",
 line 200, in test_migration_merge_forwards
migration.migrate_app(app, tree, target_name=None, resolve_mode="merge", 
fake=False, verbosity=0)
  File 
"/usr/local/lib/python2.6/dist-packages/South-0.6.2-py2.6.egg/south/migration.py",
 line 581, in migrate_app
result = run_forwards(mapp, [mname], fake=fake, db_dry_run=db_dry_run, 
verbosity=verbosity)
  File 
"/usr/local/lib/python2.6/dist-packages/South-0.6.2-py2.6.egg/south/migration.py",
 line 388, in run_forwards
verbosity = verbosity,
  File 
"/usr/local/lib/python2.6/dist-packages/South-0.6.2-py2.6.egg/south/migration.py",
 line 327, in run_migrations
runfunc()
  File 
"/usr/local/lib/python2.6/dist-packages/South-0.6.2-py2.6.egg/south/tests/fakeapp/migrations/0001_spam.py",
 line 13, in forwards
('name', models.CharField(max_length=255))
  File 
"/usr/local/lib/python2.6/dist-packages/South-0.6.2-py2.6.egg/south/db/generic.py",
 line 168, in create_table
self.execute('CREATE TABLE %s (%s);' % (qn(table_name), ', '.join([col for 
col in columns if col])))
  File 
"/usr/local/lib/python2.6/dist-packages/South-0.6.2-py2.6.egg/south/db/generic.py",
 line 86, in execute
cursor.execute(sql, params)
  File "/usr/lib/pymodules/python2.6/django/db/backends/sqlite3/base.py", line 
193, in execute
return Database.Cursor.execute(self, query, params)
OperationalError: table "southtest_spam" already exists

==
ERROR: test_alter_constraints (south.tests.db.TestOperations)
--
Traceback (most recent call last):
  File 
"/usr/local/lib/python2.6/dist-packages/South-0.6.2-py2.6.egg/south/tests/db.py",
 line 245, in test_alter_constraints
db.execute("INSERT INTO test_alterc (num) VALUES (1), (2)")
  File 
"/usr/local/lib/python2.6/dist-packages/South-0.6.2-py2.6.egg/south/db/generic.py",
 line 86, in execute
cursor.execute(sql, params)
  File "/usr/lib/pymodules/python2.6/django/db/backends/sqlite3/base.py", line 
193, in execute
return Database.Cursor.execute(self, query, params)
OperationalError: near ",": syntax error

===

Re: MultiPartParserError HTTP_CONTENT_LENGTH zero when uploading a file

2010-08-14 Thread Eric Chamberlain
In our case, I've tracked the problem to the client library we are using, 
ASIHTTPRequest.  The library is occasionally sending an incorrect 
Content-Length when configured to use persistent connections.


On Aug 10, 2010, at 8:47 AM, Roger wrote:

> I'm seeing the same symptoms.  The rate is much lower than 1 in 5 -
> maybe 1 in 100 - but definitely the same error.  Were you guys able to
> make any progress on a solution?
> 
> On Aug 4, 1:17 am, hcarvalhoalves  wrote:
>> Now that someone else mentioned, yes, I believe we have the same
>> problem.
>> 
>> I run Django thru FastCGI to a Cherokee Web Server, and occasionally,
>> uploads fail to continue (the traceback shows that the code hanged at
>> consuming the input stream, then the connection got reset by the
>> client's browser, raising EOFError).
>> 
>> At first, I filled a bug against Cherokee, but it didn't turned out
>> that we were able to narrow the issue. Now I know it's not related to
>> the web server, as you run Lighttpd.
>> 
>> The only things I can think of are, a bug on FastCGI (Flup), Django,
>> or a bug only triggered when you run Django thru FastCGI.
>> 
>> I've also ran my Django install with SCGI, and with different options
>> (fork / threaded), but the intermittent error persists. SCGI still
>> uses Flup though.
>> 
>> This bug proved to be really, really hard to reproduce or track down.
>> I only get it because I run a SaaS with dozens users uploading photos
>> every day, and some requests happen to fail starting the upload and
>> end 500'ing.
>> 
>> What about filling a ticket against Django?
>> 
>> On 2 ago, 18:49, Eric Chamberlain  wrote:
>> 
>>> We have an intermittent problem when uploading files.  About one in five 
>>> uploads fails, when the MultiPartParser receives an HTTP_CONTENT_LENGTH of 
>>> zero.
>> 
>>> We are running Django with lighttpd and fastcgi, has anyone else 
>>> encountered this problem?
>> 
>>> --
>>> Eric Chamberlain
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Django users" group.
> To post to this group, send email to django-us...@googlegroups.com.
> To unsubscribe from this group, send email to 
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/django-users?hl=en.
> 

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Create files and directories from Django 1.2.1

2010-08-14 Thread Mike Dewhirst

On 15/08/2010 12:10am, Mark Mooij wrote:

Hi all,

I recently migrated from Django 1.1.1 to 1.2.1. In 1.1.1 I had an
application which imports an external python script in which a
directory and some files are created. Since the migrate this doesn't
work anymore, I get a number of IOErrors because the files (and
directory) that should be created can't be found. I've tried changing
my directories and slashes (I'm using Windows), but no success.


Have you changed anything else?

For example, are you processing the Microsoft Windows update patches 
which (for WinXP) insert extra permission steps? Have you changed your 
OS from XP to Win7?


Can you post the source of the script?



Can't I use the os python functions anymore in Django 1.2.1? In the
documentation I've read about Managing files in models but I prefer to
handle this through my external script.

I hope anybody can help me.

Thanks,
Mark



--
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: AttributeError for ModelForm

2010-08-14 Thread vikalp sahni
As you are using Multi Table Inheritance,

Django docs says you should give "related_name" attribute to all your sub
classes fields
where relation is tried to establish.

You can try changing ur Question Model to:


 class Question(QItem):
   answerObject = models.OneToOneField("AnswerObject",
blank=True, null=True,related_name="ques")

Hope it works. Just a primary thought by looking on ur code.

CarpeDiem,
//Vikalp




On Sat, Aug 14, 2010 at 3:59 PM, jcage  wrote:

> I'd like to ask for you guidance in the following matter in django:
>
> I am using the following models:
>
>class QItem(models.Model):
>isWhat = models.CharField(max_length=100, blank=True,
> choices=ISWHAT)
>slug = models.SlugField(blank=True)
>script = models.CharField(max_length=100)
>comment = models.TextField(blank=True, null=True)
>author = models.ForeignKey(User)
>
>class QuestionSet(QItem):
>items = models.ManyToManyField(QItem, blank=True,
> through='Ordering',related_name="contained")
>
>
>class Question(QItem):
>answerObject = models.OneToOneField("AnswerObject",
> blank=True, null=True)
>
>
> and their respective, most basic ModelForms:
>
>class QuestionForm(ModelForm):
>class Meta:
>model = Question
>
>class QuestionSetForm(ModelForm):
>class Meta:
>   model = QuestionSet
>
>
> In a view, calling
>
>   qset=QuestionFormSet()
>   print q
> works just fine.
>
>
> However,
>
>   q = QuestionForm()
>   print q
> throws
>
>
>Exception Type: AttributeError
>Exception Value:'NoneType' object has no attribute 'label'
>
> in Django's server. When trying it in the console, I don't get any
> errors.
>
>
> Any ideas why this is the case? Why do similar models behave so
> differently, and how could I get rid of the error?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-us...@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Long running process and time outs?

2010-08-14 Thread ydjango
I have a online user initiated synchronous process which runs anywhere
between 1-5 minutes and gives user status message at the end. It is a
very DB intensive process that reads and updates lots of mysql rows
and does many calculations. The process is run as part of a view
method.

It causes nginx to time out after 2-3 minutes with following message -
"upstream timed out (110: Connection timed out) while reading response
header from upstream".  User sees  504 gateway error on his browser.

1) How can I prevent time out. Can I ping the server via ajax or
something to prevent time out.
2) How can I display to user - progress bar or in progress indicator -
so that user can wait 3 - 5 minutes.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Can't build Django documentation

2010-08-14 Thread Ramiro Morales
On Sat, Aug 14, 2010 at 9:07 AM, DrBloodmoney  wrote:
>
> The docs [0] mention an incompatibility with the currently released
> Sphinx. I can't build right now either, and I'm too lazy to install
> Sphinx from source.
>
> [0] http://docs.djangoproject.com/en/dev/intro/whatsnext/#as-html-locally

That's and outdated and misleading note. Thanks for pointing it. I' ve
opened ticket 14111 to get rid of it.

-- 
Ramiro Morales  |  http://rmorales.net

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: mod_wsgi+Apache+Postregsql on Windows

2010-08-14 Thread CLIFFORD ILKAY

On 08/14/2010 01:39 AM, John Yeukhon Wong wrote:

I do plan to deploy the project on a UNIX server in the future, and I
still do want to follow up with the previous discussion:


I sure hope that you're not going through all this just for development. 
The Django dev server is quite sufficient for development.

--
Regards,

Clifford Ilkay
Dinamis
1419-3266 Yonge St.
Toronto, ON
Canada  M4N 3P6


+1 416-410-3326

--
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Convert php project into django

2010-08-14 Thread Jagdeep Singh Malhi
I make a project in php5, but now i want shift my project into Django.

I am able to shift my database into model.py file using this command
#django-admin.py inspectdb
and also complete the 4 Tutorial http://docs.djangoproject.com

but now want to  my shift the other php5 work into django.
Is it possible and how?
Is it any tool or help tutorials, which make my work easier?

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: How to check for m2m orphans before deleting an object?

2010-08-14 Thread Alessandro Pasotti
2010/8/13 Nick Serra 

> Look into the clear() method on many to many relations.
> Calling .clear() before a delete will remove all relations between the
> models and allow you to delete the category only. You might be
> fighting the django admin on this though, so this would be best
> implemented in a custom solution. Not sure if you could override
> delete and call the clear() function, this may trick the admin into
> keeping the related objects, or maybe do something in a pre_delete
> signal. Check out the clear function here:
>
> http://docs.djangoproject.com/en/dev/topics/db/queries/#following-relationships-backward
>
>
Thank you for your hint, I solved by following this :

stackoverflow.com/questions/1471909/django-model-delete-not-triggered
I lost the confirmation page but I can live without it.

I also tried with pre_delete signal but raising an exception will display
500 error page and I couldn't find a way to redisplay the change_list
template with a nice message.

-- 
Alessandro Pasotti
w3:   www.itopen.it

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Can't build Django documentation

2010-08-14 Thread bagheera

Dnia 14-08-2010 o 05:11:25 Kevin  napisał(a):


I tried to build the Django docs and got an error.

$ cd django/docs/
$ make html
sphinx-build -b djangohtml -d _build/doctrees   . _build/html
Running Sphinx v1.0.1
loading pickled environment... not yet created
building [djangohtml]: targets for 427 source files that are out of
date
updating environment: 427 added, 0 changed, 0 removed
/Users/haitran/Desktop/obnob_project/src/django_docs/_ext/
djangodocs.py:91: DeprecationWarning: xfileref_role is deprecated, use
XRefRole
  xrefs = sphinx.roles.xfileref_role('ref', linktext, linktext,
lineno, state)
reading sources... [ 73%] ref/contrib/gis/
commands
Exception occurred:
  File "/Users/src/django_docs/_ext/djangodocs.py", line 215, in
parse_django_adminopt_node
from sphinx.directives.desc import option_desc_re
ImportError: No module named desc
The full traceback has been saved in /var/folders/od/
odl44I41FT0yZPHQw8kT8E+++TM/-Tmp-/sphinx-err-RgDvku.log, if you want
to report the issue to the developers.
Please also report this if it was a user error, so that a better error
message can be provided next time.
Either send bugs to the mailing list at ,
or report them in the tracker at . Thanks!
make: *** [html] Error 1

The process fails when it tries to do an import:

from sphinx.directives.desc import option_desc_re

Why is there no module named desc?

I am using:
Python 2.6
Sphinx 1.0.1
Django 1.2.1
Mac OS X 10.5.8



I had a same problem while ago, when i needed offline docs. So i just used  
wget to mirror http://docs.djangoproject.com/en/1.2/


http://www.devarticles.com/c/a/Web-Services/Website-Mirroring-With-wget/1/

--
Linux user

--
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: django queryset get only one result for one column pair

2010-08-14 Thread Rohan Jain
My models are defined like this:

class Problem(models.Model):
title = models.CharField('Title', max_length = 100)
question = models.TextField('Question')

class Submission(models.Model):
user = models.ForeignKey(User)
problem = models.ForeignKey(Problem)
solution = models.CharKey()
time = models.DateTimeField('Time', auto_now_add=True)

I want to run a sql command on submission field and get the list of
submissions ordered by submission time and will include only one
result if there are more than one submissions by a same user in one
problem.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: new Django-Python can't get to sqlite

2010-08-14 Thread jose antunes
I have recently had the same issue. The problem was a python sqlite3 library
missing, by the name "_sqlite3.so". If that is missing it wont work. It can
be found if present in the python directory, under the lib_dynload/
directory.
 Like this for exemple: /usr/lib/python26/lib_dynload/_sqlite3.so
One way to solve this, is to install Python from source, after sqlite3 is
installed. The library will be automatically created and installed.
good luck!



On Sat, Aug 14, 2010 at 1:35 AM, Piotr Zalewa  wrote:

> there us many ways to do so
>
> I'd install pip from the package (rpm, right?)
> and then run "pip install pysqlite3"
> but the best would be o read about virtualenv and prepare djsngo
> environment for the project (not globally)
>
> zalun
>
>
> On 10-08-14 00:11, Tom wrote:
>
>> The opsys is rhel AS5.2.  I couldn't find "yolk" on it (that's a
>> program, right?).
>> The machine has rpms for Python 2.4&  sqlite, but I was unable to get
>> Django working with them.  I thought Python 2.5&  later versions
>> included sqlite, so I started installing all the software (Python,
>> Django) in new locations under /opt.
>>
>> I don't have a good grasp on installing stuff for Python. Is the link
>> of the django dir in Pythons's site-packages all I need to install
>> Django?  How do I install sqlite and/or pysqlite2, so that Django's
>> "syncdb" will work?  The "syncdb" error appears to say that
>> django/db/backends/sqlite3/base.py can't find pysqlite2 or sqlite3.
>> Where/how do I install them so DJango can find them?
>>  . . . . . . .
>>   File "/opt/Python-2.7/lib/python2.7/site-packages/django/db/backends/
>> sqlite3/base.py", line 34, in
>> raise ImproperlyConfigured("Error loading %s: %s" % (module, exc))
>> django.core.exceptions.ImproperlyConfigured: Error loading either
>> pysqlite2 or sqlite3 modules (tried in that order): No module named
>> _sqlite3
>>
>>
>> [myserver]$ ll /opt
>> drwxr-xr-x 8 502  502 4096 Aug 11 20:44 Django-1.2.1
>> drwxr-xr-x 6 501   20 4096 Aug 11 22:00 pysqlite-2.6.0
>> drwxr-xr-x 6 simonst root 4096 Aug 11 20:10 Python-2.7
>> [caadmin]$ ll /opt/Python-2.7/lib/python2.7/site-packages
>> lrwxrwxrwx 1 root root  25 Aug 11 21:09 django ->  /opt/Django-1.2.1/
>> django
>> -rw-r--r-- 1 root root 119 Aug 11 20:09 README
>> [caadmin]$ ll /opt/Django-1.2.1/django
>> drwxr-xr-x  3  502  502 4096 Aug 11 20:44 bin
>> drwxr-xr-x  6  502  502 4096 Aug 11 20:44 conf
>> drwxr-xr-x 22  502  502 4096 Aug 11 20:44 contrib
>> drwxr-xr-x  9  502  502 4096 Aug 11 20:44 core
>> drwxr-xr-x  4  502  502 4096 Aug 11 20:44 db
>> drwxr-xr-x  2  502  502 4096 Aug 11 20:44 dispatch
>> drwxr-xr-x  3  502  502 4096 Aug 11 20:44 forms
>> drwxr-xr-x  2  502  502 4096 Aug 11 20:44 http
>> -rw-r--r--  1  502  502  549 May 24 12:10 __init__.py
>> -rw-r--r--  1 root root  757 Aug 11 20:44 __init__.pyc
>> drwxr-xr-x  2  502  502 4096 Aug 11 20:44 middleware
>> drwxr-xr-x  2  502  502 4096 Aug 11 20:44 shortcuts
>> drwxr-xr-x  3  502  502 4096 Aug 11 20:44 template
>> drwxr-xr-x  2  502  502 4096 Aug 11 20:44 templatetags
>> drwxr-xr-x  2  502  502 4096 Aug 11 20:44 test
>> drwxr-xr-x  4  502  502 4096 Aug 11 20:44 utils
>> drwxr-xr-x  4  502  502 4096 Aug 11 20:44 views
>>
>> On Aug 13, 1:08 am, Piotr Zalewa  wrote:
>>
>>
>>> Google "install sqlite/mysql $your_operating_system"
>>> If you provide more info (result of running yolk and your operating
>>> system) we will be able to help you a bit more.
>>>
>>> zalun
>>>
>>> On 10-08-13 03:15, Tom wrote:
>>>
>>>
>>>
 It's my first time using Django&I'm unable to get the demo going. I
 would like to use sqlite (ultimately mysql).
 Python 2.7 installed ok.  Then I installed (I think) Django 1.2.1.
 The "manage.py runserver" works, but the "syncdb" fails.  How do I
 "install" sqlite or pysqlite2 (or even mysql)?  I thought Python 2.5+
 came with sqlite installed.


>>>
>>>
>>
>>
>
>
> --
> blog http://piotr.zalewa.info
> jobs http://webdev.zalewa.info
> twit http://twitter.com/zalun
> face http://www.facebook.com/zaloon
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-us...@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: django queryset get only one result for one column pair

2010-08-14 Thread Nick
http://docs.djangoproject.com/en/dev/ref/models/querysets/#distinct

Distinct() may be what you're looking for to returns distinct values
for each problem.

Or, petter yet, you could use .latest()

So Submission.objects.all().latest('problem').distinct()

http://www.djangoproject.com/documentation/models/get_latest/
On Aug 14, 8:04 am, Rohan Jain  wrote:
> Actually there may be many submissions with a user-problem pair but i
> want to list only the last one per user - problem pair.
> Like:
>
> let p1 be two problems , u1, u2 be two users and s1,s2 two submissions
> by user u1 on problem and s3,s4 by u2.
>
> so i want to get a queryset with only the last submission by u1,u2 on
> p1.
>
> On Aug 14, 5:57 pm, Kenneth Gonsalves  wrote:
>
>
>
> > On Sat, 2010-08-14 at 05:45 -0700, Rohan Jain wrote:
> > > I have a field 'submission' which has a 'user' and a 'problem'.
> > > How can i get a django queryset search result which will give a list
> > > of only one result per user-problem pair.
>
> > does your model not have a unique_together for user and problem?
> > --
> > regards
> > Kenneth Gonsalves

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Create files and directories from Django 1.2.1

2010-08-14 Thread Mark Mooij
Hi all,

I recently migrated from Django 1.1.1 to 1.2.1. In 1.1.1 I had an
application which imports an external python script in which a
directory and some files are created. Since the migrate this doesn't
work anymore, I get a number of IOErrors because the files (and
directory) that should be created can't be found. I've tried changing
my directories and slashes (I'm using Windows), but no success.

Can't I use the os python functions anymore in Django 1.2.1? In the
documentation I've read about Managing files in models but I prefer to
handle this through my external script.

I hope anybody can help me.

Thanks,
Mark

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: [HELP] To make a basecamp like - project management site

2010-08-14 Thread Casey S. Greene

You should check out Basie:
http://basieproject.org/index.html

I haven't used basecamp so I don't know if they are comparable.

Hope this helps!
-- Casey

On 08/14/2010 09:20 AM, Micheal Kang wrote:

Hi all,

I'm trying to make a basecamp(http://basecamphq.com/) like project
management site, for the simple reason that I want to have one by
myself and using it for a better project management in my company.

Based on the comparison within different python web framework, I think
django is the good choice. I'm thinking that is there any similar open
source django project in the world? Or is there any web 2.0 like
software development management which was build on django? I don't
want to reinvent the wheel.

I'd appreciate it if you would give me some suggestions about how to
get started.

Thank you,
Michael



--
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



[HELP] To make a basecamp like - project management site

2010-08-14 Thread Micheal Kang
Hi all,

I'm trying to make a basecamp(http://basecamphq.com/) like project
management site, for the simple reason that I want to have one by
myself and using it for a better project management in my company.

Based on the comparison within different python web framework, I think
django is the good choice. I'm thinking that is there any similar open
source django project in the world? Or is there any web 2.0 like
software development management which was build on django? I don't
want to reinvent the wheel.

I'd appreciate it if you would give me some suggestions about how to
get started.

Thank you,
Michael

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: django queryset get only one result for one column pair

2010-08-14 Thread Rohan Jain


On Aug 14, 5:57 pm, Kenneth Gonsalves  wrote:
> On Sat, 2010-08-14 at 05:45 -0700, Rohan Jain wrote:
> > I have a field 'submission' which has a 'user' and a 'problem'.
> > How can i get a django queryset search result which will give a list
> > of only one result per user-problem pair.
>
> does your model not have a unique_together for user and problem?
> --
> regards
> Kenneth Gonsalves

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: django queryset get only one result for one column pair

2010-08-14 Thread Rohan Jain
Actually there may be many submissions with a user-problem pair but i
want to list only the last one per user - problem pair.
Like:

let p1 be two problems , u1, u2 be two users and s1,s2 two submissions
by user u1 on problem and s3,s4 by u2.

so i want to get a queryset with only the last submission by u1,u2 on
p1.

On Aug 14, 5:57 pm, Kenneth Gonsalves  wrote:
> On Sat, 2010-08-14 at 05:45 -0700, Rohan Jain wrote:
> > I have a field 'submission' which has a 'user' and a 'problem'.
> > How can i get a django queryset search result which will give a list
> > of only one result per user-problem pair.
>
> does your model not have a unique_together for user and problem?
> --
> regards
> Kenneth Gonsalves

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: django queryset get only one result for one column pair

2010-08-14 Thread Kenneth Gonsalves
On Sat, 2010-08-14 at 05:45 -0700, Rohan Jain wrote:
> I have a field 'submission' which has a 'user' and a 'problem'.
> How can i get a django queryset search result which will give a list
> of only one result per user-problem pair. 

does your model not have a unique_together for user and problem?
-- 
regards
Kenneth Gonsalves

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



django queryset get only one result for one column pair

2010-08-14 Thread Rohan Jain
I have a field 'submission' which has a 'user' and a 'problem'.
How can i get a django queryset search result which will give a list
of only one result per user-problem pair.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Can't build Django documentation

2010-08-14 Thread Ramiro Morales
On Sat, Aug 14, 2010 at 12:11 AM, Kevin  wrote:
> I tried to build the Django docs and got an error.
>
> $ cd django/docs/
> $ make html
> sphinx-build -b djangohtml -d _build/doctrees   . _build/html
> Running Sphinx v1.0.1
> [...]
> Exception occurred:
>  File "/Users/src/django_docs/_ext/djangodocs.py", line 215, in
> parse_django_adminopt_node
>    from sphinx.directives.desc import option_desc_re
> ImportError: No module named desc
> The full traceback has been saved in /var/folders/od/
> odl44I41FT0yZPHQw8kT8E+++TM/-Tmp-/sphinx-err-RgDvku.log, if you want
> to report the issue to the developers.
> Please also report this if it was a user error, so that a better error
> message can be provided next time.
> Either send bugs to the mailing list at  group/sphinx-dev/>,
> or report them in the tracker at  sphinx/issues/>. Thanks!
> make: *** [html] Error 1
>
> The process fails when it tries to do an import:
>
> from sphinx.directives.desc import option_desc_re
>
> Why is there no module named desc?
>
> I am using:
> Python 2.6
> Sphinx 1.0.1
> Django 1.2.1
> Mac OS X 10.5.8
>

That compatibility problem (Sphinx 1.0 and 1.0.1 were releases after Django 1.2)
wea fixed on Django trunk and on the 1.2.x branch so the fix will be
included with the 1.2.2 release.

Meanwhile I think you can fix you problem in two ways, either

1. Overwrite you docs/_ext/djangodocs.py with this file

   
http://code.djangoproject.com/svn/django/branches/releases/1.2.X/docs/_ext/djangodocs.py

2. or downgrade your Sphinx installation to 0.6.x (0.6.6 is the latest ATM).

...an retry building the docs.

We still have some incompatibility details when using Sphinx 1.0.x (one because
of further fixes needed on the Django docs and one that are waiting for some
fixes on Sphinx once the 1.0 dust settles, neither of them prevents you building
the docs like the problem you are experimenting now but they cripple
a bit the links between documents), see Django tickets  [1]14033 and
[2]14085.

So you might prefer to use option 2 for now.

-- 
Ramiro Morales  |  http://rmorales.net


1. http://code.djangoproject.com/ticket/14033
2. http://code.djangoproject.com/ticket/14085

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Can't build Django documentation

2010-08-14 Thread DrBloodmoney
On Fri, Aug 13, 2010 at 11:11 PM, Kevin  wrote:
> I tried to build the Django docs and got an error.
>
> $ cd django/docs/
> $ make html
> sphinx-build -b djangohtml -d _build/doctrees   . _build/html
> Running Sphinx v1.0.1
> loading pickled environment... not yet created
> building [djangohtml]: targets for 427 source files that are out of
> date
> updating environment: 427 added, 0 changed, 0 removed
> /Users/haitran/Desktop/obnob_project/src/django_docs/_ext/
> djangodocs.py:91: DeprecationWarning: xfileref_role is deprecated, use
> XRefRole
>  xrefs = sphinx.roles.xfileref_role('ref', linktext, linktext,
> lineno, state)
> reading sources... [ 73%] ref/contrib/gis/
> commands
> Exception occurred:
>  File "/Users/src/django_docs/_ext/djangodocs.py", line 215, in
> parse_django_adminopt_node
>    from sphinx.directives.desc import option_desc_re
> ImportError: No module named desc
> The full traceback has been saved in /var/folders/od/
> odl44I41FT0yZPHQw8kT8E+++TM/-Tmp-/sphinx-err-RgDvku.log, if you want
> to report the issue to the developers.
> Please also report this if it was a user error, so that a better error
> message can be provided next time.
> Either send bugs to the mailing list at  group/sphinx-dev/>,
> or report them in the tracker at  sphinx/issues/>. Thanks!
> make: *** [html] Error 1
>
> The process fails when it tries to do an import:
>
> from sphinx.directives.desc import option_desc_re
>
> Why is there no module named desc?
>
> I am using:
> Python 2.6
> Sphinx 1.0.1
> Django 1.2.1
> Mac OS X 10.5.8

The docs [0] mention an incompatibility with the currently released
Sphinx. I can't build right now either, and I'm too lazy to install
Sphinx from source.

[0] http://docs.djangoproject.com/en/dev/intro/whatsnext/#as-html-locally

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



RE: Django Matrimonial Apps,

2010-08-14 Thread Kenneth Gonsalves
On Sat, 2010-08-14 at 12:28 +0100, Rizwan Mansuri wrote:
> I belies in open sources 100%. Anything what I will write would be
> 100% open
> source. 

in which case - where is the code - I would like to join
-- 
regards
Kenneth Gonsalves

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



RE: Django Matrimonial Apps,

2010-08-14 Thread Rizwan Mansuri
Dear Kenneth,

I belies in open sources 100%. Anything what I will write would be 100% open
source.

Riz

-Original Message-
From: django-users@googlegroups.com [mailto:django-us...@googlegroups.com]
On Behalf Of Kenneth Gonsalves
Sent: 14 August 2010 03:28
To: django-users@googlegroups.com
Subject: Re: Django Matrimonial Apps,

On Fri, 2010-08-13 at 20:08 +0100, Rizwan Mansuri wrote:
> I would appreciates if anyone would like to join for this project. I
> am
> aiming to finish this within three month with basic functionality. 

is it to be open source?
-- 
regards
Kenneth Gonsalves

-- 
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Loop over a form's choices (radio button) and render it

2010-08-14 Thread Andreas Pfrengle
Hello Bill,

thanks for your answer. However, I've never written a template filter
yet. Would you present the code of your checkboxiterator? Is there
sth. on djangosnippets?

Andreas

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: dashboard question

2010-08-14 Thread ionut cristian cucu
Sorry wrong list

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



AttributeError for ModelForm

2010-08-14 Thread jcage
I'd like to ask for you guidance in the following matter in django:

I am using the following models:

class QItem(models.Model):
isWhat = models.CharField(max_length=100, blank=True,
choices=ISWHAT)
slug = models.SlugField(blank=True)
script = models.CharField(max_length=100)
comment = models.TextField(blank=True, null=True)
author = models.ForeignKey(User)

class QuestionSet(QItem):
items = models.ManyToManyField(QItem, blank=True,
through='Ordering',related_name="contained")


class Question(QItem):
answerObject = models.OneToOneField("AnswerObject",
blank=True, null=True)


and their respective, most basic ModelForms:

class QuestionForm(ModelForm):
class Meta:
model = Question

class QuestionSetForm(ModelForm):
class Meta:
   model = QuestionSet


In a view, calling

   qset=QuestionFormSet()
   print q
works just fine.


However,

   q = QuestionForm()
   print q
throws


Exception Type: AttributeError
Exception Value:'NoneType' object has no attribute 'label'

in Django's server. When trying it in the console, I don't get any
errors.


Any ideas why this is the case? Why do similar models behave so
differently, and how could I get rid of the error?

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.