Django is an open source Web 2.0 application framework, written in Python. Its primary goal is to ease the creation of complex database-driven websites.

learn more… | top users | synonyms | django jobs

0
votes
0answers
4 views

Creating a full tree of dependent fixtures in Python

I'm creating fixtures in a Django project using factory_boy. It's easy to create an model instance so that it also creates an instance of a related model. This can go on as long as you need; each ...
0
votes
0answers
14 views

A good way to modify and submit data using javascript?

I'm using django as my web framework. What I want to achieve is this: There is some plaintext data stored in the database. The plaintext data has some customized formatting. Upon loading the 'edit' ...
0
votes
3answers
19 views

Django, build long queryset automatically

I've got a model with many fields. I'd like to build a queryset that selects the objects which have blank fields from a predefined list of fields. (Any of the fields, not all) Say: ...
0
votes
0answers
3 views

django cms error: 'LocaleRegexURLResolver' object has no attribute '_regex_dict'

I have just configured a fresh install for the django-cms app following the tutorial at https://django-cms.readthedocs.org/en/2.4.0/getting_started/tutorial.html Everything worked very smooth during ...
0
votes
1answer
7 views

Adding an object_id for a FK in a class based view from a kwargs

I'm writing a very simple Comment app. For a bunch of reasons, I need to write my own here instead of using a great product like Disqus. So, I have a page and on that page, special users can make ...
1
vote
1answer
17 views

Django - POST request not retrieved correctly

I'm working on a inventory control in Django and i want a form to control the action that will be made. If a record for the product already exist, it should update the quantity. If it doesn't exist, ...
0
votes
0answers
18 views

Alternative to multiple database router in Django?

I'm exploring the usage of multiple databases in a Django app I'm writing, and one thing popped out at me with the models.py file. I generated my models.py by using the inspectdb command, and its ...
0
votes
1answer
22 views

table specific data in django models

Where to store table specific data in django models ? Here is the scenario I am making a forum. In each thread, there will be following two kinds of visitors. Total Visitors Current Visitors My ...
0
votes
1answer
10 views

Django Operational Error 1405 Upon syncdb

I'm trying to move over from SQLite3 to MySQL, after much difficulty I finally got MySQL-python working however when I try to run ./manage.py syncdb I get an error OperationalError: (1045, "Access ...
0
votes
1answer
14 views

How to query multiple Django models describing denormalized tables

I'm trying to extract information from a number of denormalized tables, using Django models. The tables are pre-existing, part of a legacy MySQL database. Schema description Let's say that each ...
0
votes
0answers
8 views

hide label in django admin fieldset readonly field

I have a really annoying issue that I can't hide a label in the admin if the field is readonly: class Observable(Model): constraints=ManyToManyField('Constraint') class ...
0
votes
0answers
7 views

Figuring out how to send data to more than one client from server for instant messaging

I made a small instant messaging app for Django. It works by sending requests to the server every x seconds to check for new messages when a chat is open. I'd like to change this to update whenever ...
0
votes
0answers
8 views

Django - Why do South datamigrations always generate the same unique uid?

In my current application, I am running a data migration using South that populates some items with categories, and then deletes two now-obsolete categories Part of the application's functionality is ...
0
votes
1answer
23 views

HTTP 500 error on POST

I am following instructions from here How can I login to django using tastypie to create a UserResource that can be used to login to my django user. However, I am running into HTTP 500 error when I ...
0
votes
1answer
16 views

Cannot get static files for admin to work

Like the title says, everything 404s with: Page not found (404) Request Method: GET Request URL: http://localhost/static/admin/css/base.css Using the URLconf defined in djcms.urls, Django ...
0
votes
0answers
19 views

One table per month in django

I'm looking for a way to divide tables with logs of user actions in Django. The site features e-books, with reader and I need to track views in catalog, what users read and what they buy. I'm afraid ...
-1
votes
0answers
35 views

