Re: SSL Middleware

2006-10-09 Thread mukappa
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

django.forms.DatetimeField.html2python(data) throwing AttributeError

2006-08-23 Thread mukappa
>>> 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

Re: Rolling my own basic authentication?

2006-08-26 Thread mukappa
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

Introspecting a ManyRelatedManager

2011-03-11 Thread mukappa
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):