On Jun 7, 11:55 pm, Alex Gaynor wrote:
> On Sun, Jun 7, 2009 at 9:23 AM, simonecare...@gmail.com <
>
>
>
> simonecare...@gmail.com> wrote:
>
> > I'm on SITE5.
>
> > I've just created a symbolic link to PIL from my PYTHON PATH.
>
> > I can import PIL module, but now I get this error:
>
> > The _im
You should retrieve file from request.FILES, not request.POST.
On Dec 4, 2:57 pm, guptha wrote:
> Hi group ,
> I am getting error like "Key 'fathers_photo' not found in
>
> forms.py
> class FatherProfileForm(forms.Form):
> fathers_photo = forms.ImageField(required=False)
> fathers_mobile
Suppose I have the following in app 'app'.
from django.db import models
class Test(models.Model):
"""
>>> v = "Hello, world!"
>>> import pdb; pdb.set_trace()
"""
Running manage.py test app will drop me to an interactive debugger
mode but no output. How to execute the usual p, j, s
n xterm, and drive
> >> pdb from there,
> >> without fiddling with stdin, stdout, and stderr at all. (This would
> >> definitely be a cool
> >> addition to pdb, if it's not already there.)
>
> >> And, of course, you can always sprinkle in code to ap
I suppose you can do something like:
Property.objects.filter(
city=t, Q(category__isnull=True) | Q(category=c), Q
(status__isnull=True) | Q(status=s)
)
On Dec 16, 9:17 am, Osiaq wrote:
> Yes, this one is working properly.
> Actually I can use i.e
>
> properties = Property.objects.filter( Q(city
I see. I think this is probably you are looking for:
params = ['city', 'category', 'status']
kwargs = dict([(p, request.GET.get(p)) for p in params if
request.GET.get(p)]) # use just the request params whose value is not
empty string
Property.objects.filter(**kwargs)
On Dec 16, 12:40 pm, Osiaq w
Hi,
It seems that if I split a URL with unnamed capturing groups into
different urls.py files, urlresolvers.reverse(..) doesn't work as
expected. For example:
--- root urls.py ---
(r'^foo/(.*)/', include('foo.urls'))
--- foo/urls.py ---
url('^(.*)/$', blackhole, name='foo_1')
When I do urlresolv
Given the following block of code:
--- models.py ---
from django.db import models
from django.db.models.signals import post_save
class Animal(models.Model):
category = models.CharField(max_length=20)
class Dog(Animal):
color = models.CharField(max_length=10)
def echo_category(sender, **k
>> from animal.models import Dog
>>> Dog.objects.get(pk=1).category
u'omnivore'
On Apr 8, 7:14 pm, Matthias Kestenholz
wrote:
> On Thu, Apr 8, 2010 at 1:04 PM, Phui Hock wrote:
> > Given the following block of code:
> > --- models.py ---
> >
On May 6, 4:22 am, Shawn Milochik wrote:
> This is a bad idea for multiple reasons. Don't do it.
Huh, care to explain, please?
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
Hi,
This question has been asked a few times, but is there a general set
of best practices one should follow to secure Django admin site? A
quick check on some of the Django powered websites leave /admin/ open
to public access, and some don't even use https for login form
submission.
Although only
> * Only allow HTTPS (to the admin, and perhaps to the entire site).
> * Don't use "/admin/" -- I usually use a separate subdomain like
> "backend.example.com", or sometimes just a different root (I often see
> "nqzva" -- figuring out why is left as an exercise for the reader :).
> * Limit access b
Hi,
I have just released an experimental django-pobject, an expressive and
concise permission module for django views at goo.gl/L6h7D. It is
inspired by Q object of django.db. It supports bitwise operators AND ,
OR , XOR and invert ' ~ ' for complex permission construction. For
example, you can do
13 matches
Mail list logo