Most voted "django" questions
Django is an open source Web 2.0 application framework written in Python. Its main objective is to facilitate the creation of complex database websites.
Learn more…1,067 questions
Sort by count of
-
1
votes1
answer444
viewsUpdate values from a chart using Django
I’m playing in a solo project to make a website to show the current coffee quotation along with a line chart of the daily variation of this price as a function of time. I get the price value of…
-
1
votes1
answer229
viewsHow to make a date filter in Django
I need to do a filter on the views where you bring me the date of the last 30 days. And I’m not sure how to do that.
-
1
votes1
answer127
viewsDjango Application Deploy with Apache
I made a Django application and am doing some deployment tests on a virtual machine with Ubuntu Server 18.04, before deploying it in a VPS. I made the settings correctly, but I’m having a problem…
-
1
votes0
answers72
viewsGiving error Import at /post/new/ No module named 'blog.Forms'
In this line: C: Users Fer Gomes djangogirls mysite blog views.py in , line 5 the code from django.shortcuts import render from django.utils import timezone from .models import Post from…
-
1
votes0
answers242
viewsDjango Admin football game registration
Help me please. I’m learning Django. I have a website that registers games from my hometown. It follows example to understand doubt: Championship: Vacation 2017 Has 2 groups (Group 1 and Group 2) I…
-
1
votes1
answer2061
viewsDjango: Modulenotfounderror: No module named
I have the following problem between two apps, in which I call a model from an app (app1) in a view from another app (app2) Projeto ├ APP1 └ APP2 View from APP2: from projeto.app1.models import…
-
1
votes1
answer56
viewsFind file in templates directory
In versions up to 2.2.5 of Django I put my html files that were passed in the view as follows : myapp templates myapp index.html But in Django 2.2.6 and 2.2.7 when I do this gives the following…
-
1
votes2
answers629
viewsHow to implement a priority queue that still meets other requirements?
I need to implement a priority queue, this queue in addition to the priority, needs to take into account some other requirements, such as switching between services and professionals, and of course…
-
1
votes2
answers233
viewsClasses within classes (Python/Django)
Ola, I’m starting to study python on account of Django. I have a question that many may consider trivial but I don’t know the answer. I am building a Model with the following features: class…
-
1
votes0
answers365
viewsReceive user input using Django Class Based Views
If you need more information about the problem (urls.py, complete code of the template, etc.) just ask me to post, just not to pollute the post too much. General description of the problem: Update…
-
1
votes1
answer57
viewsRelationship Problems between "Table" and Django User
I am working with Django to develop an application for a Help Desk, I have the following situation: I have a table named "Unit" that will be the table responsible for separating my systems into 4 or…
-
1
votes1
answer272
viewsConnect Sql Server 2014 to Django 2.2
I am trying to connect the Sql Server database to Django but am getting the following error(The connector I am using is Django-pyodbc-Azure): Django.db.utils.Interfaceerror: ('IM002', '[IM002]…
-
1
votes3
answers354
viewsHow to hide sensitive information in Django?
In my Django project I have some sensitive variables, which I need to 'hide'. In general, save them in a file . env and read them with DADO_SENSIVEL = os.environ.get("DADO_SENSIVEL", default="")..…
-
1
votes0
answers14
viewsInvalidation of multiple caches efficiently in Django
In my project I own the following model: class Item(models.Model): month = models.DateField('month', null=False, blank=False, db_index=True) kg = models.BigIntegerField('kg') tags =…
djangoasked 7 years, 3 months ago Danilo Favato 379 -
1
votes1
answer84
viewsCan I extend the admin form to my page?
I have a form created and displayed with the admin the way I want...but it is a site to fill out user registration, so the user does not have access to admin, I want the admin form to be used…
-
1
votes1
answer957
viewsTake input from view
I have a form with the inputs: email, name and surname. The email will always have a defined format, so I want to take the elements and make it fill automatically in the other fields, example: User…
-
1
votes1
answer92
viewsWhere to place mathematical models in Django
I’m new to the subject, so forgive the ignorance. I am developing an application using python in Django, where from user informed data the application will return certain values. But I am in doubt…
-
1
votes1
answer519
viewsIDE to the Django?
Good evening guys, I’m having big problems with some ides, and I need your advice. I’m trying to program web projects in python, so I installed pycharm to work... It’s a great IDE at first, but it…
-
1
votes0
answers386
viewsMenu Generico using Python, Django and tree structure
I am creating a generic menu where a parent can have 1 child and so on (structure of a tree) and I have arisen a doubt of how to render the parents in a menu and when pass the mouse over the parent…
-
1
votes1
answer40
viewsDjango returning to Valueerror
I am creating a project to send emails, but I am doing some tests and I came across the following problem: The view send_mail.core.views.index didn’t Return an Httpresponse Object. It returned None…
-
1
votes0
answers97
viewsDjango + Postfix password reset email is not sent
I set up a server with my application Django and now I’m trying to enable password reset via email using the postfix as an e-mail server. I started configuring my views and testing if everything was…
-
1
votes1
answer76
viewsAuthentication Django allauth
I created a user authentication with Django allauth, works in parts, signup, login, gets saved in admin all right. When I do user registration and password works perfect, but when I fill user, email…
djangoasked 3 years, 10 months ago Luciano Lopez 11 -
1
votes0
answers388
viewsDjango MEDIA_URL is not working
Until yesterday it was running smoothly the route /media/ in DEV, and I went to make a production deploy and a production dump for my environment to match, and started giving this problem. I also…
-
1
votes1
answer22
viewsDjango+Python Weasyprint printing only one PDF page
Good morning guys, I have a code already developed, however, I have tried in all ways to break page and bring all pages to this document, someone can help me with this case? I’m using python 2.7 I…
-
1
votes1
answer162
viewsSave user location
I am trying to save the user’s location in a database, to subsequently generate reports on users by country, state and region. Initially I downloaded bases that contained the name of all the cities…
-
1
votes2
answers368
viewsDjango Rest compare user 'sector' id with publication 'sector' id
Well, I’m messing with an API and I want it to return content only when the user sector is equal to the publishing sector API for publications: The user has a sector field also equal to this, and…
-
1
votes1
answer48
viewsHow to change is_staff when I click href?
I have a table with users in HTML with id and name, by default when register a person it comes with is_staff=False. I want when I click the Authorize link to switch to is_staff=True, how do I do…
-
1
votes0
answers246
viewsSending email picking up data FK Django
I have group and profile, in my register the person chooses the group and this group has the responsavel_id, I want to pick up and send a confirmation email to the responsible of that group that the…
-
1
votes1
answer613
viewsLogin to Django
I have a login page, I need to check who’s logging in, Example: if you are responsible for group A, direct to the page with all users of group A, if you are responsible for group B, to the page of…
-
1
votes1
answer501
viewsLegacy of Templates not working
I’m trying to create blocks within my base template (index.html), but apparently the block is not used. index.html {% load static %} <!DOCTYPE html> <html lang="pt-br"> <head>…
-
1
votes0
answers728
viewsGet modal data from Django
I have a list of customers on the screen of the responsible person, in case he presses to deny the client, opens a modal with the field Reason for him to fill. I want to take what was typed in this…
-
1
votes0
answers41
viewsFirebase Messaging with Django
I am a long time already getting caught up with it. After hours and days I could see a light at the end of the tunnel. I’m using a plugin for Django, this one: https://github.com/xtrinch/fcm-django…
-
1
votes1
answer45
viewsId from the inserted email
I have a form with only the email label for the user to fill. If the email already exists I want to redirect it to the edit page. How do I get the user id from the email he typed? I did a test as…
-
1
votes2
answers3598
viewsImages with Django - exhibition and Static
I’m a beginner in Django and I’m developing a simple blog. I know that the configuration of static files needs to be different for the development and production environment, but I always get caught…
-
1
votes0
answers501
viewsUpload images to Django
How to upload more than 1 image in Django Admin ? this is my mode : from django.db import models class Imovel(models.Model): titulo = models.CharField('Titulo', max_length=200, blank=False) slug =…
-
1
votes1
answer268
viewsWorking with Data on ngInit
I have an input in my date form. Whenever the user modifies the date, it will be updated in Django and return another date. When the user enters the screen, I already bring the date in the following…
-
1
votes1
answer178
viewsError in Django form
I’m trying to run a form in Django but it returns this error form = TopicoForm() raise ValueError('ModelForm has no model class specified.') this is my models class Topico(models.Model): titulo =…
-
1
votes0
answers55
viewsDjango Channels Routing not working
I wanted people to access my URL normally like before (install Channels) localhost/home/minha-slug and detected the socket messages within that route. I want to create Groups so I don’t keep sending…
-
1
votes0
answers81
viewsPush Notification and Django problems (vapid_private_key)
I was able to reproduce an example with the repository pywebpush to make the push notification. After breaking my head to understand, I was able to do it. However, when I tried to integrate with my…
python django push-notification progressive-web-appsasked 6 years, 11 months ago Guilherme IA 1,414 -
1
votes1
answer90
viewsDjango Models with default value in another branch
I have a field that I added to another branch (which has status developing) calling for money, with default value: 0.00 in the model User. However, it is not yet being used in the production branch.…
-
1
votes1
answer2812
viewsConfigurations environment timezones Django postgres linux
Good morning to all. I have a website (Django) in a Linux hosting service with SQL Postgre bank that is in New Jersey (USA). Users are in Brazil, therefore I have a difference of Timezone. I’m sure…
-
1
votes1
answer119
viewsGrouping values in Django
I’m having a little trouble grouping some information from separate models. For example: I have 3 models, a call Category, another call Group and another call Tools. These tables will get the name…
-
1
votes2
answers174
viewsDoubt when ranking using Jango!
I’m making a site of a game using Jango and I want to make a ranking based on the score of all users! For now it’s like this: py views.: def index(request): perfis =…
-
1
votes1
answer102
viewsHow to add methods to a Queryset?
I have a model defined in Django. I would like to add to this model a method that returns me part of a mounted query (a Queryset). That is, a method I want to define a method that affects the…
-
1
votes3
answers213
viewsColoring line background(Row) on Django admin
I have a code that is working, but not totally with what I want, it is coloring only the selected cell, I want to color the whole line depending on the status of the column.. follows the code:…
-
1
votes1
answer331
viewsProblem in Django’s send_email function
Good afternoon! I have the following code in views.py: def email(request): if request.method=='POST': form = ContactForm(request.POST) form.email = request.POST.get('email', '') form.subject =…
-
1
votes1
answer108
viewsDjango tests are not recognized
When executing the test commands of Django, no test is recognized. My file structure is as follows: Eagle/ eagle/ __init__.py settings.py urls.py wsgi.py dashboard/ __init__.py admin.py apps.py…
-
1
votes1
answer219
viewsHow do I display variables on a Django page?
I am new to Django and am taking some information from a web page using lxml. I would like to know how to display the values on my website. import requests from lxml import html from…
-
1
votes1
answer85
viewsUrls accumulating in DJANGO
My urls are accumulating. When I pass via tag a[href="exemplo"] he sends it to url http://localhost:8000/index/, but if I click again on some other link from the same menu, it will redirect to…
-
1
votes0
answers24
viewsError loading a video and creating an object in Django
My function in Django will receive a video from my site, is working normally. So I created the function create: def create(self, request): Video.objects.create(file=request.data['file'],…