possible model relations?

2010-10-06 Thread alecx
Hello, I try to build a kind of call tracker app. The call intaker creates a new item (main model) and makes some notes (subject, issue and which printer nr, customer, technician,... all with modelfields) all in one view. But I am struggling with the model relations and the form saving. I cannot sa

MultiFileInput widget

2010-10-16 Thread alecx
Hi, I have only a few weeks django/web experience and currently struggling with a specific problem. I dont know how to solve it. and therefore I ask you experts. I have an Itemform (ModelForm) with a fileupload field. But I want to upload multiple files with multifileinput (djangosnippet:583). Can

Re: MultiFileInput widget

2010-10-19 Thread alecx
Okay, I am answering myself. Maybe this info helps someone else. I created a fileupload model with foreignkey relation. # models.py class Item(models.Model): serialnr = models.CharField(max_length=5, blank=True) class Fileupload(models.Model): item = models.ForeignKey(

distinct in autocomplete

2010-10-20 Thread alecx
Hello, how do I get only distinct values of that query in the autocomplete field: def autocomplete_techlastname(request): if request.GET.has_key('q'): tags = Item.objects.filter(techlastname__icontains=request.GET['q']) [:5] return HttpResponse('\n'.join(t

how do i get access to json data?

2010-11-23 Thread alecx
Hello django users, after several try outs, i am not able to figure out how to access data in a serialized object. E. g. how do I get the name "Douglas", "Adams" in the example: http://docs.djangoproject.com/en/dev/topics/serialization/#deserialization-of-natural-keys In javascript i can get e. g

Re: how do i get access to json data?

2010-11-23 Thread alecx
   "pk": 1, > >    "model": "store.book", > >    "fields": { > >        "name": "Mostly Harmless", > >        "author": ["Douglas", "Adams"] > >    } > > } > > '''

tinymce

2010-12-17 Thread alecx
Hi, I integrated django-tinymce into my application. Now I can edit the text in the former textarea field. But when I submit the form, the field is empty. I am not able to figure out why the text I wrote in the editor field is not submitted. Has someone a tip for me? Thanks in advance. -- You re