Im sorry for uncomplete message
in satchmo/apps/l10n/models.py
class AdminArea(models.Model):
...
country = models.ForeignKey(Country)
every *_set that means usually a reverse relation:
country.adminarea_set.all()
is equivalent to
AdminArea.objects.filter(country=country)
More in the past paragraph of subchapter
https://docs.djangoproject.com/en/1.4/topics/db/models/#be-careful-with-related-name
before the next title
Hynek
On 27 bře, 04:15, hynekcer <[email protected]> wrote:
> in
>
> you find
>
> class AdminArea(models.Model):
> ...
> country = models.ForeignKey(Country)
>
> On 26 bře, 16:54, Thomas <[email protected]> wrote:
>
>
>
>
>
>
>
> > In satchmo/satchmo/apps/satchmo_store/contact/forms.py, there is a
> > reference to 'adminarea_set'. Where would this be defined? (See
> > snippet below)
>
> > def area_choices_for_country(country, translator=_):
> > choices = [('',translator("Not Applicable"))]
>
> > if country:
> > areas = country.adminarea_set.filter(active=True)
> > if areas.count()>0:
> > choices = [('',translator("---Please Select---"))]
> > etc, etc...
>
> > Many thanks,
> > Thomas
--
You received this message because you are subscribed to the Google Groups
"Satchmo users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/satchmo-users?hl=en.