http://stackoverflow.com/questions/30425468/django-updating-members-of-modelformset-with-unique-fields
The situation - I have a model and inline formset like:
class ProductImage(models.Model):
product = models.ForeignKey('Product')
display_order = models.PositiveSmallIntegerField(default=
ntrib.auth.views.password_reset_done'.format(ns))
(admittedly this assumes you have imported all of the auth urls into the
same namespace)
On Monday, 19 August 2013 12:27:57 UTC+1, anentropic wrote:
>
> This seems a bug in Django... the `reverse` function is passed the name of
This seems a bug in Django... the `reverse` function is passed the name of
a view function, not a named url, so the fact that the url it's being asked
to match is included under a namespace shouldn't matter?
(here because I just hit the same problem myself)
On Saturday, 27 July 2013 08:20:18 UT
Awesome, I had exactly the same problem and by chance we're on
Rackspace too.
I added the two lines to that file exactly as shown in the Django
docs, restarted httpd, and now Sorl can handle thumbnails with unicode
chars in them.
cheers
On Jun 27, 4:44 pm, Federico Capoano wrote:
> Thanks for y
in the docs there is this paragraph:
"Note also that Django stores signal handlers as weak references by
default, so if your handler is a local function, it may be garbage
collected. To prevent this, pass weak=False when you call the signal’s
connect()."
Can someone please explain to me what it m
Well, it seems pretty clear from a few further tests that you can't
import models at all from within a middleware.
Would be nice if that limitation was documented
On Apr 16, 9:12 pm, anentropic wrote:
> if it helps, my exclusive_boolean_fields function looks like:
if it helps, my exclusive_boolean_fields function looks like:
def exclusive_boolean_fields(model, eb_fields=[], with_fields=[]):
setattr(model, '_exclusive_boolean_fields', eb_fields)
setattr(model, '_exclusive_boolean_with_fields', with_fields)
post_save.connect(exclusive_boolean_hand
Hi,
I tried to write my first middleware today and seem to have failed
horribly.
Basically I have made a view decorator almost identical to the csrf
ones, that sets a flag on the view function. My middleware then checks
this flag and if missing it runs another function (which deletes some
session
{{ formset.media }} will output the script tags *and* the css link
tags
On Feb 22, 11:53 am, anentropic wrote:
> A formset should have a 'media' attribute which should include all the
> media from the widgets in the forms which make up the formset, so in
> the template yo
A formset should have a 'media' attribute which should include all the
media from the widgets in the forms which make up the formset, so in
the template you should be able to just
{{ name_of_formset_var.media }} in the head of your page to output the
necessary script tags.
On Feb 17, 3:13 pm, kker
I've been wondering this too, the docs aren't clear.
On Nov 30, 12:50 am, Continuation wrote:
> In the doc (http://docs.djangoproject.com/en/dev/ref/models/options/
> #order-with-respect-to) it is mentioned that order_with_respect_to
> marks an object as "orderable" with respect to a given field
I have a query like:
Product.objects.filter(categories__in=cat_ids).distinct()
where categories is a m2m field.
As I understand it this loads products which have belong to ANY of the
categories in cat_ids
How would I load only products which belong to ALL of the categories
in cat_ids?
(is this
18, 12:06 pm, anentropic wrote:
> I am trying to use a CommaSeparatedIntegerField in one of my
> models... there doesn't seem to be a suitable widget for editing this
> field though?
>
> Seems like one of the 'select multiple' widgets would be an obvious
> choice.
I am trying to use a CommaSeparatedIntegerField in one of my
models... there doesn't seem to be a suitable widget for editing this
field though?
Seems like one of the 'select multiple' widgets would be an obvious
choice. SelectMultiple seems the default widget for it in admin, but
it renders an e
ok, thanks!
On Oct 5, 12:09 pm, Russell Keith-Magee
wrote:
> On Mon, Oct 5, 2009 at 6:31 PM, anentropic wrote:
>
> > So I just have to hard-code the feed urls in my templates?
>
> In short, yes.
>
> The feeds framework predates the introduction of named URLs in Djang
So I just have to hard-code the feed urls in my templates?
On Sep 30, 3:23 pm, anentropic wrote:
> Anyone? Is it possible to reverse those urls?
>
> The feeds framework implementation seems like a dirty hack to urls.py
> (but otherwise works great!)
>
> On Sep 29, 4:57 pm,
Anyone? Is it possible to reverse those urls?
The feeds framework implementation seems like a dirty hack to urls.py
(but otherwise works great!)
On Sep 29, 4:57 pm, anentropic wrote:
> I've been setting up feeds using the syndication feed framework.
>
> I have a line like this
I've been setting up feeds using the syndication feed framework.
I have a line like this in my urls.py:
(r'^feeds/(?P.*)/$', 'django.contrib.syndication.views.feed',
{'feed_dict': feeds}),
How do I avoid hard-coding the feed urls into my template?
I want to {% url django.contrib.syndicati
Hi,
I am trying to extend the comments app so that I can use an alternate
view for post_comment in some situations (i.e. posting via ajax...)
This question is probably largely down to relative python ignorance on
my part, but
1) I have made a new app in my project and set COMMENTS_APP in
se
Any feedback on this?
I have the same problem... I have some of my own custom tags working
but the ones that come with django-tagging it seems like render does
not get called
I've tried moving things around, putting them in the same file as my
tags that do work etc. __init__ of the custom tag i
20 matches
Mail list logo