0
votes
0answers
11 views
Django multistep form wizard model form
Is there any way to use a Form Wizard in Admin interface for add/edit Models.
(using Django 1.5.2)
for example:
--models.py--
class AModel(models.Model):
fieldA = ...
0
votes
1answer
24 views
Name is not defined in Django model
I have a Django app with the following in its models.py file:
from django.db import models
class Event(models.Model):
date = models.DateField()
name = models.TextField(max_length=60)
...
0
votes
1answer
25 views
Mutiple checkboxes in Django
I'm finding this much trickier than I think it should be. I Have Django 1.4.5 and using the model prototypes and templates want to create the option to have multiple checkboxes. I'm keen to use the ...
0
votes
1answer
19 views
Python System Call Cannot Find File, Error Running on Apache Server
I'm trying to run an os.system() call from my Python class to source a file I have stored in the file. I am connecting to a server from an Android application and running a method in Django to run a ...
1
vote
1answer
15 views
How to distinguish responses by mime-type in Django class-based view?
In class based view I can define method for GET or for POST. Can I somehow define special methods for different mime-types of responses?
Use case is - make AJAX site usable even if JS is turned off.
0
votes
1answer
25 views
importing from a django 1.4 project
I recently came across the edx project and was fiddling with it. Something that I tried to play with was the idea of importing its features into another project.
the basic structure of this project ...
0
votes
1answer
17 views
hg mercurial - how to merge in 3 way merge window in shell
I have less experience with mercurial. i am having this problem:
I push everytime from my windows pc in tortoiseHG-Workbench to repo. works fine.
I pull to my server from repo with hg pull .... ...
0
votes
1answer
44 views
Best way to use get_absolute_url by foreign key field
What is the best way to create get_absolute_url function for Comment if I need url like this: "/article_url#comment-id"?
My models:
class Article(models.Model):
url = models.CharField()
def ...
0
votes
1answer
19 views
Google App Engine's RequestHandler.initilize() in Django?
I am wondering if Django has something similar like RequestHandler.initialize() from the Google App Engine that gets called before every request and I can initialize it on my views.py?
0
votes
0answers
59 views
Django Expected indent block error
I am starting to learn django. I tried small authentication code and have got the following error:
expected an indented block (views.py, line 25)
I have everything indented with spaces(5 spaces ...
1
vote
2answers
49 views
MySQL password in Django
I just started on a Django project and in the settings.py file of the project, the daabase section looks like this:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql', # Add ...
1
vote
1answer
34 views
Capturing objects in Django Url
Suppose I have this model:
Class animals(models.Model):
name = models.CharField(max_length = 20)
and I make 3 objects of it, say ob1, ob2, ob3 with ob1.name = cat, ob2.name = dog, ob3.name = cow
...
1
vote
2answers
33 views
How to intercept content stdout in Pyhon?
I make a custom command in Django where make some output to stdout.
How I can intercept stdout make some changes(for example add prefix) and write to stderr?
This is test task so do not pay attention ...
0
votes
1answer
36 views
Django, filter and group query results by a field
I have this working but I'm sure there must be a better method
The context is a movie/television app so there are titles (movies/tv) and people who act in each, many to many relationship.
I have a ...
0
votes
1answer
30 views
Django template dir strange behaviour
I am really having problems to set TEMPLATE_DIR correctly after searching through bunch of topics and trying various things.
Here are my project settings:
#settings.py
DEBUG = True
TEMPLATE_DEBUG = ...