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.
0
votes
2answers
10 views
Django + postgresql: log how long a query took to execute?
Beginner question, and it's probably a duplicate, sorry! But I can't find the answer by Googling or by searching on here.
My Django/postgres application is slow. I know how to log the queries being ...
0
votes
2answers
12 views
use search field in Django
I have a model like:
class Job(models.Model):
title=models.CharField(max_length=40)
genre=models.ManyToManyField(JobGenre, through='GenreToJob')
creator=models.ForeignKey(Customer)
...
0
votes
0answers
8 views
Django 1.5: Admin static files is using wrong path
My settings.py
MEDIA_ROOT = os.path.join(PROJECT_PATH, "media/")
MEDIA_URL = '/media/'
STATIC_ROOT = os.path.join(PROJECT_PATH, "static_release/")
STATIC_URL = '/static/'
In /admin/
My css files ...
0
votes
0answers
14 views
Django, How to detect login success event?
I have built a crm system using django, and I want to record the login information(the login user, the login time, the login ip address) of the successfully-logged-in user, how to detect the ...
-3
votes
0answers
13 views
excuse me every one! I am trying to write a bat to run my django project
excuse me every one! I am trying to write a bat to run my django project,djr.bat==>
C:\Documents and Settings\Administrator>cd C:\django_project\mysite C:\django_project\mysite>python manage.py ...
0
votes
2answers
37 views
How to convert class variables into instance variables in Python?
I'm trying to convert class variables into instance variables on runtime, similar to what goes on in the Django ORM where the class variables of various types are converted into instance variables of ...
0
votes
0answers
11 views
Django models query parent objects issue
I have a question regarding models in Django.
I will explain how my models are structured. I have a model called AppUserGroup that is a group of users. This contains multiple users who I have called ...
0
votes
1answer
12 views
set minimum primary key for saving django models in database
I am new to Django.I have two models, Model A and a new Model B
class A:
firstname=models.CharField(max_length=20,blank=True,null=True)
email = ...
0
votes
0answers
12 views
Implementing Steam login using openid in django for google app engine
I have followed the steps on the Google App Engine. What should I do now? I can't find tutorials on implementing Steam OpenID in django, with Google App Engine. I have looked at a sample solution in ...
0
votes
0answers
3 views
django schemamigration creates the same migration change
I messed up merging schema migrations from multiple git branches.
Basically, all the changes are applied to DB, but when I do
python manage.py schemamigration my_app --auto
It recreates ...
0
votes
1answer
40 views
Imported modules become None when running a function
I have a module which imports, among other things, the django User object.
The import works fine, and the code loads. However, when you call a function in that module that uses the User object, it ...
1
vote
0answers
9 views
django-application in a sub-url
I've got a problem when deploying a django-application to an apache-Server. The site should be accessible via http://localhost/suburl/.
I use a virtual environment.
The (shortened) virtualhost looks ...
0
votes
0answers
10 views
Django (nose) test speeding up with reuse_db not working
I am using django-nose to run my unit tests in django (1.4).
TEST_RUNNER = 'django_nose.NoseTestSuiteRunner'
Creating the database takes a long time.
So I found out putting this in settings.py:
...
1
vote
2answers
19 views
Django ecommerce website huge product page intial load time (wait)
I'm just a starter in everything Django related so I apologize upfront for my confusing explanations. I've been trying to resolve some page load issues on a Django based website with an attached ...
0
votes
2answers
11 views
select_related or select_prefetched after calling filter()?
All the examples I see have select_related() first and then filter() call as in:
MyModel.objects.select_related().filter()
Can I do
qs = MyModel.objects.filter(my_field=my_var)
qs = ...