he one-to-one relationship between
parent and child is called 'parendmodel__ptr__id', and the admin is
looking for 'childmodel_set-0-parentmodel_ptr' in the formset data.
Why?
On Mon, Feb 13, 2012 at 10:43 AM, Demetrio Girardi
<demetrio.gira...@gmail.com> wrote:
> I have a child model that I w
I have a child model that I wish edit inline in the admin site. When
trying to save edits I get a MultiValueDictKeyError:
"Key 'childmodel_set-0-parentmodel_ptr' not found in "
It seems to me the admin is trying to get the reference to the parent
model from the form data. How can I fix this? Do
On 10 Feb 2012 at 14:50, Patrick Wellever wrote:
> I want to make it a choice field that justs lists all the files in, for
> example,
> 'templates/flatpages/page_templates/', so the user can see what templates are
> available and just
> choose one from a select list.
you can read the
I have a single django project, deployed on two separate installations
of Apache + python + mod_wsgi.
The first installation has python 2.6 and everything works fine.
The second installation has python 2.7. With this one, a few things
work correctly - namely django's debug 404 pages, the login
I can't find a reference for ManyRelatedManager in the django docs. I have
a few questions that you can ignore if there is in fact a reference somewhere
and you can point me to it.
If my model is
class Model(models.Model):
many = models.ManyToManyField(OtherModel)
what does this do?
This is not a django-specific question, but I couldn't find anything
useful on the subject and have no better place to ask.
Let's say I want to put "welcome {{user.first_name}}" on top of my
template. In many languages, "welcome" has to be declined by gender. I
have no use for the user's gender
I need to read data from an "external" database table from my django
project. I am not interested in modifying the data, only reading it.
Of course I would like to create a django model for the table, because
it makes life so much more easier.
I have already done this previously, however in this
Upon reading the django tutorial, I was under the impression that you should
have the project root folder in your pythonpath, so that each app is available
for import in modules, e.g. you can do
import myapp
However, my IDE seems to prefer putting its root in the pythonpath, so you'd
have to
Static files are not handled by django, so you would have to configure your
webserver for authentication and access control.
You can however create a django view that picks stuff from the filesystem
and serves it as attachment:
My project has a bunch of text embedded deep within the html markup in
templates that I need to translate. The text, imo, belongs to templates and it
has no place in the application logic.
>From what I understand, localization in templates is limited to variables,
which is not useful to me.
10 matches
Mail list logo