which statements are right?

2011-03-07 Thread yongzhen zhang
Hi, When i am doing some exercises, i found some questions are very to understand, Could you tell me which sentiences are correct? 1. Models convert data from relational database form to objects and vice versa. 2. Django model has to be written for a specific relation database 3. Foreignkey are use

Rendering JSON from Django Views

2011-03-12 Thread yongzhen zhang
Hi, i want to rendering JSON from Django views, here is my models: class Continent(models.Model): name = models.CharField(max_length='10',unique=True) code = models.CharField(max_length='5',unique=True) class Country(models.Model): name = models.CharField(max_length='10',unique=True)

Re: Rendering JSON from Django Views

2011-03-13 Thread yongzhen zhang
uez wrote: > El 12/03/11 13:31, yongzhen zhang escribió: > > > > > Hi, i want to rendering JSON from Django views, here is my models: > > class Continent(models.Model): > >     name = models.CharField(max_length='10',unique=True) > >     code = models

develop to product

2011-03-29 Thread yongzhen zhang
HI, I want to move development version to product version and i use Apache with wsgi. In apache2/sites-available folder, i made one istore instead the default one. The content is: NameVirtualHost *:80 ServerAdmin webmaster@localhost ServerName www.imaboy.cn ServerAlias sh

Re: develop to product

2011-03-29 Thread yongzhen zhang
[Tue Mar 29 16:40:59 2011] [warn] NameVirtualHost *:80 has no VirtualHosts [Tue Mar 29 16:40:59 2011] [warn] NameVirtualHost *:80 has no VirtualHosts (13)Permission denied: make_sock: could not bind to address 0.0.0.0:80 no listening sockets available, shutting down Unable to open logs On 3月29日,

Re: develop to product

2011-03-29 Thread yongzhen zhang
> Which error you have? > Envoyé par mon BlackBerry® smartphone de Tigo > > > > -Original Message- > From: yongzhen zhang <4...@live.cn> > > Sender: django-users@googlegroups.com > Date: Tue, 29 Mar 2011 05:41:40 > To: Django users > Reply-To: dj

Re: develop to product

2011-03-29 Thread yongzhen zhang
NameVirtualHost *:80 in /etc/apache2/sites-available i made one file istore: ServerAdmin webmaster@localhost ServerName www.imaboy.cn ServerAlias shop.imaboy.cn Alias /static /home/yongzhen/workspace/www/iStore/static DocumentRoot /home/yongzhen/workspace

Re: develop to product

2011-03-29 Thread yongzhen zhang
It shows: 404 Not Found nginx/0.7.65 On 3月30日, 上午4时19分, yongzhen zhang <4...@live.cn> wrote: > NameVirtualHost *:80 > > in /etc/apache2/sites-available i made one file istore: > >

Re: develop to product

2011-03-29 Thread yongzhen zhang
an error when you say that you are using apache/wsgi. > > > If I had to guess I'd say you might have an nginx server acting as a > > proxy in your stack somewhere. I'm not an expert though as I've just > > been getting to grips with basic proxying myself. &

Re: develop to product

2011-03-30 Thread yongzhen zhang
t; is giving you an error when you say that you are using apache/wsgi. > > > If I had to guess I'd say you might have an nginx server acting as a > > proxy in your stack somewhere.  I'm not an expert though as I've just > > been getting to grips with basic p

wsgi configuration

2011-03-31 Thread yongzhen zhang
Hi, I am using apache + wsgi for my Django project. But now i am a bit confused. The project is under /home/yongzhen/workspace/www . I put the apache folder under www, and it is same level with the project "iStore". i write django.wsgi inside apache like this: import os import sys path='/home/yongz

Apache2 with static file

2011-04-05 Thread yongzhen zhang
Hi, i have one problem with my apache2 work with static file. In apache2/sites-available file: ServerName www.imaboy.cn ServerAlias shop.imaboy.cn Alias /static /home/yongzhen/workspace/www/iStore/static I want use apache to route to my static file. It works somehow, like i

Re: wsgi configuration

2011-04-05 Thread yongzhen zhang
[error] [client 82.130.18.44] ImportError: Could not import settings 'www.iStore.settings' (Is it on sys.path? Does it have syntax errors?): No module named www.iStore.settings Any suggestion? On 3月31日, 下午9时48分, george wrote: > the path should be: > > path='/home/yong

Re: wsgi configuration

2011-04-05 Thread yongzhen zhang
Hi, thanks for reply, i have tried this. Now in order to make it clear, i move the iStore under home, like this: "/home/yongzhen/ iStore". django.wsgi is inside apache file and the apache file is under iStore: "/home/yongzhen/iStore/django.wsgi". The content of django.wsgi: import os, sys wsgi_dir