-
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'
These formsets are exhibiting exactly the opposite behavior that I want.
My view is set up like this:
def post(request): # TODO: handle vehicle formset
VehicleFormSetFactory = formset_factory(VehicleForm, extra=1)
if request.POST:
vehicles_formset = VehicleFormSetFactory(request…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
Hello,
I have two models:
class Model1():
name = CharField()
url = CharField()
class Model2():
model1 = ForeignKey(Model1)
user = ForeignKey(User)
zzz = CharField()
There are 5 rows for model1 in the database, these are fixed and will rarely change.
I need to display a formset…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I am trying to use inlineformset_factory to generate a formset. My models are defined as:
class Measurement(models.Model):
subject = models.ForeignKey(Animal)
experiment = models.ForeignKey(Experiment)
assay = models.ForeignKey(Assay)
values = models.CommaSeparatedIntegerField(blank=True…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
Hi,
When using inline formsets, how does one do paging? I'm using django 1.1.
The situation I'm in, is that the user needs to be able to edit the related objects quickly and easily (which is why I think I should be using an inline formset). However, there can be a more than a hundred objects to…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I have an inlineformset with a custom Modelform. So it looks something like this:
MyInlineFormSet = inlineformset_factory(MyMainModel, MyInlineModel, form=MyCustomInlineModelForm)
I am rendering this inlineformset manually in a template so that I have more control over widgets and javascript. So…
>>> More