Skip to main content

Questions tagged [django]

Django is a Python-based framework for creating web applications.

70 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
16 votes
0 answers
869 views

Let's register that Django user

Short intro So, I've been using Django for a while now and thought it would be nice to start a simple application. In an ideal World, each app must have a way of letting its users register and that's ...
Grajdeanu Alex's user avatar
14 votes
0 answers
968 views

Django on virtual machine - watching changes in static files and autocompiling LESS without inotify

I'm setting up a Django development environment using Vagrant to run an Ubuntu virtual machine on VirtualBox. As this is a student project run mostly by very amateur coders and I want everyone to be ...
Waiski's user avatar
  • 378
11 votes
0 answers
3k views

Sending notifications with Django channels

I have project on Django wich use Django Channels. I use Django Channel for sending notifications to users who are subscribed to articles changes (adding/editing/deleting comments on article). So I'...
KIN1991's user avatar
  • 211
6 votes
0 answers
494 views

Xero API Client in Django

I'm not actually that new to writing Python. But I've no formal training and have only learnt to build applications to solve problems for my job out of necessity. Starting to bring my existing skills ...
Simon's user avatar
  • 61
5 votes
0 answers
1k views

Django Project for creating events

Before I continue developing this project, I just wanted to make sure I'm going about creating the views and tests in a "proper manner" or if I am completely fudging this up. Also, is it better to use ...
doughboy's user avatar
5 votes
0 answers
575 views

Django blog application - views, urls, models, forms

I want to learn how to create websites and I have started learning Django web framework. I think Django is very good alternative for PHP and it isn't too complex as JEE. I'm very satisfied learning ...
user avatar
4 votes
0 answers
69 views

Download Fasta protein sequences as a file from the selected categories

I have the following function in Django to download the Fasta sequences (protein) through the selected categories as a file. This works well. I would like to improve the following script. ...
catuf's user avatar
  • 433
4 votes
0 answers
93 views

Duplicate vote checking

I am new to Django and added a vote duplicate check to the tutorial application. I set a cookie in the vote view: ...
user avatar
4 votes
0 answers
998 views

Working with multiple currencies in Django

I'm working on a project where user adds many products and compare their prices, average price, minimal and many other statistics. There are two currencies for now, EUR and CZK. I'm here to ask ...
Milano's user avatar
  • 191
3 votes
0 answers
306 views

Django form for product stock, where products from the same batch must be merged

Here is the context first. I have a 'Stock' table, in which I record all the stocks with as information: the product, the ...
Tobin's user avatar
  • 131
3 votes
0 answers
49 views

Logical next step in Django newsfeed web app

I'm hoping to get feedback on my current code from someone more experienced in Django, and in the concepts I'm trying to implement. Let me preface by saying that I am a novice to Django. This is my ...
nick_rinaldi's user avatar
3 votes
0 answers
54 views

Handling System Check message identifiers with Django

Django implements a System Check framework that enables apps to perform checks on settings, runtime, etc. When creating an app, one can plug checks with the framework by following some requirements, ...
André Fratelli's user avatar
3 votes
0 answers
40 views

Command Line Utility for Starting Django Projects and Apps with Custom Files

What I'm Doing I'm writing a command line utility for starting Django projects and apps with custom files. The custom files build upon what Django offers, to make sure things like a custom auth user ...
mfonism's user avatar
  • 131
3 votes
0 answers
1k views

Product inventory database with attributes and variants

I have design a model for product apps. This is the first time I am trying to create a product's database schema and then model it in Django. My code handles the following: A product type can have ...
Serenity's user avatar
  • 201
3 votes
0 answers
55 views

Django migration script to add metadata

I made a simple django migration that adds two field to our Invoices model : first_payment and first_paying_month. ...
Taek's user avatar
  • 131
3 votes
0 answers
69 views

Django project for events of the day, grouped by keywords in common

