-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I've been using django-mptt in my project for a while now, it's fabulous. Recently, I've found a need to override a model's save() method that uses mptt, and I'm getting an error when I try to save a new instance of that model:
Exception Type: ValueError at /admin/scrivener/page/add/
Exception Value:…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I'm getting the error:
Exception Value: (1110, "Column 'about' specified twice")
As I was reviewing the Django error page, I noticed that the customizations the model User, seem to be appended to the List twice.
This seems to be happening here in django/db/model/base.py in base_save():
values…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I've been struggling to deploy Django application on Amazon EC2 using Bitnami Djangostack for the last couple of days. When I go to http://dewey.io I see the default bitnami page (/opt/bitnami/apache2/htdocs/index.html), however, when I open http://dewey.io/portnoy, I get 'Internal Server Error'…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
when i run development server it works very well, even an empty project runing in mod_wsgi i have no problem but when i want to put my own project i get an Internal Server Error (500)
in my apache conf i put
WSGIScriptAlias /codevents C:/django/apache/CODEvents.wsgi
<Directory "C:/django/apache">
Order…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
when i run development server it works very well, even an empty project runing in mod_wsgi i have no problem but when i want to put my own project i get an Internal Server Error (500)
in my apache conf i put
WSGIScriptAlias /codevents C:/django/apache/CODEvents.wsgi
<Directory "C:/django/apache">
Order…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I am trying to sort/narrow a queryset of objects based on the number of comments each object has as well as by the timeframe during which the comments were posted. Am using a queryset.extra() method (using django_comments which utilizes generic foreign keys).
I got the idea for using queryset…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
Hello guys, I have the following queryset:
subscribers = User.objects.values('email', 'username').filter(
Q(subscription_settings__new_question='i') |
Q(subscription_settings__new_question_watched_tags='i',
marked_tags__id__in=question.tags.values('id'),
tag_selections__reason='good')…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
Let's say I have a site where Users can add Entries through admin panel. Each User has his own Category he is responsible for (each Category has an Editor assigned through ForeingKey/ManyToManyField).
When User adds Entry, I limit the choices by using EntryAdmin like this:
class EntryAdmin(admin…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I have the following Django models:
class Foo(models.Model):
title = models.CharField(_(u'Title'), max_length=600)
class Bar(models.Model):
foo = models.ForeignKey(Foo)
eg_id = models.PositiveIntegerField(_(u'Example ID'), default=0)
I wish to return a list of Foo objects which have…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
Hi all,
I try to get a list with distinct into the forms.py like this:
forms.ModelMultipleChoiceField(queryset=Events.objects.values('hostname'), required=False).distinct()
In the python shell this command works perfect, but when trying it in forms.py leaves me a blank form, so nothing appears…
>>> More