How to pass a sorted list to client side in python [on hold]

I have a sorted list sorted by its first element. For example: [[1,'string1'],[3,'string2'],[7,'string3']] I want to send this string to a ajax js script on the client side and receive it as an ...
-1
votes
1answer
18 views

Django variables to HTML strings

So I have passed in strings with Django to my HTML template. def media(request, media_id): specificMedia = get_object_or_404(Stream, pk=media_id) channel = str(specificMedia.channel) ...
0
votes
1answer
17 views

KeyError 0 when trying to traverse session dictionary in Django

I'm trying to traverse the session variable to print out all of its contents. for s in request.session: print str(s) The resulting error is as follows KeyError at /<app ...
0
votes
1answer
22 views

HTML Creating variable URLs

So I've been banging my head against the wall for a while now on this problem. Here is what I'm doing: Creating a Django website that populates different pages with Twitch livestreams. It's a learning ...
0
votes
0answers
20 views

Why is quering via a django QuerySet much slower than just using a cursor in Django?

THE SIMPLE VERSION: Why is raw SQL in Django more efficient than the QuerySet interface? SOME DETAILS: I have a query that returns ~ 700,000 (could be more) rows from a PostgreSQL database. Each ...
0
votes
2answers
19 views

Django correct applications distribution

After reading through How do you divide your project into applications in Django? and Django documentation about applications I am still not sure whether I should make or not a new application for ...
0
votes
0answers
8 views

Monkeyrunner & Django

I have got a good idea about monkeyrunner and now thinking to use. Before that, I need to know the following things. After clicking Signin button (through monkeyrunner) of my android app, how I can ...
0
votes
0answers
13 views

Fixing Memory Leak in Django + Scikit-learn

How do you diagnose and fix memory leaks involving Django and Scikit-learn? I'm working on a Django management command that trains several text classifiers implemented using scikit-learn. I'm using ...
1
vote
1answer
24 views

Empty url in urls.py

