Questions tagged as 'django'

1
answer

How to link the Forms created in Django with the forms already created in the HTML template?

I started to see about forms in Django, except that I had already created the forms with all the required% as required in my project's templates . Is there a way I can bind each inputs to a form already created in the template so that...
asked by 13.05.2014 / 18:44
2
answers

Access related table columns via ORAN DJANGO

How to access the object user and its attributes after a join ? This is my query Idea.objects.select_related("user").values("author_id").annotate( qtd=Count('author_id')) Example of a result: <QuerySet [{'author...
asked by 22.11.2018 / 15:29
1
answer

Django Admin: Change display format of a date field

In Admin , my application shows the date by changed_listview on January 19, 2017. How do I display the date in the form DD/MM/AAAA ?     
asked by 30.10.2017 / 19:53
1
answer

TypeError: expected string or bytes-like object DateField

I'm having a very annoying problem in Django to work with date. I am sending from my angle a date that I select in a input data . In my view , I convert the date to this format: 2017-10-13 When I try to update in my DateFie...
asked by 01.11.2017 / 15:17
1
answer

Customize Django Admin

I have 2 classes, one that is the Division and another that is Group. In the group I have the FK for division. I want to register a Storage in the Django Admin and select the Group I want the group to appear and divide it into the same sel...
asked by 22.01.2018 / 16:37
2
answers

How to Create an Auto Increment in Django other than pk

I am creating a memo system with django and it is working fine, but I need to put a self-increment field other than pk. I have this field in my models. Memo = models.IntegerField() I need it to already receive the value of either the id or...
asked by 16.08.2017 / 14:38
1
answer

How to link a different style sheet from the base template style sheet in django

Let's say that we have the following template as the basis of a project in django (Here it will be called base.html ): {% load staticfiles %} <html lan="pt-br"> <head> <link rel="stylesheet" type="text/css" href="{%...
asked by 22.08.2017 / 23:57
1
answer

Dependency version control [closed]

Usage python , Django on a server with CloudFoundry installed. There, I keep my requirements.txt with all dependencies of my application and, for security, I always keep the exact name of the version of each plugin to...
asked by 14.08.2017 / 18:53
1
answer

Django and Oracle database (accessing your views via ORM)

Hello, despite the self explanatory title. I'll detail my doubt below. I have a pre-existing Oracle database, I integrated it with django by configuring the default connection in settings and running manage.py inspectdb > _models.py. So cr...
asked by 24.05.2017 / 04:58
1
answer

Application form with Python and Django

I'm starting my studies with Python and Django. After creating several simple CRUDS, I tried to create a more complex form using several classes, but I was not successful. I want to create a screen for typing orders with the customer informat...
asked by 07.03.2017 / 02:36