I'm learning Django and trying to get the hang of querying foreign keys across a bridging table. Apologies if this is a duplicate, I haven't been able to find the answer by searching. I've got models defined as follows
class Place(models.Model):
id = models.IntegerField(primary_key=True)
name = models.CharField(max_length=100)
c...
Hello All,
I started to code in Django quite recently, so maybe my question is a bit wierd.
Recently I needed to render the CharField fields from the model into simple static text in html , but I figured out that it seems it's not that simple in this case as I could think, or I am doing something wrong...
I have this model:
class Tag(...
I am writing a template for my first django website.
I am passing a list of dictionaries to the template in a variable. I also need to pass a few other lists which hold boolean flags. (Note: all lists have the same length)
The template looks something like this:
<html>
<head><title>First page</title></head><body>
{% for it...
Is there a cloud based development for Django, such as there is cloud based development and hosting environment for Ruby / heroku
...
Could you please suggest any available app for sending & managing emails in django?
...
In the django admin, I have an inline that I want to have the viewing user filled in automatically. During the clean function, it fills in the created_by field with request.user. The problem is that since the created_by field is excluded by the form, the value that gets inserted into cleaned_fields gets ignored apparently. How can I do t...
I am using Django, haystack, solr, to do searching. Ive am able to search and now I would like to find similar items using more_like_this. When I try to use the more_like_this functionality I get back all of the objects that are of that model type instead of just the ones that closely match it. Here is some code to show you how I am usi...
Hi,
I'm trying to integrate a 3rd party Django app that made the unfortunate decision to inherit from django.contrib.auth.models.User, which is a big no-no for pluggable apps. Quoting Malcolm Tredinnick:
More importantly, though, just as in Python you cannot "downcast" with
Django's model inheritance. That is, if you've already cr...
I'm running Python 2.6.1 and Django 1.2.1 on Windows XP SP3. I'm using JetBrains PyCharm 1.0 to create and deploy my Django apps.
I'm relatively inexperienced with Python, and I'm starting to learn Django by following along with "Writing Your First Django App" from the web site - the poll application. I'm stuck on part 3.
Everything ...
Hi everyone,
My app in django requires to tell the user what time an action occurred. Aside from asking the user what timezone he/she is in, is it possible for me to generate the time on the client end?
Off the top of my head, are there a particular representation of time that is timezone independent, (unix time?), and then I can simpl...
I have a django application that i serve using gunicorn. I do that by using the method prescribed on the gunicorn site - embedding gunicorn into my django application.
I'm trying to set up a proxy into my application so that when you go to "http://mysite.com/proxy/" it does proxy you to "http://mysite.com:8100".
I know i can do that wi...
I'm getting this error django.db.utils.IntegrityError: django_content_type.name may not be NULL while running tests via nosetest.
I've done everything as told in south tutorial - initial migration, fake migration etc.
Running site normally via runserver command works like charm, but while using test command - above error.
Also, In my d...