Re: referencing models before syncdb

2013-12-28 Thread thinkingpotato
Check if that is not something you're looking for: https://docs.djangoproject.com/en/1.5/ref/signals/#post-syncdb On Wednesday, December 25, 2013 7:18:45 PM UTC, vinaya...@iiitd.ac.in wrote: > > I have an actions.py file which defines custom actions for the admin page > for one of my models. It

Re: Accessing attributes of the current view in Django middleware?

2013-12-28 Thread thinkingpotato
ficiency, it's always a little bit an overhead to every request, no matter you need it or not. Have a look at this code: https://github.com/thinkingpotato/django-permissionsx/blob/v0.0.6/permissionsx/middleware.py There's some caching done etc. And it's been tested in production.

Re: Accessing attributes of the current view in Django middleware?

2013-12-28 Thread thinkingpotato
Hey, Try along these lines: def process_view(self, request, view_func, view_args, view_kwargs): view = get_class(view_func.__module__, view_func.__name__) view.my_attribute While `get_class()`: from django.utils import importlib def get_class(module_name, cls_name): tr

Re: New version of django-permissionsx

2013-10-04 Thread thinkingpotato
feedback. What I'm interested in particular is how it works with > different Django/Python/apps configurations and if the syntax/API is easy > to follow. I would be even more happy if you found it useful in your > projects ;) > > Docs: > https://github.com/thinkingpotato

New version of django-permissionsx

2013-10-04 Thread thinkingpotato
your projects ;) Docs: https://github.com/thinkingpotato/django-permissionsx PyPi: https://pypi.python.org/pypi/django-permissionsx/ Cheers, Robert -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and