how to combine django and wordpress

2011-05-05 Thread CCC
now I have a site which based on django which can run stable.
in this site we need to use wordpress as a cms.
the server config on ubuntu and nginx,
but i don't know how to combine the django and wordpress
together.any tips can share is great.
thanks in advance!

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



an error happened to apache2and wsgi

2011-01-05 Thread CCC
site has runned based on apache and wsgi for a long time very well,but
recently happened an error like this:
[Sun Jan 02 20:41:02 2011] [error] [client ] IOError: failed to write
data
[Sun Jan 02 20:41:02 2011] [error] [client ] mod_wsgi (pid=2716):
Exception occurred processing WSGI script '/usr/local/src/config/
mywsgi.wsgi'.



-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



open source web game with django

2010-07-22 Thread CCC
Has someone knows some open source web game with django or twisted?
thx!

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: error about django and mssql

2010-06-08 Thread CCC
 That's the error message I copied from console...
I think it's a bug...
and unluckly django can't connect the newset mssql2008 success...

On 6月8日, 下午4时48分, Sam Lai <samuel@gmail.com> wrote:
> If you provide the entire error message, it might help.
>
> The excerpt you provided looks like it wasn't copied properly from the
> console - it is missing characters from the start of each line.
>
> 2010/6/8 CCC <qq263020...@gmail.com>:
>
> > .
> > I  use mssql not mysql
>
> > On 6月8日, 下午3时57分, kanniga sivasubramanian <kskanniga...@gmail.com>
> > wrote:
> >> hello CCC,
> >>   I think you didn't create the database in the mysql.
> >>   First you create the database in mysql. And then you will
> >> change settings.py as a same database name.
> >>   Finally you give the command python manage.py syncdb.
>
> >> On Tue, Jun 8, 2010 at 11:50 AM, CCC <qq263020...@gmail.com> wrote:
> >> > hi,now I use django-mssql and sqlserver2008,
> >> > but I found that it always appear some errors when I do some
> >> > command,for example:python manage.py syncdb
> >> > the error likes coding error is blow:
> >> > raise OperationalError(e, "Error opening connection: " +
> >> > connection_string)
> >> > ngo.db.backends.sqlserver_ado.dbapi.OperationalError:
> >> > (com_error(-2147352567,
> >> > xb7\xa2\xc9\xfa\xd2\xe2\xcd\xe2\xa1\xa3', (0, u'Microsoft OLE DB
> >> > Provider for
> >> > L Server', u'[DBNETLIB][ConnectionOpen (Connect()).]SQL Server \u4e0d
> >> > \u5b58\u
> >> > 8\u6216\u62d2\u7edd\u8bbf\u95ee\u3002', None, 0, -2147467259), None),
> >> > 'Error
> >> > ning connection: PROVIDER=SQLOLEDB;DATA
> >> > SOURCE=115.238.106.100,60433;Network
> >> > rary=DBMSSOCN;Initial Catalog=rvdb_1;UID=sa;PWD=asd.1234')
>
> >> > When  I use Microsoft SQL Server Management studio client ,I can
> >> > success connect the database.
> >> > anyone can help ?Thanks
>
> >> > --
> >> > You received this message because you are subscribed to the Google 
> >> > Groups "Django users" group.
> >> > To post to this group, send email to django-us...@googlegroups.com.
> >> > To unsubscribe from this group, send email to 
> >> > django-users+unsubscr...@googlegroups.com.
> >> > For more options, visit this group 
> >> > athttp://groups.google.com/group/django-users?hl=en.
>
> > --
> > You received this message because you are subscribed to the Google Groups 
> > "Django users" group.
> > To post to this group, send email to django-us...@googlegroups.com.
> > To unsubscribe from this group, send email to 
> > django-users+unsubscr...@googlegroups.com.
> > For more options, visit this group 
> > athttp://groups.google.com/group/django-users?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: error about django and mssql

2010-06-08 Thread CCC
.
I  use mssql not mysql

On 6月8日, 下午3时57分, kanniga sivasubramanian <kskanniga...@gmail.com>
wrote:
> hello CCC,
>   I think you didn't create the database in the mysql.
>   First you create the database in mysql. And then you will
> change settings.py as a same database name.
>   Finally you give the command python manage.py syncdb.
>
> On Tue, Jun 8, 2010 at 11:50 AM, CCC <qq263020...@gmail.com> wrote:
> > hi,now I use django-mssql and sqlserver2008,
> > but I found that it always appear some errors when I do some
> > command,for example:python manage.py syncdb
> > the error likes coding error is blow:
> > raise OperationalError(e, "Error opening connection: " +
> > connection_string)
> > ngo.db.backends.sqlserver_ado.dbapi.OperationalError:
> > (com_error(-2147352567,
> > xb7\xa2\xc9\xfa\xd2\xe2\xcd\xe2\xa1\xa3', (0, u'Microsoft OLE DB
> > Provider for
> > L Server', u'[DBNETLIB][ConnectionOpen (Connect()).]SQL Server \u4e0d
> > \u5b58\u
> > 8\u6216\u62d2\u7edd\u8bbf\u95ee\u3002', None, 0, -2147467259), None),
> > 'Error
> > ning connection: PROVIDER=SQLOLEDB;DATA
> > SOURCE=115.238.106.100,60433;Network
> > rary=DBMSSOCN;Initial Catalog=rvdb_1;UID=sa;PWD=asd.1234')
>
> > When  I use Microsoft SQL Server Management studio client ,I can
> > success connect the database.
> > anyone can help ?Thanks
>
> > --
> > You received this message because you are subscribed to the Google Groups 
> > "Django users" group.
> > To post to this group, send email to django-us...@googlegroups.com.
> > To unsubscribe from this group, send email to 
> > django-users+unsubscr...@googlegroups.com.
> > For more options, visit this group 
> > athttp://groups.google.com/group/django-users?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



error about django and mssql

2010-06-08 Thread CCC
hi,now I use django-mssql and sqlserver2008,
but I found that it always appear some errors when I do some
command,for example:python manage.py syncdb
the error likes coding error is blow:
raise OperationalError(e, "Error opening connection: " +
connection_string)
ngo.db.backends.sqlserver_ado.dbapi.OperationalError:
(com_error(-2147352567,
xb7\xa2\xc9\xfa\xd2\xe2\xcd\xe2\xa1\xa3', (0, u'Microsoft OLE DB
Provider for
L Server', u'[DBNETLIB][ConnectionOpen (Connect()).]SQL Server \u4e0d
\u5b58\u
8\u6216\u62d2\u7edd\u8bbf\u95ee\u3002', None, 0, -2147467259), None),
'Error
ning connection: PROVIDER=SQLOLEDB;DATA
SOURCE=115.238.106.100,60433;Network
rary=DBMSSOCN;Initial Catalog=rvdb_1;UID=sa;PWD=asd.1234')


When  I use Microsoft SQL Server Management studio client ,I can
success connect the database.
anyone can help ?Thanks

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



django bitwise operator

2010-04-21 Thread CCC
In django's modelManager
I use oracle do bitwise operator,like:

select * from MultiRoom m where bitand(m.groupidx,tem ) <> 0

and Now I want to change it to  use django's orm ?
anyone know how to write?
Thanks

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: how to achieve the break tag in django template

2010-04-12 Thread CCC
Thanks for reply
I know waht's you mean.
But in the template inside the for loop,there are some 'css',not only
just put the result in the template
That's  the difficult i can't solved out

On Apr 12, 4:41 pm, Jirka Vejrazka  wrote:
> >  the syntax you're using is not standard Django template syntax, so
> > unless someone has replaced the default Django tempating system with
> > the same one as you did (and is familiar with it and read your email),
> > you are unlikely to get a response from this list.
>
>   Oops - sorry. I misread your email (another proof I should not reply
> to anyone before my first cup of coffee ;-)
>
>   I'm not very familiar with j2ee syntax, but the logic seems a bit
> too heavy for a template, you might be better off implementing the
> logic in a view (hence, standard Python+Django), put the result in the
> context and only display the context in a template.
>
>   Just my 2 cents.
>
>     Jirka

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



to achieve the break tag in django template,exit the for loop

2010-04-11 Thread CCC
which likes
{% for a in as%}
 {% for b in bs%}
{%if a.id ==  b.id%}
   some content and exist the for loop

{% endif %}
 {% endfor %}
{% endfor %}

any one knows?

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: how to achieve the break tag in django template

2010-04-11 Thread CCC
anyone can help?Thanks advance

On Apr 9, 7:42 pm, CCC <qq263020...@gmail.com> wrote:
> now i have a finished template which wrote by j2ee,like this:
>         <#list  dailyStarList as dailyS>
>                 0>class="list_color_w"<#else>class="list_color"><#list
> chatAvatarList as cal>
>                                 <#if dailyS.avatarid == cal.id>
>                                         ${(cal.name[0..1])!''}之星
>                                         <#break>
>                                 
>                         <#if (dailyMemberList)??>
>                         <#list  dailyMemberList as dm>
>                                 <#if dailyS.idx == dm.idx>
>                                         ${(dm.myname)!''}
>                                         <#break>
>                                 
>                         
>                 ${(dailyS.dailyNum)?c!''}
>                
>
> And Now i want to changeit,write by django,anyone know how to achieve
> the "<#break>"
> in this tenplate
> thanks!

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



how to achieve the break tag in django template

2010-04-09 Thread CCC
now i have a finished template which wrote by j2ee,like this:
<#list  dailyStarList as dailyS>
   class="list_color_w"<#else>class="list_color"><#list
chatAvatarList as cal>
<#if dailyS.avatarid == cal.id>
${(cal.name[0..1])!''}之星
<#break>

<#if (dailyMemberList)??>
<#list  dailyMemberList as dm>
<#if dailyS.idx == dm.idx>
${(dm.myname)!''}
<#break>


${(dailyS.dailyNum)?c!''}
   


And Now i want to changeit,write by django,anyone know how to achieve
the "<#break>"
in this tenplate
thanks!

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



error about django and mssql

2010-04-04 Thread CCC
hi,now I use django-mssql and sqlserver2008,
but I found that it always appear some errors when I do some
command,for example:python manage.py syncdb
the error likes coding error is blow:
raise OperationalError(e, "Error opening connection: " +
connection_string)
ngo.db.backends.sqlserver_ado.dbapi.OperationalError:
(com_error(-2147352567,
xb7\xa2\xc9\xfa\xd2\xe2\xcd\xe2\xa1\xa3', (0, u'Microsoft OLE DB
Provider for
L Server', u'[DBNETLIB][ConnectionOpen (Connect()).]SQL Server \u4e0d
\u5b58\u
8\u6216\u62d2\u7edd\u8bbf\u95ee\u3002', None, 0, -2147467259), None),
'Error
ning connection: PROVIDER=SQLOLEDB;DATA
SOURCE=115.238.106.100,60433;Network
rary=DBMSSOCN;Initial Catalog=rvdb_1;UID=sa;PWD=asd.1234')


anyone can help ?Thanks

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



error about django and mssql

2010-04-04 Thread CCC
hi,now I use django-mssql and sqlserver2008,
but I found that it always appear some errors when I do some
command,for example:python manage.py syncdb
the error likes coding error is blow:
raise OperationalError(e, "Error opening connection: " +
connection_string)
ngo.db.backends.sqlserver_ado.dbapi.OperationalError:
(com_error(-2147352567,
xb7\xa2\xc9\xfa\xd2\xe2\xcd\xe2\xa1\xa3', (0, u'Microsoft OLE DB
Provider for
L Server', u'[DBNETLIB][ConnectionOpen (Connect()).]SQL Server \u4e0d
\u5b58\u
8\u6216\u62d2\u7edd\u8bbf\u95ee\u3002', None, 0, -2147467259), None),
'Error
ning connection: PROVIDER=SQLOLEDB;DATA
SOURCE=115.238.106.100,60433;Network
rary=DBMSSOCN;Initial Catalog=rvdb_1;UID=sa;PWD=asd.1234')


anyone can help ?Thanks

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



error about django and mssql

2010-04-04 Thread CCC
hi,now I use django-mssql and sqlserver2008,
but I found that it always appear some errors when I do some
command,for example:python manage.py syncdb
the error likes coding error is blow:
raise OperationalError(e, "Error opening connection: " +
connection_string)
ngo.db.backends.sqlserver_ado.dbapi.OperationalError:
(com_error(-2147352567,
xb7\xa2\xc9\xfa\xd2\xe2\xcd\xe2\xa1\xa3', (0, u'Microsoft OLE DB
Provider for
L Server', u'[DBNETLIB][ConnectionOpen (Connect()).]SQL Server \u4e0d
\u5b58\u
8\u6216\u62d2\u7edd\u8bbf\u95ee\u3002', None, 0, -2147467259), None),
'Error
ning connection: PROVIDER=SQLOLEDB;DATA
SOURCE=115.238.106.100,60433;Network
rary=DBMSSOCN;Initial Catalog=rvdb_1;UID=sa;PWD=asd.1234')


anyone can help ?Thanks

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: manytomany relations

2010-01-29 Thread CCC
I mean the users who have the number of group is the lagest ten.
and the relation is manytomany.thanks

On 1月29日, 下午8时05分, Stodge <sto...@gmail.com> wrote:
> I think he needs to read the tutorial:
>
> http://docs.djangoproject.com/en/1.1/intro/tutorial03/#write-views-th...
>
> And I quote:
>
> "Here's one stab at the index() view, which displays the latest 5 poll
> questions in the system"
>
> On Jan 29, 4:57 am, Wayne Koorts <wkoo...@gmail.com> wrote:
>
> > What do you mean by "top ten"?
>
> > On 29/01/2010, at 20:53, CCC <qq263020...@gmail.com> wrote:
>
> > > hi,
> > > I have two  models:user,group,and they are manytomany,
> > > class User(model.Model):
> > > name = models.CharField(max_length=20)
>
> > > class Group(models.Model):
> > > name = models.CharField(max_length=20)
> > > users = models.ManytoManyField(User)
>
> > > now i want to get the  top ten users who have the groups
> > > ,thanks for advance!
>
> > > --  
> > > You received this message because you are subscribed to the Google  
> > > Groups "Django users" group.
> > > To post to this group, send email to django-us...@googlegroups.com.
> > > To unsubscribe from this group, send email to 
> > > django-users+unsubscr...@googlegroups.com
> > > .
> > > For more options, visit this group 
> > > athttp://groups.google.com/group/django-users?hl=en
> > > .

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: manytomany relations

2010-01-29 Thread CCC
I mean the users who have the number of group is the largest ten
and you see  the relation is manytomany.
On 1月29日, 下午8时05分, Stodge <sto...@gmail.com> wrote:
> I think he needs to read the tutorial:
>
> http://docs.djangoproject.com/en/1.1/intro/tutorial03/#write-views-th...
>
> And I quote:
>
> "Here's one stab at the index() view, which displays the latest 5 poll
> questions in the system"
>
> On Jan 29, 4:57 am, Wayne Koorts <wkoo...@gmail.com> wrote:
>
> > What do you mean by "top ten"?
>
> > On 29/01/2010, at 20:53, CCC <qq263020...@gmail.com> wrote:
>
> > > hi,
> > > I have two  models:user,group,and they are manytomany,
> > > class User(model.Model):
> > > name = models.CharField(max_length=20)
>
> > > class Group(models.Model):
> > > name = models.CharField(max_length=20)
> > > users = models.ManytoManyField(User)
>
> > > now i want to get the  top ten users who have the groups
> > > ,thanks for advance!
>
> > > --  
> > > You received this message because you are subscribed to the Google  
> > > Groups "Django users" group.
> > > To post to this group, send email to django-us...@googlegroups.com.
> > > To unsubscribe from this group, send email to 
> > > django-users+unsubscr...@googlegroups.com
> > > .
> > > For more options, visit this group 
> > > athttp://groups.google.com/group/django-users?hl=en
> > > .

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



manytomany relations

2010-01-28 Thread CCC
hi,
I have two  models:user,group,and they are manytomany,
class User(model.Model):
 name = models.CharField(max_length=20)

class Group(models.Model):
 name = models.CharField(max_length=20)
 users = models.ManytoManyField(User)

now i want to get the  top ten users who have the groups
,thanks for advance!

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: the configuration of nginx/django/fastcgi,can't find the static file

2010-01-20 Thread CCC
any one can help,thanks in advance

On Jan 20, 2:37 pm, CCC <qq263020...@gmail.com> wrote:
> hi ,now i want  to deploy my website to nginx,,use ubuntu,
> then myproject is located at /home/x/myproject/ ,
> here is my configuration,thank you very much:
> user www-data;
> worker_processes 2;
>
> error_log /var/log/nginx/error.log info;
>
> events {
>     worker_connections  1024;
>     use epoll;
>
> }
>
> http {
>     include         /etc/nginx/mime.types;
>     default_type    application/octet-stream;
>
> log_format main  '$remote_addr - $remote_user [$time_local] '
>             '"$request" $status $bytes_sent '
>             '"$http_referer" "$http_user_agent" '
>             '"$gzip_ratio"';
>
> client_header_timeout   3m;
> client_body_timeout     3m;
> send_timeout            3m;
> connection_pool_size            256;
> client_header_buffer_size       1k;
> large_client_header_buffers     4 2k;
> request_pool_size               4k;
>
> gzip on;
> gzip_min_length 1100;
> gzip_buffers    4 32k;
> gzip_types      text/plain text/html application/x-javascript text/xml
> text/css;
>
> output_buffers  4 32k;
> postpone_output 1460;
>
> sendfile        on;
> tcp_nopush      on;
> tcp_nodelay     on;
>
> keepalive_timeout       75 20;
>
> ignore_invalid_headers  on;
> index index.html;
>         server {
>                listen 80;
>                 server_name localhost;
>                 # site_media - folder in uri for static files
>                 location /site_media  {
>                         alias /home/x/myproject/media/;
>                        }
>       location ^~ /media {
>    alias /usr/lib/python2.5/site-packages/django/contrib/admin/media/;}
>
> location ~* ^.+\.(jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|doc|xls|
> exe|pdf|ppt|txt|tar|mid|midi|wav|bmp|rtf|js|mov) {
>   access_log   off; # po co mi logi obrazków :)
>   expires      30d;}
>
>                 location / {
>                         # host and port to fastcgi server
>                         fastcgi_pass 127.0.0.1:8080;
>                         fastcgi_param PATH_INFO $fastcgi_script_name;
>                         fastcgi_param REQUEST_METHOD $request_method;
>                         fastcgi_param QUERY_STRING $query_string;
>                         fastcgi_param CONTENT_TYPE $content_type;
>                         fastcgi_param CONTENT_LENGTH $content_length;}
>
>                 access_log        /var/log/nginx/localhost.access_log
> main;
>                 error_log        /var/log/nginx/localhost.error_log;
>                 }
>         }}
>
> how can i foung the js,css,files
> i have tried for l long time,thanks for advance
-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.




the configuration of nginx/django/fastcgi,can't find the static file

2010-01-19 Thread CCC
hi ,now i want  to deploy my website to nginx,,use ubuntu,
then myproject is located at /home/x/myproject/ ,
here is my configuration,thank you very much:
user www-data;
worker_processes 2;

error_log /var/log/nginx/error.log info;

events {
worker_connections  1024;
use epoll;
}

http {
include /etc/nginx/mime.types;
default_typeapplication/octet-stream;

log_format main  '$remote_addr - $remote_user [$time_local] '
'"$request" $status $bytes_sent '
'"$http_referer" "$http_user_agent" '
'"$gzip_ratio"';

client_header_timeout   3m;
client_body_timeout 3m;
send_timeout3m;
connection_pool_size256;
client_header_buffer_size   1k;
large_client_header_buffers 4 2k;
request_pool_size   4k;

gzip on;
gzip_min_length 1100;
gzip_buffers4 32k;
gzip_types  text/plain text/html application/x-javascript text/xml
text/css;

output_buffers  4 32k;
postpone_output 1460;

sendfileon;
tcp_nopush  on;
tcp_nodelay on;

keepalive_timeout   75 20;

ignore_invalid_headers  on;
index index.html;
server {
   listen 80;
server_name localhost;
# site_media - folder in uri for static files
location /site_media  {
alias /home/x/myproject/media/;
   }
  location ^~ /media {
   alias /usr/lib/python2.5/site-packages/django/contrib/admin/media/;
}
location ~* ^.+\.(jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|doc|xls|
exe|pdf|ppt|txt|tar|mid|midi|wav|bmp|rtf|js|mov) {
  access_log   off; # po co mi logi obrazków :)
  expires  30d;
}
location / {
# host and port to fastcgi server
fastcgi_pass 127.0.0.1:8080;
fastcgi_param PATH_INFO $fastcgi_script_name;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param QUERY_STRING $query_string;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
}
access_log/var/log/nginx/localhost.access_log
main;
error_log/var/log/nginx/localhost.error_log;
}
}
}
how can i foung the js,css,files
i have tried for l long time,thanks for advance
-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.




django fixtures error

2010-01-09 Thread CCC
hi,
my code like this:
class Profile(models.Model):
GENDER = ((1,'male'),(2,'female'))
gender = models.IntegerField(choices=GENDER,default=0)
user = models.ForeignKey(User,unique=True)
name = models.CharField(max_length=20,blank=True)
job = models.CharField(max_length=50,blank=True)
sign = models.CharField(max_length=100,null=True)
age  = models.PositiveIntegerField(default=0)
location = models.CharField(max_length=20)

def __unicode__(self):
return self.user.username

when i use TestCase, i got error :
DoesNotExist: User matching query does not exist.
and this is my initial_data.json:
[
{
"pk": 1,
"model": "auth.user",
"fields": {
"username": "root",
"first_name": "",
"last_name": "",
"is_active": 1,
"is_superuser": 1,
"is_staff": 1,
"last_login": "2010-01-08 08:14:12",
"groups": [],
"user_permissions": [],
"password":
"sha1$20af5$96e9ef85ed24ad6a3a4e75d05e9d5428ee967684",
"email": "q...@q.com",
"date_joined": "2010-01-08 05:36:42"
}
}
]

my question is how could i get my json like this,just load the
auth.user model to json file:
   {
"pk": 2,
"model": "auth.user",
"fields": {
"username": "joe",
"first_name": "Joe",
"last_name": "Smith",
"is_active": true,
"is_superuser": false,
"is_staff": false,
"last_login": "2009-03-31 19:11:56",
"groups": [],
"user_permissions": [],
"password": "sha1$a75af
$7b2c7b5e7ac635e80477fece6291508d6af30b9d",
"email": "",
"date_joined": "2009-03-31 15:14:06"
}
},
{
"pk": 1,
"model": "profiles.profile",
"fields": {
"user": 1,
"name": "Bob Roberts",
"about": "The problem with Bob is that he doesn't like
beer",
"location": "Someplace dull",
"website": "http://pinaxproject.com;
}
},
thanks for advance
-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.




help about json

2010-01-04 Thread CCC
hi,all
happy new  year!
im my template i have some field ,but i hope that users can
customerize the form (for example,
 they can add some more other fields,)i know it use json ,but i need
some source or link,
anyone can help
thanks

--

You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.