Questions tagged as 'django'

0
answers

Django with Material Desing Lite

I'm trying out some templates in django, and I'm putting together a common registration form, it's working normally when I use {{ form.as_p }} only when it's called in this way I can not customize. Example of the CDM <div class="m...
asked by 10.09.2018 / 21:46
0
answers

Detect distinction between the model chosen by the user to register

Hello, I have created some models for user registration in django 2.0 and now I need to know which one the user has chosen to register. As you can see I have the personal model (CustomUserN), legal entity (CustomCompany) and the admin model (Cus...
asked by 29.08.2018 / 19:58
2
answers

List in HTML table separated by category

I'm in a development using Python and Django and as IDE the pycharm. I have a list coming via Rest by mobile, under the name 'Athletes', and comes with the columns "name", "category", "time". I would like to list these athletes in an HTML...
asked by 20.08.2018 / 18:50
0
answers

JsonResponse of django returns empty

I am trying to make a query via ajax in django. the javscript part seems all right but when i go it returns the values in django my object always returns shift. django.jQuery(document).ready(function(){ django.jQuery('#id_produto').change...
asked by 20.08.2018 / 05:57
1
answer

Problems with using include in Django

I'm having trouble with the include function, according to the django documentation, the syntax is include(module, namespace=None) include(pattern_list) , include((pattern_list, app_namespace), namespace=None) . Source co...
asked by 18.08.2018 / 16:05
0
answers

Django Admin file upload when form is invalid

I have a field type file field in the template. In Admin, when the form is invalid, the file upload is lost and shows the error on the admin page without uploading the file. How do I do it?     
asked by 10.08.2018 / 19:21
0
answers

Problem with template inheritance in Django

I'm starting in Django. I created a html base with three divs: one at the top of the page where I placed a header, one to the left with a vertical menu and a larger one to receive the contents of the other pages. I have created the other pages b...
asked by 21.08.2018 / 04:50
1
answer

I can not access a url, either full or slug

I'm doing a Django course that uses a simplemooc platform as a study, but I stopped in a class when trying to access the details of the course that is in a separate url in a dynamic list, there is no change in the page, courses without any chang...
asked by 29.07.2018 / 20:24
2
answers

What's the difference between the MVC architecture and Django's MTV?

I would like to know if there is any difference in practice between these two architectures.     
asked by 17.10.2017 / 18:59
0
answers

Django, query and post

I need to fetch data from external DB, search for a specific ID, then populate some fields and then save a ModelForm. Something like this: def add_form_atendimento(request): if request.method == 'POST': q = request.POST.get('q', ''...
asked by 31.07.2018 / 13:47