Just installed django-db-log module and trying to make it work properly. 'python manage.py syncdb' command created databases, it seems like logging works, but there is nothing about it in admin panel. As I found in documentation, it should add itself in admin panel without any additional configuration, but then I added 'djangodblog.middl...
Hello, ordinarily if I were writing a sql statement to this I would do something like this,
SELECT * FROM (django_baseaccount LEFT JOIN django_account ON django_baseaccount.user_id = django_account.baseaccount_ptr_id)
LEFT JOIN django_address ON django_account.baseaccount_ptr_id = django_address.user_id;name
how do I put this into...
Hi -
I'm trying to render a template in a different language using i18n. I did everything I could read about, from setting the language code, creating and compiling translation files, including the translation tags in the template and all that, and my template still renders in English, even through the {{ LANGUAGE_CODE }} variable poin...
I'm slowly getting into the position where one of my Django sites needs some robustness behind it. I'd currently running on a single VPS on a SQLite database with memcached.. It's about as un-scaled as things can get.
If I bought another VPS account, what would I want to do?
Move to MySQL/PostgreSQL with replication? What's easiest? D...
I am trying to find the optimal architecture for an ajax-heavy Django application I'm currently building. I'd like to keep a consistent way of doing forms, validation, fetching data, JSON message format but find it exceedingly hard to find a solution that can be used consistently.
Can someone point me in the right direction or share the...
I have a model Calendar and in a form I want to be able to create multiple instances of it.
Here are my models:
class Event(models.Model):
user = models.ForeignKey(User)
class Group(models.Model):
name = models.CharField(_('Name'), max_length=80)
events = models.ManyToManyField(Event, through='Calendar')
class Calendar(mo...
Using Flatpages with the default admin, I need to change the template field from a text input with to select or radio with predefined choices. It's easy to do this with one of my own apps - just use the choices attribute in the model.
I have tried a few things - I will add details about those attempts later if necessary - but does anyon...
Hi there,
I have just moved my django site on my staging server, and the admin side of the site has no styling with it, when previously in local development it was fine, I read somewhere that I need to create a symbolic link, I did that by doing this
sudo ln -s /var/www/sico/htdocs /usr/lib/python2.5/site-packages/django/contrib/admin...
In Django, settings are stored in a file, settings.py. This file is part of the code, and goes into the repository. It is only the developers who deal with this file. The admin deals with the models, the data in the database. This is the data that the non-development staff edits, and the site visitors see rendered in templates.
The thin...
How the heck do i serve a simple img without all that MediaGenerator nonsense, in Django on App Engine?
I am using app engine patch.
I got layout like this:
django_app_engine_project_folder
my_app
Where should my folder for my media be? In my_app? Or do I put everything in the top media folder?
I want to do something like this in...
Hello my friends.
I have a site that runs with follow configuration:
Django + mod-wsgi + apache
In one of user's request, I send another HTTP request to another service, and solve this by httplib library of python.
But sometimes this service don't get answer too long, and timeout for httplib doesn't work. So I creating thread, in th...
i remember installing Python + Django + MySQL + MySQLdb on my 32-bit Mac with Leopard 10.5.7.
I tried the same procedure with Mac Snow Leopard. But have unfortunately ran into a lot of errors...
i dont know but something weird is happening. Please look at the error log:
Amit-Vermas-MacBook:mysql-python-1.2.2 amitverma$ python setup.py b...
I'd like to start doing some forms of web development, with the aim of building web apps that could eventually grow into start-up products. And for a long time, I have been very curious about functional programming, and somewhere in my heart secretly believing that higher up you go in the abstraction level, the more power you have (hidde...
This problem is partly due to my lack of completely understanding scoping in python, so I'll need to review that. Either way, here is a seriously trivial piece of code that keeps crashing on my Django test app.
Here's a snippet:
@login_required
def someview(request):
try:
usergroup = request.user.groups.all()[0].name
except:
Http...
Hi,
I am having difficulties with listing this type of data. Scenario is
as follows:
user1 add's a friend called user2
user2 confirms that user1 is his friend
what should happen is user2 and user1 see's each others name in their
friends list. What's happening now is I am able to add user2 to user1
friends list but user1 cannot see us...
When I run manage.py shell on my Django project to take a peek at something there are common imports that I always want to run at the start of the shell (e.g. I always want to import my model files.) How can I have these run automatically everytime I run the shell command?
2nd related question, when I hit the up arrow I get the "^A" ch...
I'm using django-filter to drill down and would like to create breadcrumbs for each item that was filtered. For example:
Price ranges:
10,000+
5,000-9,999
1,000-4,999
0-999
Bedrooms:
4
3
2
1
Each of the items under Price ranges and Bedrooms would be a link to drill down in a queryset.
I'd like to create a breadcrumb such as Price ra...
Is there a detailed diagram that describes how Django processes requests, from when the request is first handed to it until it hands back a response, specifically including how database connections are related to requests, e.g., 1 to 1, 1 to N, etc.?
If not, I'd appreciate a pointer to the point in the code where Django starts processin...
Am redirecting urls from a legacy site, which gets me to a url like this:
http://example.com/blog/01/detail
I would like to automatically remove the leading zeros from these urls (seems it doesn't matter how many zeros are in there 001 0001 000001 work) so that the page redirects to:
http://example.com/blog/1/detail
Is there a simple...
My Django app displays data from a database. This data changes without user intervention, i.e. behind the scenes. Whenever it changes, I would like the webpage to update the changed sections without a full page reload.
Obviously AJAX springs to mind. When the page is loaded initially (or manually, fully re-loaded later on), the rendered...