Re: Still problems m2m, ordering, serialisation

2011-10-10 Thread Knack
Forgot to copy one line in front of the many_to_many loop: many_to_manys = obj._meta.many_to_many for many_to_many in many_to_manys: field_name = many_to_many.name # here the magic should happen # ordered_related_objs = hokus_pokus(obj, many_to_many) -- You receiv

Still problems m2m, ordering, serialisation

2011-10-10 Thread Knack
Hi guys, as I understand, m2m with intermediate model and ordering is a bit (at least) tricky: https://code.djangoproject.com/ticket/11850 I need the ordering in my serialised data. The serialiser must of course be independent of any names, so I use introspection so far. Code so far is here: de

Re: convert a web-site to a desktop app

2011-10-07 Thread Knack
Not sure if I understand what you want to do. Do you want to build a rich client application? If that's the case, you can use any GUI toolkit you want and talk to Django via web services. I use this technique building an app which needs some high performance views of structured data. I highly recom

m2m ordering doesn't seem to work as expected

2011-10-06 Thread Knack
Hi guys, from the docs I thought the following should work to get the insertion_order as default (to be recognized by serialiser etc.). The commeted lines are other unsuccessful attemps: class Thingie(models.Model): obj_id = models.CharField(max_length=32, primary_key=True) children = mod

Create singular instance with ManyToManyField input as ids

2011-09-28 Thread Knack
Hi guys, I need to create Django model instances from raw data, which comes from a dict. Example model: class Worker(models.Model): name = models.CharField() class Project(models.Model): name = models.CharField() subject = models.CharField() workers = models.ManyToManyField('Wor

Re: Django and Rich Client

2011-06-17 Thread Knack
n Fri, Jun 10, 2011 at 4:16 AM, Ovnicraft wrote: > > soaplib <https://github.com/soaplib/> > > > On Thu, Jun 9, 2011 at 1:10 PM, Knack wrote: > > >> Hi guys, > > >> I've got a prototype DB + Rich Client app and need to make a proper > &g

Django and Rich Client

2011-06-09 Thread Knack
Hi guys, I've got a prototype DB + Rich Client app and need to make a proper production app out of it. The client is written in PyQt and needs to fullfill quite some functional and performance requirements (I would really like to keep it). The client connects directly to the DB. After some though

Re: ImportError on login/logout

2008-04-01 Thread knack
I created a brand new project and app, left the default settings untouched, ran syncdb to create the user authentication tables, and created a very simple view (just returns an HttpResponse object) that requires login permission. Same error: "ImportError at /accounts/ login/: No module named login

ImportError on login/logout

2008-03-31 Thread knack
I'm using Django 96.1 and am attempting to enable the user authentication system following the directions in the Django book and website documentation. I'm also using the 'login_required' decorator to restrict all my views, so typing in any valid address should redirect me to the login screen. Unf