Detail view + filter

2019-02-11 Thread Thibaud MONTAGNON
Hello, I would like to know if it is posible to join a filter in a detail view ? I want to put this : def index(request): model_list = Model.objects.all() model_filter = ModelFilter(request.GET, queryset=model_list) return render(request, 'model/index.html', {'filter': model_filter}

Re: Make a loop to get request.POST information

2018-11-26 Thread Thibaud MONTAGNON
It's work ! Thanks :) -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-user

Make a loop to get request.POST information

2018-11-26 Thread Thibaud MONTAGNON
Hi, I got 3 differents input named input_1, input_2, input_3 and I want to make a loop to put them in the ddb. I try to use this code but it dosent work... row=[1,2,3] for a in row: polls = Polls.objects.create(motsclef=request.POST[*'input_'.a*]) Could you help me ? (I ju

new Django website with old mysql database

2018-10-24 Thread Thibaud MONTAGNON
Hello, I got some problems to join my mysql database to django. I install mysqlclient and I configure : #settings.py -> DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', 'OPTIONS': { 'read_default_file': '/path/my.cnf', } } } #my.cnf -> [client]