All Questions
10 questions
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:
...
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 ...
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 ...
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 ...
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 ...
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?
...
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 ...
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 ...
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 ...
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, ...