Question about QuerySet and Pagination

2011-09-29 Thread Felix Wagner
Hello, I'm currently trying to paginate my results from a search query. views.py: def search(request): query = request.GET.get('q', '') if query: qset = ( Q(NAME__icontains=query) ) results = Thin_Client.objects.filter(qset).distinct() else:

Re: Question about QuerySet and Pagination

2011-09-29 Thread Felix Wagner
url entry and do i have to give the poaginator the query or do I have to save the query somewhere? Also thank you for your help. On Sep 29, 3:51 pm, Tom Evans wrote: > On Thu, Sep 29, 2011 at 8:36 AM, Felix Wagner > wrote: > > Hello, > > > I'm curre

Re: Question about QuerySet and Pagination

2011-09-29 Thread Felix Wagner
Thank you very much for your help On Sep 29, 4:25 pm, Tom Evans wrote: > On Thu, Sep 29, 2011 at 3:16 PM, Felix Wagner > wrote: > > Ok, so now i have: > > .. > >             > ... > > Now if i click next page I get an empty page because: > >http:/

Django + Ajax/Javascript

2011-11-02 Thread Felix Wagner
Hi, I have the following model layout: class A(models.model): options = models.ManyToManyField(OptionSet, blank=True, null=True) values = models.ManyToManyField(Value, blank=True, null=True) class OptionSet(models.model): name = models.TextField(unique=True) values = models.ManyT

Python inside Django

2013-03-23 Thread Felix Wagner
Hello, currently I am writing an application that will run a daemon. However I am stuck: What I have so far: created a project called "ihe", with an app called "devices". Inside devices there is "admin.py", "forms.py", "__init__.py", "models.py", "urls.py", "views.py". There are also several

Django management call_command

2013-03-24 Thread Felix Wagner
Hello, I wrote a test management Command: def start_daemon(): pidfile_rule = "/tmp/ihe_test.pid" p = str(os.getpid()) file(pidfile_rule, 'w').write(p) while True: print "Hello" sleep(10) class Command(BaseCommand): help = 'Starts or stops the daemons' opti