Crispy Forms css_classes

2013-11-11 Thread sbrandt
Hello, I'm using crispy forms with zurb foundation. Since crispy-forms-foundation isn't that advanced, I need to develop it further by myself. So I've encountered a problem. I need to change the CSS classes of the surrounding div dynamically: The template (django_crispy_forms/templates/

Re: list(form) makes my form not safe anymore

2013-08-31 Thread sbrandt
Ah, I see. Sorry. Applying list() to the form at the end of the function does not affect the form.is_valid() you're doing before or the form at all. So your problem must be another kind. So I must repeat what someone said in your other thread: Please describe your problem further. Why doesn't

Re: list(form) makes my form not safe anymore

2013-08-31 Thread sbrandt
If you don't want a particular field to display, then don't include it into your form. Not showing it doesn't exclude it from form processing, so it's a security risk. You can exclude fields with the exclude attribute of the forms inner Meta class: https://docs.djangoproject.com/en/dev/topics/

Re: list(form) makes my form not safe anymore

2013-08-31 Thread sbrandt
As far as I understand, you want to iterate over all form fields. Someone correct me if I'm wrong, but I've never seen anyone trying to achieve this via list(form). Anyway, forms are iterable, so you can iterate over them in the templates: {% for field in form %} {{ fi

Form Inheritance best Practice: Manipulating Fields of the Base Class

2012-11-05 Thread sbrandt
This is a very theoretical question about best practice. I and surely most other users know how to do this in *any* way, but I'm interested in the *best *solution, if it exists. Given that: - I am inheriting a given form I cannot modify directly, let's say the AuthenticationForm - I w

Re: perfectionists... motto doesn't fit

2012-10-11 Thread sbrandt
Those people who are able to analyse a motto with the sufficient sense of humour and subtleness and do not break it down to single incoherent parts. Sorry to be rude, but what's the point of this question other than trolling? In my case, I _am_ a perfectionist with deadlines and it fits pretty m

Re: Django and LDAP

2012-09-16 Thread sbrandt
:43:56 UTC+2 schrieb Tony: > > Thank you sbrandt. I found the same thing, but i don't know how to use it. > Where do i need to copy the files and do i erase some lines of the code or > not, to make them as comments. I'm trying but i am not succeeding at making > it work..

Re: tastypie - some feedback / comments

2012-09-13 Thread sbrandt
After evaluating some API creation frameworks, namely tastypie, pistion and django rest framework, it came out that I would never use the first two in my projects. Sorry that I can't provide more detailed information, but it's about a year ago. Both had issues with their architecture and philos

Re: Django and LDAP

2012-09-13 Thread sbrandt
Did you know there is django-auth-ldap which is a custom backend for authenticating users through LDAP? http://pypi.python.org/pypi/django-auth-ldap/ I don't see the point why you fiddle around with writing code on your own. I'm using django-auth-ldap since one and a half year in production and

Re: Is this possible using the Django ORM without raw SQL?

2012-07-29 Thread sbrandt
ange to the database backend using outer joins, doesn't it? So my problem isn't likely to be solved more elegant in the near future. Thanks for all! :) Am Samstag, 28. Juli 2012 23:15:37 UTC+2 schrieb akaariai: > > On 28 heinä, 15:39, sbrandt wrote: > > > On 28

Re: Is this possible using the Django ORM without raw SQL?

2012-07-28 Thread sbrandt
Am Samstag, 28. Juli 2012 14:04:29 UTC+2 schrieb akaariai: > > On 28 heinä, 12:20, sbrandt wrote: > > Hello, > > > > for the first time ever how to compile a query with the Django ORM :/ > > > > There are two Models: The second model has a foreign key t

Is this possible using the Django ORM without raw SQL?

2012-07-28 Thread sbrandt
Hello, for the first time ever how to compile a query with the Django ORM :/ There are two Models: The second model has a foreign key to the first model and a type, where the combination of "first model and second model's type" is unique. Let's say type 1 are dogs, type 2 are cats and every mod

Re: Generic Views with flair?

2012-05-09 Thread sbrandt
There is another way: Class Based View decorators: http://djangosnippets.org/snippets/2668/ -- 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. To unsubscribe from this group, send

Re: Is it a good practice to delegate views based on GET / POST?

2012-04-13 Thread sbrandt
Sorry, answered directly to author by accident. Isn't this achieved by using class based views? from django.views.generic import View class MyView(View): def get(request, *args, **kwargs) ... def post(request, *args, **kwargs) ... In addition, you can use the built-in

Re: Mod_Wsgi + Apache 2.2 + Threads + httplib2

2012-02-13 Thread sbrandt
mod_wsgi doesn't support print, does it? Its usage should raise an exception. -- 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. To unsubscribe from this group, send email to djan

Re: Is the django coummity converging on a preferred REST API package?

2012-01-07 Thread sbrandt
Thumbs up for Django REST framework. While being younger than tastypie and piston, it has some more cool features besides the mentioned creation of doc above. It also creates a HTML debug interface for every resource and follows the class based views and form validation paradigms of django making

Pythons subprocess with WSGI + Apache mpm-worker: IOError 4

2012-01-02 Thread sbrandt
Hello, I hope it's okay to if I just share a StackOverflow link here because I've explained the problem in detail there: http://stackoverflow.com/questions/8678897/ I hope any of you guys encountered the same error because I don't know what to do next. It works on a second virtual machine running