Skip to main content

Questions tagged [django]

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

Filter by
Sorted by
Tagged with
5 votes
1 answer
484 views

Python parser for attributes in a HAML template

I'm working on a feature for the HamlPy (Haml for Django) project: About Haml For those who don't know, Haml is an indentation-based markup language which compiles to HTML: ...
waitinforatrain's user avatar
4 votes
1 answer
128 views

A small protein database

I am making a small database and these are the following files. The scripts are working. How can I improve my scripts? Are there any places where a problem could occur? I have yet to write tests for ...
catuf's user avatar
  • 433
2 votes
2 answers
723 views

Django Person Model created from forms.ModelForm

This is the current iteration of my first model of a Person. The model is populated by a survey application using forms.ModelForm and a ...
Deepend's user avatar
  • 253
13 votes
1 answer
4k views

Replacement for commit_on_success

I am porting an application from django 1.4.5 to django 1.6.1. I found that commit_on_success has been deprecated. Moreover I found specific incompatibilities when ...
kasperd's user avatar
  • 277
9 votes
2 answers
28k views

Generating a unique ID for a filename

This function generates a unique id for my files, which will be stored in the database to reference them. It returns the id if unique, if not, it generates a new one. My separate file server can then ...
Sebastian Olsen's user avatar
7 votes
2 answers
4k views

Bank account model implementation in Django

There is a draft of my models.py. What can I do for code quality and readability increase? ...
Vassily's user avatar
  • 215
4 votes
1 answer
620 views

Use django engine to fill in a .html file on storage (no template) and use weasyPrint to convert it to PDF

I 'm new here. I wrote the following django code. I 'm opening, closing files here and saving them temporarily and deleting them. I tried to use Python's tempfile and was getting Permission Error and ...
Vishesh Mangla'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
2 votes
3 answers
229 views

Task-list app, which allows to add and remove tasks from list

I wrote my first web app. Please let me know what I should improve. I want to write as clean code as possible. App is about adding and removing tasks from list. Backend is written in Django, frontend ...
Damian Tułacz's user avatar
2 votes
1 answer
201 views

Reduce and condense a non standard SessionWizardView

As I'm slowly getting the hang of Python and Django I'm becoming increasingly worried about the volume/quality of code I have. This is my first time building a Python/Django Application and I'm ...
Deepend's user avatar
  • 253
2 votes
2 answers
177 views

Optimisation of a forms.py for a survey application

This is my forms.py for a small survey application I am developing. I previously posted some of my models.py. I am completely self-taught and am just looking for advice on how to improve. Any advice, ...
Deepend's user avatar
  • 253
0 votes
3 answers
6k views

Button to dynamically clone a form field

I am very new to javascript and started with a very basic add button to my django app. Everything I found was using jQuery but for only one small script jQuery seems to be a too big overhead for me. ...
user avatar