Hi,
I am looking for the most straightforward way to introspect
the model field name a ManyRelatedManager is bound to.
from django.db import models
class Topping(models.Model):
pass
class Pizza(models.Model):
toppings = models.ManyToManyField(Topping)
def get_fieldname(manager):
Very timely. I was just looking for something like this.
One observation. When redirecting to https elsewhere in the django
code I see this call, "django.http.get_host(request)" for resolving the
host portion.
Thanks.
--~--~-~--~~~---~--~~
You received this me
magus wrote:
> I'd like to roll my own basic authentication for a web service, i.e. I
> don't want to use the contrib.auth module. If possible I'd like to
> avoid relying on the server for this. Anyone who can offer some
> pointers on how to raise a 401 on a request that doesn't contain the
> Auth
>>> from django import forms
>>> f = forms.DatetimeField(field_name='dt')
>>> f.html2python("")
>>> f.html2python(None)
Traceback (most recent call last):
File "", line 1, in ?
File
"/usr/lib/python2.3/site-packages/Django-0.95-py2.3.egg/django/forms/__init__.py",
line 779, in html2python
4 matches
Mail list logo