I have made a website where people write about their day and see it analyzed. In particular, the website takes event titles and groups them together if they have any common words (after stemming the ...
Bo Work's user avatar
  • 391
3 votes
0 answers
98 views

ProfileForm that collects extra fields on User Signup

I have a signupView that shows 2 forms: SignUpForm and ProfileForm. Basically, ...
Omar Gonzales's user avatar
3 votes
0 answers
3k views

Simple auction application in Django

I'm learning backend dev and python and django1. My first app is a basic auction site. Users sign up, submit an auction, and other users bid on the auctions. I would highly appreciate any ...
user1849962's user avatar
3 votes
0 answers
5k views

Django 'Like' functionality for a post

I am implementing a like button for posts (Using a clustom Like model and the pre-defined User model from django.contrib.auth). Would appreciate hearing how I can improve this code. Also, I am ...
OhMad's user avatar
  • 133
3 votes
0 answers
2k views

Testing a Django password reset procedure

I am writing tests for the password reset flow. It involves emails, links to reset the password etc so I made a really long test. It is testing quite a lot of things. If I break up the tests then the ...
user avatar
3 votes
0 answers
39 views

Django-Python Db-access optimization

Is is possible to make this function more efficient and possibly more readable? In addition, Am I doing this right? I mean, it works, but would it be better to do a complex query (with annotations) ...
VirtApp's user avatar
  • 131
3 votes
0 answers
175 views

Converting YouTube channels to podcasts

I created a Django app that converts YouTube channels to podcasts. It uses the actual YouTube paths for the URLs. The idea is that the user can just find the YouTube address of the desired channel (...
user avatar
3 votes
0 answers
83 views

One user profile for company and person

I'm creating a web page which has two types of users with very similar permissions: Person and Company. The main difference is ...
Milano's user avatar
  • 191
3 votes
0 answers
2k views

Django form validation based on the contents of uploaded files

I have a Django form with a lot of fields, including some FileFields. I want to validate the form based on the contents of the files: they must be valid gdal datasets, and if both are present (one of ...
RemcoGerlich's user avatar
3 votes
0 answers
1k views

Implementing "day wise task management" system using Django and AngularJS

I have a Task model in Django which looks like the following: ...
pankaj28843's user avatar
2 votes
0 answers
45 views

Create a more efficient and performant csv import function with Python Django

I am creating a website for users to track their Magic the Gathering inventory. I have created some functionality to import a csv to easily add cards to their inventory. The functionality works as ...
Ross's user avatar
  • 327
2 votes
0 answers
677 views

Generate breadcrumbs from URL in Django

For Django sites with URLs structured in a hierarchical way I found it helpful to have an app to quickly transform an URL like ...
marcanuy's user avatar
  • 305
2 votes
0 answers
41 views

Set logged-in USER in a Form requiring Current User Credentials

Currently, I can set the the current_user in the views.py for a form, which requires the user...
nonamorando's user avatar
2 votes
0 answers
43 views

Google Mailer app inside Django using OAuth 2.0

I have built this Django Package which is an alternative for sending mail to users using Gmail API. Everything is working fine. But the verify(self, request) method inside ...
NikzJon's user avatar
  • 121
2 votes
0 answers
224 views

Model and form validation in class based view

In an app which it is possible to transfer money between accounts I have the following logic: View: ...
37dev's user avatar
  • 21
2 votes
0 answers
2k views

Limit choices for Django admin filter_horizontal interface

The Django ModelAdmin offers a filter_horizontal (or filter_vertical) interface for many-to-many relations, which allows the ...
djvg's user avatar
  • 161
2 votes
0 answers
36 views

Representing LXC component configuration in django

I want to represent components of LXC in django; so I defined them in models: Container, Network, Profile and Devices where each one of them have a set of attributs, but when it comes to representing ...
Knox Root's user avatar
2 votes
0 answers
554 views

Django add comment to article

I have recently finished a "django for beginners" book that ended with creating a small articles site. The last chapter adds a Comment model which is linked to <...
Chris Doyle's user avatar
2 votes
0 answers
95 views

Django Dashboard View

What does my code do? I use Django and in the following snippet, I use a class together with a TemplateView to render an HTML page. I already tried to simplify it with methods, but my code still looks ...
Joey Coder's user avatar
2 votes
0 answers
30 views

Automatically filled multiple forms in one view

I have some question because in my project I have 4 models, and one of models is parent for other 3 and they are connected to parent by foreign key. Then I have view which is used for automatically ...
Kuracha's user avatar
  • 153
2 votes
0 answers
63 views

Web app that triggers sirens on cameras in remote locations

Web-app summary: I'm a complete beginner in web development and I made a sample web application that can trigger sirens on security cameras located in remote locations. Here's the functionality seen ...
Hunter's user avatar
  • 259
2 votes
0 answers
245 views

Django authentication against Exchange server

I wrote an authentication app for Django and my worry is primarily about the security of my app. My Django authentication app uses exchangelib to authenticate ...
Greg Schmit's user avatar
2 votes
0 answers
2k views

Django Restframework: Writable nested serializer with custom behavior

Context I am trying to get some practice with Django and Django REST framework. As a toy example I want to set up a server to which I can POST results of automated test runs. In the simplest version, ...
dudenr33's user avatar
  • 281
2 votes
0 answers
106 views

Generate automatically new groups in a tournament

I'm trying to model a tournament with Python (Django) and I've got a function that assigns teams of the previous stage to the groups of the new one. The teams in the first stage are assigned manually....
Lorenzo Fiamingo's user avatar
2 votes
0 answers
167 views

Django model and views to summarize and plot an uploaded CSV

I have a simple web application where a user uploads a CSV of some dataset and some summary statistics and box plots are displayed. I heard that it is better to have so called skinny views and fat ...
awcot's user avatar
  • 21
2 votes
0 answers
232 views

Django social network application - database schema

I am writing a simple social media application in Django. I would like to know whether the following model structure is correct, or how can I improve the schema to get better performance. Do I need to ...
Arun's user avatar
  • 121
2 votes
0 answers
41 views

Making zip file with custom content per user

What I tried to do: In my main project folder I have directory downloadable_app with these files/folders inside: index.html js/app.f54b97d7097bcf4226c0.js I need ...
paul's user avatar
  • 121
2 votes
0 answers
771 views

Django Rest Framework ListAPIView - many if-s in get_queryset()

Please review my DRF ListAPIView code. There are a lot of if statements. I wonder if it's a good approach to put these if-s in <...
user3115655's user avatar
2 votes
0 answers
978 views

Apply a series of functions on Django querysets using decorators

Let me first show my models : ...
Shikhar Chauhan's user avatar
2 votes
0 answers
224 views

Django view for both AJAX and normal request

I'm starting with new project where there will be used to delete product using AJAX, but sometimes with normal request. What do you think about this view? I'm trying to make it as universal as ...
Milano's user avatar
  • 191
2 votes
0 answers
208 views

A Django EAV attempt

This seems to do the job of the EAV tables. Besides being EAV, is there room for improvement? Maybe there is something obvious, but how about indexing certain columns? ...
Simon's user avatar
  • 1,012
2 votes
0 answers
2k views

Django REST custom methods for generic views

I'm intern and work on a project where I develop DRF API that need to interact with mobile app written by my colleague with Ionic framework. We are creating new user. My view method is following: <...
Ilia_Mochalov's user avatar
2 votes
0 answers
71 views

oAuth2 token creation when registering new user

I am working on Django Rest Framework for backend to develop android app. My project is about Food Delivery System. My app has user login and registration feature. I preferred oAuth2 for token based ...
Serenity's user avatar
  • 201
2 votes
0 answers
50 views

Platform to buy services, where you can receive notifications

I am developing a website, where people can buy services, also it has a notification system; I do this in views to show log in and sign up, on index.html. views.py ...
Alfredhb.q's user avatar
2 votes
0 answers
2k views

A web crawler for scraping images from stock photo websites

I created a web crawler that uses beautiful soup to crawl images from a website and scrape them to a database. in order to use it you have to create a class that inherits from Crawler and implements 4 ...
davegri's user avatar
  • 153