Questions tagged as 'django'

1
answer

Django 2.0.9 - MultiSelectFormField - Parameter to make non-mandatory

I want to make the MultiSelectField field not mandatory. When I do not choose any of the options the validation is accusing Required field . I've tried using the parameters blank = True and null = True, but still continue to accuse the field...
asked by 12.11.2018 / 17:07
0
answers

Staticfiles Django Google Cloud Appengine

I'm studying the Google Cloud infrastructure a bit and am experiencing a problem with Django's static files in production. Everything is working normally when I leave DEBUG = True . When I put DEBUG = False and do deploy, it does...
asked by 31.10.2018 / 22:52
1
answer

Reorder elements of an on-screen search

I have an application in django and need to reorder the elements of the screen when the user decides to sort by date, popularity, etc. I would not like to submit a new search every time the user selects a filter, I believe the best way would...
asked by 31.10.2018 / 16:02
1
answer

Relationship Django Models

I have a model named Item and I made a call Compra . I have been able to relate several items to each purchase, but I do not know how to relate the quantity of each item to each purchase. class Item(models.Model): nome = models....
asked by 09.11.2018 / 13:27
1
answer

How to pass data from one input to another with HTML and Python?

Well, I have a problem with my application and I can not find the solution on the internet. I'm doing a web application where I need to get some information from the user and to improve the experience, I'm separating the form into several pag...
asked by 28.10.2018 / 21:18
0
answers

Change DjangoForm fields using JS

class AdditionalForm(forms.ModelForm): class Meta: model = Additional_information fields = [ 'have_disability', 'name_of_disability' ] have_disability = forms.ChoiceFiel...
asked by 16.11.2018 / 17:11
1
answer

Javascript variable in the Django template

But I'm not sure how to do that. Example of what I want to do: <!DOCTYPE html> <html> <body> <script> let showMessage = false; </script> {% if showMessage %}...
asked by 24.10.2018 / 22:52
0
answers

Get the user ID logged in Python

I'm having a project in Python and Django. Where I have an INSCRIPTION class, and in this table I would like to record in the "Person" column the user ID logged in the application, in the "Events" column record the event that he is doing registr...
asked by 29.10.2018 / 13:29
0
answers

Field for multiple checkboxes for Django model 2.1

Hello, I would like to know how I can do and store in a field multiple checkboxes for my model. I tried the following: models.py: n_dentes = ( ('18', '18'), ('17', '17'), ('16', '16'), ('15', '15'), ('14', '14'), ('1...
asked by 22.10.2018 / 22:18
1
answer

RabbitMq running on an external server

I have a Django web application that uses celery for asynchronous tasks and RabbitMQ for broker management. When both are running on the same machine, the tasks run smoothly, however the application will run via the internet and is installed on...
asked by 26.10.2018 / 16:29