I have a project with several views e.g. - index, contacts and about. And I want url www.aaa.net links to index view, www.aaa.net/about to about view and so on In project urls.py I wrote url(r'^$', ...
0
votes
1answer
23 views

Can Django do multi-thread works?

I have a question, that can Django do multi-thread works? Here is what I want to do: click a button on a web page, then there are some functions in model.py starts to run, for example, crawl some ...
0
votes
1answer
12 views

Dynamically loading BlobProperty images on Appengine

First, I'm extremely new to coding and self-taught, so models / views / DOM fall on deaf ears (but willing to learn!) So I saved images into a database as blobs (BlobProperty), now trying to serve ...
0
votes
0answers
5 views

Populate dropdown list by another dropdown list in django with formsets

I have as follows, I have a model Producto that one field is a foreign key to another model called Categoria like this: class Categoria(models.Model): nombre = models.CharField(max_length=500) ...
0
votes
0answers
14 views

How to combine api to reduce http request

I am working on a mobile site, for which we are using SOA format. Thus for all different set of data we have written APIs using django-rest app. Now for a single page we have to make multiple http API ...
0
votes
2answers
18 views

Creating Django sessions

I am facing a problem while building a Django web app. I want that if a user logs into his account, his session should be stored and when he agains visits the login page ,he should be redirected to ...
-1
votes
0answers
9 views

Django Site on apache

I am deploying a django website on apache, i was able to get the content of the page loaded. Each page was being loaded with a template. the template does not seems to be displaying on the apache ...
1
vote
1answer
17 views

django query two tables

I am very new to django and have working through a bunch of the tutorials but they all seem to stop short of actually having the django site code on how to do more complex queries from the database. ...
1
vote
2answers
14 views

Node properties not created when using neo4django

I have a Model in django created with neo4django. class Person(models.NodeModel): """ Persons of a Company """ email = models.EmailProperty(required=True, unique=True, indexed=True, ...
1
vote
1answer
13 views

Django cache does not get refreshed

I've added a simple caching to my web application and when I delete or add new object the cache does not get refreshed after the peroid of time (2 minutes) that I've set. It looks like it froze. When ...
1
vote
1answer
14 views

Django-south ValueError during a datamigration

I'm making some updates on system built with Django, and now i'm having some trouble with a south datamigration. I have a model Cargo, which has a Foreign Key to auth.User, and now i want to add a ...
0
votes
2answers
27 views

Concatenate HTML String

I want to concatenate a HTML string. I'm building a modifiable url (not for the page, but for an internal api). I'm using Django [if that helps] urldata = ...
0
votes
1answer
9 views

User Authorization in Django, database/cache check

I am developing a django app where users have private group discussion topics. So, a user can only access a topic-page if he is an authorised member tagged in the topic. So the frontend goes like ...
0
votes
0answers
19 views

Can I specify multiple types for a field in the django model (models.py)?

I have a approverList which can either be mongo.ListField(mongo.StringField()) or mongo.StringField(). How can I define this in models.py? Thanks
2
votes
1answer
25 views

Making sure elements changed by javascript remain changed when user returns to page without refreshing

Sorry for the wonky title, had a hard time describing the problem. Also, sorry if this is duplicate it was hard to search for. I'm trying to implement a relatively simply AJAX call on a button press ...
0
votes
0answers
8 views

Accessing related objects, of related objects via Django orm

I'm working on a membership based website in which members have access to different articles based on their organisation's membership access rights. The articles are organised in themes(topics) and ...
1
vote
0answers
17 views

Django cant save file locally ([Errno 13] Permission denied)

I am using the django package django-facebook, which runs into an error when it attempts to save ta user's profile picture locally. I am running Apache and have tried chown'ing the folder to www-data, ...
0
votes
2answers
22 views

Django: How can I call a view function from template?

I have a question on how to call a view function from a template HTML button? Like an onclick function? Here is the template: <input id="submit" type="button" onclick="xxx" method="post" ...
1
vote
1answer
11 views

How to access a modelform's Foreignkey attribute from within a template?

Description: I would like to know how to access a ForeignKey's field within template code. Given the sample models.py code: class Publisher(models.Model): name = models.CharField(max_length=30) ...
0
votes
0answers
16 views

Subtotals in a tree structure

I'm trying to find the best way to implement subtotals. I have a fairly large Employee tree. Each Employee has a salary field. I need subtotals for the salary going down the tree in order to make a ...
0
votes
0answers
11 views

Django + mongoengine, connect to mongo when used as auxillary database

I'm trying to connect to mongodb using mongoengine. Mysql is my default database, and I have 'mongoengine.django.mongo_auth' in my installed apps. I removed the 'AUTH_USER_MODEL = ...
0
votes
1answer
12 views

Django Appengine Emails not Arriving

and thank you for taking the time to read my question. I am developing a site on Google AppEngine using django. I would like to send emails via mail.send_mail which is declared in ...
0
votes
2answers
36 views

Django forms.FileField(required=True) is passing validation if empty

I have a Django Form (not a ModelForm) with a required FileField. According to the FileField documentation, validation of the FileField should validate that non-empty file data has been bound to the ...
0
votes
2answers
19 views

django slice string in template

index.html <td>{% if place or other_place or place_description%}{{ place}} {{ other_place}} {{place_description}}</td> This is displaying all the data in template.I want to truncate the ...
0
votes
1answer
35 views

Django - how to redirect to index page upon logout?

I'm trying to implement a simple page redirect to the index page if user authentication fails. Imagine that I have two paths: www.xyz.com/app/ www.xyz.com/app/user The first renders the index ...
0
votes
1answer
17 views

query and display the data in template

models.py class ReportType(models.Model): report = models.ForeignKey(Report) title = models.CharField('Incident Type', max_length=200) type = models.ForeignKey(Types, null=False, ...

1 2 3 4 5 1100
15 30 50 per page