RE: error - MultiValueDictKeyError at /profilesetting/ramuss

2013-05-09 Thread Babatunde Akinyanmi
Hi Avnesh,
Your form has only one input with name as "pic" but in your view you are
checking the QueryDict for six keys and none of them is even named "pic".

meanwhile, I see that you are trying to upload a file, so you might want to
read https://docs.djangoproject.com/en/dev/topics/http/file-uploads/ before
you proceed

Sent from my Windows Phone
--
From: Avnesh Shakya
Sent: 5/9/2013 5:31 AM
To: django-users@googlegroups.com
Subject: error - MultiValueDictKeyError at /profilesetting/ramuss

hi,
I am facing error -
MultiValueDictKeyError at /profilesetting/ramuss

"Key 'name' not found in "

I am trying to upload image using dynamically(using javascript),
but when I click on upload button after selecting image, it's showing
this error.

my html page contain-

{% block scriptquery %}

function donefunction()
{
 visibility='hidden';
return true;
}
};

{% endblock %}
{% block rightcontent %}
  
Update Image

  
  
  {% csrf_token %}
   
   

   
  
{% endblock %}

views.py page -
def profilesetting(request,uname):
user=User.objects.get(username=uname)
bag=Bag.objects.filter(creator=user.username)
if request.method=='POST':
user.name=request.POST['name']
user.email=request.POST['email']
if request.POST['phone']!="":
  user.phone=request.POST['phone']
user.about=request.POST['about']
user.website=request.POST['website']
user.location=request.POST['location']
user.save()
return 
render_to_response('profilesetting.html',{'user':user,'bag':bag},context_instance=RequestContext(request))

models.py --

from thumbs import ImageWithThumbsField
from django.db import IntegrityError
from django.db import models
import datetime

class User(models.Model):

username  = models.CharField(max_length=65, primary_key=True)
name  = models.CharField(max_length=64)
dob   = models.DateField()
gender_choices= (('m','male'),('f','female'))
gender= 
models.CharField(max_length=1,choices=gender_choices)
email = models.EmailField(verbose_name='your e-mail')
permission=
models.DecimalField(max_digits=3,decimal_places=0,blank=True,
null=True)
password  = models.CharField(max_length=32)
phone =
models.DecimalField(max_digits=11,decimal_places=0, blank=True,
null=True)
pic   =
ImageWithThumbsField(upload_to='images',blank=True, null=True)
about = models.TextField()
profile_view  =
models.DecimalField(max_digits=8,decimal_places=0, null=True)
location  = models.TextField()
website   = models.URLField(max_length=64,blank=True, null=True)
reputation= models.DecimalField(max_digits=8,decimal_places=0)
doj   = models.DateField(auto_now_add=True)
def __str__(self):
#return 
(self.name,self.dob,self.email,self.about,self.profile_view,self.location,self.website,self.tags,self.num_of_que_asked,self.num_of_que_answered,self.doj)
return (self.name)
def reg(self):
return (self.name,self.username)
def save(self,*args, **kw):
super(User,self).save(*args, **kw)
class Admin:
pass


please help me, I am unable to solve this problem.

thanks.

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

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




Re: Retrieving images from GridFS using django-tastypie-mongoengine

2013-05-09 Thread Hélio Miranda
No, I'm not using GridFSStorage.

I was just using mongoengine, with FileField field.

To get the image have to use GridFSStorage?
How to use it?

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




Hello everyone, can you tell me a good django's book that explains the various functions but at the same time develop a complete website chapter by chapter?

2013-05-09 Thread Federico Erbea
I bought a Marco Beri's book "Sviluppare applicazioni web con django" but 
after the first chapter only explains the different functions in contrast 
to the first chapter where the functions were explained by developing them.
I also bought "Instant Django Application Development 
Starter"
 
of Mauro Rocco, 
"Definitive
 
Guide to Django: Web Development Done 
Right"of
 Holovaty 
Adrian and "Pro 
Django"
 
of Alchin Marty.
I have not read the last three, think reflect my request or do you know of 
the best and most related.

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




Re: Hello everyone, can you tell me a good django's book that explains the various functions but at the same time develop a complete website chapter by chapter?

2013-05-09 Thread Gerald Klein
Besides the great documentation and examples on the Django site I would
look at http://www.djangobook.com/en/2.0/index.html

You also bought three more books take a look at them before buying more, if
you are just starting though I would start with the docs on the site and
the link I have provided.

thanks

--jerry


On Thu, May 9, 2013 at 3:56 AM, Federico Erbea  wrote:

> I bought a Marco Beri's book "Sviluppare applicazioni web con django" but
> after the first chapter only explains the different functions in contrast
> to the first chapter where the functions were explained by developing them.
> I also bought "Instant Django Application Development 
> Starter"
> of Mauro Rocco, 
> "Definitive
> Guide to Django: Web Development Done 
> Right"of
>  Holovaty
> Adrian and "Pro 
> Django"
> of Alchin Marty.
> I have not read the last three, think reflect my request or do you know of
> the best and most related.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>



-- 

Gerald Klein DBA

contac...@geraldklein.com

www.geraldklein.com 

geraldklein.wordpress.com

j...@zognet.com

708-599-0352


Arch Awesome, Ranger & Vim the coding triple threat.

Linux registered user #548580

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




Re: Hello everyone, can you tell me a good django's book that explains the various functions but at the same time develop a complete website chapter by chapter?

2013-05-09 Thread Federico Erbea
Thanks but there isn't something more new, maybe make with django 1.4?

Il giorno giovedì 9 maggio 2013 10:56:17 UTC+2, Federico Erbea ha scritto:
>
> I bought a Marco Beri's book "Sviluppare applicazioni web con django" but 
> after the first chapter only explains the different functions in contrast 
> to the first chapter where the functions were explained by developing them.
> I also bought "Instant Django Application Development 
> Starter"
>  
> of Mauro Rocco, 
> "Definitive
>  
> Guide to Django: Web Development Done 
> Right"of
>  Holovaty 
> Adrian and "Pro 
> Django"
>  
> of Alchin Marty.
> I have not read the last three, think reflect my request or do you know of 
> the best and most related.
>

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




Re: error - MultiValueDictKeyError at /profilesetting/ramuss

2013-05-09 Thread Avnesh Shakya
Thanks, but I am using two form in my single template, so how will it
possible to create views for both form for post method.


On Thu, May 9, 2013 at 2:08 PM, Babatunde Akinyanmi wrote:

> Hi Avnesh,
> Your form has only one input with name as "pic" but in your view you are
> checking the QueryDict for six keys and none of them is even named "pic".
>
> meanwhile, I see that you are trying to upload a file, so you might want
> to read https://docs.djangoproject.com/en/dev/topics/http/file-uploads/before 
> you proceed
>
> Sent from my Windows Phone
> --
> From: Avnesh Shakya
> Sent: 5/9/2013 5:31 AM
> To: django-users@googlegroups.com
> Subject: error - MultiValueDictKeyError at /profilesetting/ramuss
>
> hi,
> I am facing error -
> MultiValueDictKeyError at /profilesetting/ramuss
>
> "Key 'name' not found in "
>
> I am trying to upload image using dynamically(using javascript),
> but when I click on upload button after selecting image, it's showing this 
> error.
>
> my html page contain-
>
> {% block scriptquery %}
>
> 
> function donefunction()
> {
>  visibility='hidden';
> return true;
> }
> };
> 
> {% endblock %}
> {% block rightcontent %}
>style="width:210px;height:180px;margin-left:2em;margin-top:.50em;margin-bottom:.25em;padding:5px;border-color:#d9d9d9;border-width:3px;border-style:
>  solid;">
>
>  onclick="{uploadimage.style.visibility='visible'}">Update Image
> 
>
>   
>style="position:absolute;height:150px;width:350px;visibility:hidden;margin-left:.50em;background-color:#f1f1f1;paddin:5px;border-width:1px;">
>   {% csrf_token %}
>
>
>
>  style="margin-top:30px;" onclick="return donefunction()">
>
>
>   
> {% endblock %}
>
> views.py page -
> def profilesetting(request,uname):
> user=User.objects.get(username=uname)
> bag=Bag.objects.filter(creator=user.username)
> if request.method=='POST':
>   user.name=request.POST['name']
>   user.email=request.POST['email']
>   if request.POST['phone']!="":
> user.phone=request.POST['phone']
>   user.about=request.POST['about']
>   user.website=request.POST['website']
>   user.location=request.POST['location']
>   user.save()
> return 
> render_to_response('profilesetting.html',{'user':user,'bag':bag},context_instance=RequestContext(request))
>
> models.py --
>
> from thumbs import ImageWithThumbsField
> from django.db import IntegrityError
> from django.db import models
> import datetime
>
> class User(models.Model):
>   
>   username  = models.CharField(max_length=65, primary_key=True)
>   name  = models.CharField(max_length=64)
>   dob   = models.DateField()
>   gender_choices= (('m','male'),('f','female'))
>   gender= 
> models.CharField(max_length=1,choices=gender_choices)
>   email = models.EmailField(verbose_name='your e-mail')
>   permission= 
> models.DecimalField(max_digits=3,decimal_places=0,blank=True, null=True)
>   password  = models.CharField(max_length=32)
>   phone = models.DecimalField(max_digits=11,decimal_places=0, 
> blank=True, null=True)
>   pic   = ImageWithThumbsField(upload_to='images',blank=True, 
> null=True)
>   about = models.TextField()
>   profile_view  = models.DecimalField(max_digits=8,decimal_places=0, 
> null=True)
>   location  = models.TextField()
>   website   = models.URLField(max_length=64,blank=True, null=True)
>   reputation= models.DecimalField(max_digits=8,decimal_places=0)
>   doj   = models.DateField(auto_now_add=True)
>   def __str__(self):
>   #return 
> (self.name,self.dob,self.email,self.about,self.profile_view,self.location,self.website,self.tags,self.num_of_que_asked,self.num_of_que_answered,self.doj)
>   return (self.name)
>   def reg(self):
>   return (self.name,self.username)
>   def save(self,*args, **kw):
>   super(User,self).save(*args, **kw)
>   class Admin:
>   pass
>
>
> please help me, I am unable to solve this problem.
>
> thanks.
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Vis

RE: error - MultiValueDictKeyError at /profilesetting/ramuss

2013-05-09 Thread Babatunde Akinyanmi
Two forms in one template? You need to be aware that you will only be able
to submit one at a time.

Maybe you should try using django's form wizard:
https://docs.djangoproject.com/en/1.5/ref/contrib/formtools/form-wizard/


Sent from my Windows Phone
--
From: Avnesh Shakya
Sent: 5/9/2013 10:09 AM
To: django-users@googlegroups.com
Subject: Re: error - MultiValueDictKeyError at /profilesetting/ramuss

Thanks, but I am using two form in my single template, so how will it
possible to create views for both form for post method.


On Thu, May 9, 2013 at 2:08 PM, Babatunde Akinyanmi wrote:

> Hi Avnesh,
> Your form has only one input with name as "pic" but in your view you are
> checking the QueryDict for six keys and none of them is even named "pic".
>
> meanwhile, I see that you are trying to upload a file, so you might want
> to read https://docs.djangoproject.com/en/dev/topics/http/file-uploads/before 
> you proceed
>
> Sent from my Windows Phone
> --
> From: Avnesh Shakya
> Sent: 5/9/2013 5:31 AM
> To: django-users@googlegroups.com
> Subject: error - MultiValueDictKeyError at /profilesetting/ramuss
>
> hi,
> I am facing error -
> MultiValueDictKeyError at /profilesetting/ramuss
>
> "Key 'name' not found in "
>
>
> I am trying to upload image using dynamically(using javascript),
> but when I click on upload button after selecting image, it's showing this 
> error.
>
> my html page contain-
>
> {% block scriptquery %}
>
>
> 
> function donefunction()
> {
>  visibility='hidden';
> return true;
> }
> };
> 
> {% endblock %}
> {% block rightcontent %}
>style="width:210px;height:180px;margin-left:2em;margin-top:.50em;margin-bottom:.25em;padding:5px;border-color:#d9d9d9;border-width:3px;border-style:
>  solid;">
>
>
>  onclick="{uploadimage.style.visibility='visible'}">Update Image
> 
>
>
>   
>style="position:absolute;height:150px;width:350px;visibility:hidden;margin-left:.50em;background-color:#f1f1f1;paddin:5px;border-width:1px;">
>   {% csrf_token %}
>
>
>
>
>  style="margin-top:30px;" onclick="return donefunction()">
>
>
>
>   
> {% endblock %}
>
> views.py page -
> def profilesetting(request,uname):
> user=User.objects.get(username=uname)
> bag=Bag.objects.filter(creator=user.username)
> if request.method=='POST':
>   user.name=request.POST['name']
>   user.email=request.POST['email']
>   if request.POST['phone']!="":
> user.phone=request.POST['phone']
>   user.about=request.POST['about']
>   user.website=request.POST['website']
>   user.location=request.POST['location']
>   user.save()
> return 
> render_to_response('profilesetting.html',{'user':user,'bag':bag},context_instance=RequestContext(request))
>
> models.py --
>
> from thumbs import ImageWithThumbsField
> from django.db import IntegrityError
> from django.db import models
> import datetime
>
> class User(models.Model):
>   
>   username  = models.CharField(max_length=65, primary_key=True)
>   name  = models.CharField(max_length=64)
>   dob   = models.DateField()
>   gender_choices= (('m','male'),('f','female'))
>   gender= 
> models.CharField(max_length=1,choices=gender_choices)
>   email = models.EmailField(verbose_name='your e-mail')
>   permission= 
> models.DecimalField(max_digits=3,decimal_places=0,blank=True, null=True)
>   password  = models.CharField(max_length=32)
>   phone = models.DecimalField(max_digits=11,decimal_places=0, 
> blank=True, null=True)
>   pic   = ImageWithThumbsField(upload_to='images',blank=True, 
> null=True)
>   about = models.TextField()
>   profile_view  = models.DecimalField(max_digits=8,decimal_places=0, 
> null=True)
>   location  = models.TextField()
>   website   = models.URLField(max_length=64,blank=True, null=True)
>   reputation= models.DecimalField(max_digits=8,decimal_places=0)
>   doj   = models.DateField(auto_now_add=True)
>   def __str__(self):
>   #return 
> (self.name,self.dob,self.email,self.about,self.profile_view,self.location,self.website,self.tags,self.num_of_que_asked,self.num_of_que_answered,self.doj)
>   return (self.name)
>   def reg(self):
>   return (self.name,self.username)
>   def save(self,*args, **kw):
>   super(User,self).save(*args, **kw)
>   class Admin:
>   pass
>
>
> please help me, I am unable to solve this problem.
>
> thanks.
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this 

unique not working as expected

2013-05-09 Thread Amber Kulkarni
I have created a model as follows :

class server(models.Mode):
 link = models.CharField(unique=True,max_length=200) 
 crawled_flag = models.CharField(max_length = 1,default="F")

I open the shell and do the following.

from app_name.models import server

a = server(link = "www.abc.com")
a.save()

server.objects.values_list()
[(1,u'www.abc.com',u'F')]

I do the same again and it also inserts it.

a = server(link = "www.abc.com")
a.save()
server.objects.values_list()
[ (1,u'www.abc.com',u'F') , (2,u'www.abc.com',u'F')]

I am not understanding this behaviour. Please help.
The database I am using is sqlite3.

Thanks,
Amber

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




NoReverseMatch at /app/

2013-05-09 Thread Carlos Aboim
I am getting a strange error on my humble opinion..

*Why am I getting this error?*

Reverse for 'registo.detail' with arguments '(1,)' and keyword arguments '{}' 
not found.


*my views:*

from django.views.generic.edit import CreateView, UpdateView, DeleteView
from django.shortcuts import render_to_response
from django.db.models import Count

from paletes.models import Registo

# lista de paletes
def registo_paletes(request):
registos = Registo.objects.all()

return render_to_response("paletes/registo_paletes.html", {'registos': 
registos})


# detalhe
class registo_Detail(UpdateView):

model = Registo


*my urls*:

from django.conf.urls import patterns, include, url
from paletes.views import registo_paletes, registo_Detail

urlpatterns = patterns('',
  url(r'^$', registo_paletes, name='index'),
  url(r'registo/(?P\d+)', registo_Detail.as_view(), name='detail'),
)


*my template:*
{% extends "flatpages/default.html" %}

{% block content %}






Guia Cliente Data Total paletes LS

{% for registo in registos %}

{{ 
registo.guia_de_remessa }}{{ registo.cliente }}{{ 
registo.data }}{{ registo.total_paletes_LS }} 

{% endfor %}
 


{% endblock %}

I can't pass over it, can you help with this inssue?
Thanks

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




Re: unique not working as expected

2013-05-09 Thread Amber Kulkarni
I checked the table using python manage.py sql app_name
it shows the following

create table "tp_app_server" (
 "id " integer not null primary key,
  "link"  varchar(200) not null unique
  "crawled_flag" varchar(1) not null
)
;
COMMIT

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




[newbie question] python manage syncdb doesn't create all the tables. Models has been splitted up.

2013-05-09 Thread crosa
Hi guys,

I'm testing django in order to build a little application. This application 
will have several models, so I've decided to split up them, in order to do 
this more readable (Any other form to do this?)
When I run python manage.py syncdb, the models tables have not been 
created, and I don't know why!

I have tried to use south for the migration too, and when I run this:
python manage.py schemamigration testapp --initial
This error appears.
ImproperlyConfigured: App with label testapp could not be found

I think it's something related with the models split up, but I don't know 
what

Here we are the testproject tree (attached).

├── [-rwxr-xr-x  250 May  9 13:14]  manage.py
├── [drwxr-xr-x 4.0K May  9 13:51]  templates
│   ├── [-rw-r--r--  111 May  9 13:50]  view1.html
│   ├── [-rw-r--r--  111 May  9 13:50]  view2.html
│   └── [-rw-r--r--  111 May  9 13:51]  view3.html
└── [drwxr-xr-x 4.0K May  9 13:54]  testapp
├── [-rw-r--r--  406 May  9 13:23]  admin.py
├── [-rw-r--r--   27 May  9 13:23]  forms.py
├── [-rw-r--r--0 May  9 13:10]  __init__.py
├── [drwxr-xr-x 4.0K May  9 13:32]  models
│   ├── [-rw-r--r--  133 May  9 13:32]  __init__.py
│   ├── [-rw-r--r--  588 May  9 13:30]  model1.py
│   ├── [-rw-r--r--  921 May  9 13:31]  model2.py
│   └── [-rw-r--r--  588 May  9 13:32]  model3.py
├── [-rw-r--r-- 5.4K May  9 13:24]  settings.py
├── [-rw-r--r--  39K May  9 13:48]  sqlite.db
├── [-rw-r--r--  774 May  9 13:52]  urls.py
├── [-rw-r--r--  746 May  9 13:48]  views.py
└── [-rw-r--r-- 1.4K May  9 13:17]  wsgi.py

Thanks in advance!

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




testapprj.tar.gz
Description: Binary data


Re: [newbie question] python manage syncdb doesn't create all the tables. Models has been splitted up.

2013-05-09 Thread Mike Dewhirst

On 9/05/2013 10:04pm, crosa wrote:

Hi guys,

I'm testing django in order to build a little application. This
application will have several models, so I've decided to split up them,
in order to do this more readable (Any other form to do this?)
When I run python manage.py syncdb, the models tables have not been
created, and I don't know why!


Check this ...

https://docs.djangoproject.com/en/dev/ref/models/options/#app-label



I have tried to use south for the migration too, and when I run this:
python manage.py schemamigration testapp --initial
This error appears.
ImproperlyConfigured: App with label testapp could not be found

I think it's something related with the models split up, but I don't
know what

Here we are the testproject tree (attached).

├── [-rwxr-xr-x  250 May  9 13:14]  manage.py
├── [drwxr-xr-x 4.0K May  9 13:51]  templates
│   ├── [-rw-r--r--  111 May  9 13:50]  view1.html
│   ├── [-rw-r--r--  111 May  9 13:50]  view2.html
│   └── [-rw-r--r--  111 May  9 13:51]  view3.html
└── [drwxr-xr-x 4.0K May  9 13:54]  testapp
 ├── [-rw-r--r--  406 May  9 13:23]  admin.py
 ├── [-rw-r--r--   27 May  9 13:23]  forms.py
 ├── [-rw-r--r--0 May  9 13:10]  __init__.py
 ├── [drwxr-xr-x 4.0K May  9 13:32]  models
 │   ├── [-rw-r--r--  133 May  9 13:32]  __init__.py
 │   ├── [-rw-r--r--  588 May  9 13:30]  model1.py
 │   ├── [-rw-r--r--  921 May  9 13:31]  model2.py
 │   └── [-rw-r--r--  588 May  9 13:32]  model3.py
 ├── [-rw-r--r-- 5.4K May  9 13:24]  settings.py
 ├── [-rw-r--r--  39K May  9 13:48]  sqlite.db
 ├── [-rw-r--r--  774 May  9 13:52]  urls.py
 ├── [-rw-r--r--  746 May  9 13:48]  views.py
 └── [-rw-r--r-- 1.4K May  9 13:17]  wsgi.py

Thanks in advance!

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




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




Re: Customizing Admin

2013-05-09 Thread Rafael E. Ferrero
I think you can customize the django admin templates for your own purpose


2013/5/7 Cody Scott 

> Is there a way to put text in the django admin?
>
> I am trying to display information from another model, to help in your
> select of ForeignKeys.
>
> Right now I am adding this information to the __unicode__ function so I
> can see the information but there is not context.
>
> Also is there a way to make a MultipleSelect box larger or re-sizeable?
> Is there also a way to make this field searchable?
>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>



-- 
Rafael E. Ferrero
Claro: (03562) 15514856

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




Re: Accessing django development server using internet

2013-05-09 Thread Rafael E. Ferrero
you can do like Tim says if you want to share your project with your local
network if you want to share with the world then you are talking about a
"production" server.




2013/5/7 Kakar Arunachal Service 

> Sorry, i'm on win 7.
>
>
> On Tue, May 7, 2013 at 9:30 PM, Shawn Milochik  wrote:
>
>> pip install gunicorn, then run python manage.py run_gunicorn instead of
>> runserver.
>>
>> Ensure that the port you're running your app on is being handled properly
>> by your Web server app (nginx or Apache). This means that hits to your URL
>> hit the Web server and are being directed internally at your listening port.
>>
>>  --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to django-users+unsubscr...@googlegroups.com.
>> To post to this group, send email to django-users@googlegroups.com.
>> Visit this group at http://groups.google.com/group/django-users?hl=en.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>>
>>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>



-- 
Rafael E. Ferrero
Claro: (03562) 15514856

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




Re: [newbie question] python manage syncdb doesn't create all the tables. Models has been splitted up.

2013-05-09 Thread crosa
I found the error. The application wasn't in the INSTALLED_APP in the 
settings file! 


On Thursday, May 9, 2013 2:13:19 PM UTC+2, Mike Dewhirst wrote:
>
> On 9/05/2013 10:04pm, crosa wrote: 
> > Hi guys, 
> > 
> > I'm testing django in order to build a little application. This 
> > application will have several models, so I've decided to split up them, 
> > in order to do this more readable (Any other form to do this?) 
> > When I run python manage.py syncdb, the models tables have not been 
> > created, and I don't know why! 
>
> Check this ... 
>
> https://docs.djangoproject.com/en/dev/ref/models/options/#app-label 
>
> > 
> > I have tried to use south for the migration too, and when I run this: 
> > python manage.py schemamigration testapp --initial 
> > This error appears. 
> > ImproperlyConfigured: App with label testapp could not be found 
> > 
> > I think it's something related with the models split up, but I don't 
> > know what 
> > 
> > Here we are the testproject tree (attached). 
> > 
> > ├── [-rwxr-xr-x  250 May  9 13:14]  manage.py 
> > ├── [drwxr-xr-x 4.0K May  9 13:51]  templates 
> > │   ├── [-rw-r--r--  111 May  9 13:50]  view1.html 
> > │   ├── [-rw-r--r--  111 May  9 13:50]  view2.html 
> > │   └── [-rw-r--r--  111 May  9 13:51]  view3.html 
> > └── [drwxr-xr-x 4.0K May  9 13:54]  testapp 
> >  ├── [-rw-r--r--  406 May  9 13:23]  admin.py 
> >  ├── [-rw-r--r--   27 May  9 13:23]  forms.py 
> >  ├── [-rw-r--r--0 May  9 13:10]  __init__.py 
> >  ├── [drwxr-xr-x 4.0K May  9 13:32]  models 
> >  │   ├── [-rw-r--r--  133 May  9 13:32]  __init__.py 
> >  │   ├── [-rw-r--r--  588 May  9 13:30]  model1.py 
> >  │   ├── [-rw-r--r--  921 May  9 13:31]  model2.py 
> >  │   └── [-rw-r--r--  588 May  9 13:32]  model3.py 
> >  ├── [-rw-r--r-- 5.4K May  9 13:24]  settings.py 
> >  ├── [-rw-r--r--  39K May  9 13:48]  sqlite.db 
> >  ├── [-rw-r--r--  774 May  9 13:52]  urls.py 
> >  ├── [-rw-r--r--  746 May  9 13:48]  views.py 
> >  └── [-rw-r--r-- 1.4K May  9 13:17]  wsgi.py 
> > 
> > Thanks in advance! 
> > 
> > -- 
> > You received this message because you are subscribed to the Google 
> > Groups "Django users" group. 
> > To unsubscribe from this group and stop receiving emails from it, send 
> > an email to django-users...@googlegroups.com . 
> > To post to this group, send email to 
> > django...@googlegroups.com. 
>
> > Visit this group at http://groups.google.com/group/django-users?hl=en. 
> > For more options, visit https://groups.google.com/groups/opt_out. 
> > 
> > 
>
>

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




Re: unique not working as expected

2013-05-09 Thread Tom Evans
On Thu, May 9, 2013 at 12:47 PM, Amber Kulkarni
 wrote:
> I checked the table using python manage.py sql app_name
> it shows the following
>
> create table "tp_app_server" (
>  "id " integer not null primary key,
>   "link"  varchar(200) not null unique
>   "crawled_flag" varchar(1) not null
> )
> ;
> COMMIT
>

That just shows the SQL Django would use to create the table, it says
nothing about how the table is currently constructed.

Use the .schema command in sqlite shell to see the current structure
of the table. Does it have a unique key on link?

Cheers

Tom

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




Re: Accessing django development server using internet

2013-05-09 Thread Tim Chase
On 2013-05-09 09:21, Rafael E. Ferrero wrote:
> you can do like Tim says if you want to share your project with
> your local network if you want to share with the world then you are
> talking about a "production" server.

I personally would even be comfortable putting it online (non-local
network) as long as it was brief, mostly in a time-sensitive way
(such as IM or phone) saying "Hey, Pat, could you take a look at
http://home.example.com: and let me know whether you prefer the
new look for the login screen?", then taking it down immediately
afterwards.

-tim


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




middleware

2013-05-09 Thread Anderson
Does anyone know if is possible execute a middleware only to a specific
application or url?

-- 
Anderson Dias Borges
Senior Analyst Developer

Tu cumprirás o desejo do meu coração se eu Te buscar...
I can't see but I'll take my chances
To hear You call my name

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




Re: middleware

2013-05-09 Thread Shawn Milochik
In your middleware you'll have access to the request object, so you can
easily check the URL, user, etc.

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




Problem with django 1.5.1

2013-05-09 Thread kl4us
I have this code http://pastebin.com/xTJTmZws
with django 1.4.3 on OSX works fine, on ubuntu with django 1.5.1 i have 
error "coercing to Unicode: need string or buffer, Post found" at line "{% 
url post slug=post.slug %}" of template post_list.html.

Why and how can i adjust this?

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




Re: Problem with django 1.5.1

2013-05-09 Thread Elliot Bradbury
Hey kl4us,

I think the problem is that you need to specify the URL name as a string,
like: {% url 'post' slug=post.slug %}

https://docs.djangoproject.com/en/dev/topics/http/urls/#naming-url-patterns

Elliot


On Thu, May 9, 2013 at 10:29 AM, kl4us  wrote:

> I have this code http://pastebin.com/xTJTmZws
> with django 1.4.3 on OSX works fine, on ubuntu with django 1.5.1 i have
> error "coercing to Unicode: need string or buffer, Post found" at line
> "{% url post slug=post.slug %}" of template post_list.html.
>
> Why and how can i adjust this?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

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




Hello I am a newbie

2013-05-09 Thread Bola Balogun
I am trying to run my first django project on windows 7 unfortunately when 
I enter the command 
(django-test) C:\virtualenvs\django-test> python -m django-admin 
startproject django-test.
 in my command prompt I get 
No module named django-admin
Pls kindly help
Thank you.

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




Re: NoReverseMatch at /app/

2013-05-09 Thread Gonzalo Delgado
Try this instead in your template:

{% url 'detail' registo.id %}

When referencing named urls, the name must be exactly as defined in the url
pattern.

2013/5/9 Carlos Aboim 

> {% url 'registo.detail' registo.id %}
>


-- 
Gonzalo Delgado

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




Re: Problem with django 1.5.1

2013-05-09 Thread kl4us
works, thanks a lot

Il giorno giovedì 9 maggio 2013 16:37:11 UTC+2, ejb ha scritto:
>
> Hey kl4us,
>
> I think the problem is that you need to specify the URL name as a string, 
> like: {% url 'post' slug=post.slug %}
>
> https://docs.djangoproject.com/en/dev/topics/http/urls/#naming-url-patterns
>
> Elliot
>
>
> On Thu, May 9, 2013 at 10:29 AM, kl4us  >wrote:
>
>> I have this code http://pastebin.com/xTJTmZws
>> with django 1.4.3 on OSX works fine, on ubuntu with django 1.5.1 i have 
>> error "coercing to Unicode: need string or buffer, Post found" at line 
>> "{% url post slug=post.slug %}" of template post_list.html.
>>
>> Why and how can i adjust this?
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to django-users...@googlegroups.com .
>> To post to this group, send email to django...@googlegroups.com
>> .
>> Visit this group at http://groups.google.com/group/django-users?hl=en.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>  
>>  
>>
>
>

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




Re: unique not working as expected

2013-05-09 Thread Amber Kulkarni
Thanks Tom.
Got the problem.Problem solved on creating new model.


On Thu, May 9, 2013 at 6:53 PM, Tom Evans  wrote:

> On Thu, May 9, 2013 at 12:47 PM, Amber Kulkarni
>  wrote:
> > I checked the table using python manage.py sql app_name
> > it shows the following
> >
> > create table "tp_app_server" (
> >  "id " integer not null primary key,
> >   "link"  varchar(200) not null unique
> >   "crawled_flag" varchar(1) not null
> > )
> > ;
> > COMMIT
> >
>
> That just shows the SQL Django would use to create the table, it says
> nothing about how the table is currently constructed.
>
> Use the .schema command in sqlite shell to see the current structure
> of the table. Does it have a unique key on link?
>
> Cheers
>
> Tom
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Django users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/django-users/LFzuzEo-g1o/unsubscribe?hl=en
> .
> To unsubscribe from this group and all its topics, send an email to
> django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>


-- 
AMBER KULKARNI

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




Receive data in a view

2013-05-09 Thread Hélio Miranda
Hi
I have a client-server application, and need to send my customer data for a 
view in django.
I wanted to send my client (AngularJS), a name I need to use the view in 
django.

If you send this name by http post, as I do in view in django to receive 
and use?

I'm new to django, someone can help me?

thank you

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




Re: Customizing Admin

2013-05-09 Thread Cody Scott
I am trying to create a form to select but I don't want to list all of the
options because there are too many.

Is there a way to allow the visitor to search and only have the query show
up in the form?

Even if it is not in the admin.


On Thu, May 9, 2013 at 8:17 AM, Rafael E. Ferrero
wrote:

> I think you can customize the django admin templates for your own purpose
>
>
> 2013/5/7 Cody Scott 
>
>> Is there a way to put text in the django admin?
>>
>> I am trying to display information from another model, to help in your
>> select of ForeignKeys.
>>
>> Right now I am adding this information to the __unicode__ function so I
>> can see the information but there is not context.
>>
>> Also is there a way to make a MultipleSelect box larger or re-sizeable?
>> Is there also a way to make this field searchable?
>>
>>
>>  --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to django-users+unsubscr...@googlegroups.com.
>>
>> To post to this group, send email to django-users@googlegroups.com.
>> Visit this group at http://groups.google.com/group/django-users?hl=en.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>>
>>
>
>
>
> --
> Rafael E. Ferrero
> Claro: (03562) 15514856
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Django users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/django-users/N61oAMvbTXg/unsubscribe?hl=en
> .
> To unsubscribe from this group and all its topics, send an email to
> django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

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




Re: unique not working as expected

2013-05-09 Thread C. Kirby
Could you elaborate on what the resolution was for future people who may 
run into this problem?

On Thursday, May 9, 2013 9:59:00 AM UTC-5, Amber Kulkarni wrote:
>
> Thanks Tom.
> Got the problem.Problem solved on creating new model.
>
>
> On Thu, May 9, 2013 at 6:53 PM, Tom Evans 
> > wrote:
>
>> On Thu, May 9, 2013 at 12:47 PM, Amber Kulkarni
>> > wrote:
>> > I checked the table using python manage.py sql app_name
>> > it shows the following
>> >
>> > create table "tp_app_server" (
>> >  "id " integer not null primary key,
>> >   "link"  varchar(200) not null unique
>> >   "crawled_flag" varchar(1) not null
>> > )
>> > ;
>> > COMMIT
>> >
>>
>> That just shows the SQL Django would use to create the table, it says
>> nothing about how the table is currently constructed.
>>
>> Use the .schema command in sqlite shell to see the current structure
>> of the table. Does it have a unique key on link?
>>
>> Cheers
>>
>> Tom
>>
>> --
>> You received this message because you are subscribed to a topic in the 
>> Google Groups "Django users" group.
>> To unsubscribe from this topic, visit 
>> https://groups.google.com/d/topic/django-users/LFzuzEo-g1o/unsubscribe?hl=en
>> .
>> To unsubscribe from this group and all its topics, send an email to 
>> django-users...@googlegroups.com .
>> To post to this group, send email to django...@googlegroups.com
>> .
>> Visit this group at http://groups.google.com/group/django-users?hl=en.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>>
>>
>
>
> -- 
> AMBER KULKARNI 
>

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




Re: ManyToManyField and get_or_create

2013-05-09 Thread Mick T.
I have the same problem, looks like it's a bug:

https://code.djangoproject.com/ticket/18896

On Friday, 31 August 2012 18:55:39 UTC-4, Matt Long wrote:
>
> Bump?
>
> Almost exactly 4 years later, I've ran into this exact same issue in 
> Django 1.4. Attempting to use get_or_create through a ManyToMany field 
> results in an integrity error if the object already exists but is not yet 
> associated with the parent object. To use the OP's example, if a Tag with 
> name "foo" exists but is not yet associated with a given Thing instance, 
> using .tags.get_or_create(name='foo') will indeed raise an IntegrityError:
>
> foo_tag = Tag(name='foo')
> foo_tag.save()
>
> a_thing = Thing(name='a')
> a_thing.save() 
> a_thing.tags.get_or_create(name='foo')
>
> Traceback (most recent call last):
>   File "", line 1, in 
>   File 
> "/usr/local/lib/python2.7/dist-packages/django/db/models/fields/related.py", 
> line 616, in get_or_create
> super(ManyRelatedManager, self.db_manager(db)).get_or_create(**kwargs)
>   File 
> "/usr/local/lib/python2.7/dist-packages/django/db/models/manager.py", line 
> 134, in get_or_create
> return self.get_query_set().get_or_create(**kwargs)
>   File "/usr/local/lib/python2.7/dist-packages/django/db/models/query.py", 
> line 449, in get_or_create
> obj.save(force_insert=True, using=self.db)
>   File "/usr/local/lib/python2.7/dist-packages/django/db/models/base.py", 
> line 463, in save
> self.save_base(using=using, force_insert=force_insert, 
> force_update=force_update)
>   File "/usr/local/lib/python2.7/dist-packages/django/db/models/base.py", 
> line 551, in save_base
> result = manager._insert([self], fields=fields, return_id=update_pk, 
> using=using, raw=raw)
>   File 
> "/usr/local/lib/python2.7/dist-packages/django/db/models/manager.py", line 
> 203, in _insert
> return insert_query(self.model, objs, fields, **kwargs)
>   File "/usr/local/lib/python2.7/dist-packages/django/db/models/query.py", 
> line 1576, in insert_query
> return query.get_compiler(using=using).execute_sql(return_id)
>   File 
> "/usr/local/lib/python2.7/dist-packages/django/db/models/sql/compiler.py", 
> line 910, in execute_sql
> cursor.execute(sql, params)
>   File 
> "/usr/local/lib/python2.7/dist-packages/django/db/backends/util.py", line 
> 40, in execute
> return self.cursor.execute(sql, params)
>   File 
> "/usr/local/lib/python2.7/dist-packages/django/db/backends/sqlite3/base.py", 
> line 337, in execute
> return Database.Cursor.execute(self, query, params)
> IntegrityError: column name is not unique
>
> I've traced the problem to being that the ManyRelatedManager includes its 
> core_filters in its get_query_set method. This results in the "get" portion 
> of get_or_create to only return a hit if the Tag exists and is already 
> associated to the calling Thing instance. Given the nature of a 
> many-to-many relationship, it should not be a requirement that a Tag 
> already be linked to the calling Thing for get_or_create to find it; it 
> should be enough that the Tag simply exists. All that should happen in that 
> scenario is that the (existing) Tag's relationship with the calling Thing 
> be created/saved.
>
> On Monday, September 1, 2008 8:04:00 PM UTC-7, Cap wrote:
>>
>> I'm having problems using get_or_create with a ManyToManyField and I'm 
>> not sure whether the problem is me or Django. 
>>
>> I have two models: 
>>
>> class Tag(models.Model): 
>> name = models.CharField(max_length=256, unique=True) 
>>
>> class Thing(models.Model): 
>> name = models.CharField(max_length=256) 
>> tags = models.ManyToManyField(Tag) 
>>
>> When I try to add a tag that already exists, as: 
>>
>> a = Thing(name='a') 
>> a.save() 
>> a.tags.get_or_create(name='foo') 
>>
>> I get sqlite3.IntegrityError: column name is not unique. 
>>
>> But when I do it like so: 
>>
>> a = Thing(name='a') 
>> a.save() 
>> foo, created = Tag.objects.get_or_create(name='foo') 
>> a.tags.add(foo) 
>>
>> I have no problems. 
>>
>> I noticed that http://code.djangoproject.com/ticket/3121 seemed to 
>> address something like this, so I pulled the latest Django (8834), but 
>> the problems remains. 
>>
>> Am I doing it wrong? 
>>
>

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




Re: Dynamic forms and related models.

2013-05-09 Thread Andre Terra
On Wed, May 8, 2013 at 6:43 PM, noodlygod  wrote:

> 
> 
> <
> Class Level (Text field)>
>  Definition.objects.filter(category__label='Skill'))> field)>
>  Definition.objects.filter(category__label=Attribute'))>< Attribute score
> (Text field)>
>
> I was on my way to creating a fully custom form in templates but that
> doesn't seem very django-y. I also discovered the queryset component in
> Select fields. I feel like there should be a way to do this and it may be
> simple but I've thought myself into a tangled mess. Any help would be
> appreciated. Thanks!
>

Isn't a ModelChoiceField[0] what you need? Just customize the queryset
attribute to restrict the available choices. My django-fu is a little
rusty, but IIRC you can define fields at runtime by subclassing __init__
and extending self.fields, which is a dict.


Cheers,
AT

[0] https://docs.djangoproject.com/en/dev/ref/forms/fields/#modelchoicefield

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




[ANN] Python in the browser by Python

2013-05-09 Thread Amirouche Boubekki
Héllo,

I just released a new version of PythonScript ,
a "variant" of Python that compiles to javascript. It should be very
similar to CPython, but not the primary goal. Having something that's easy
to work with (right now), without sacryfing for speed or implementation
complexity are the primary goals.

I take the opportunity of this new release to reach Djangonauts because I
think that you might be interested.

FAQ:

*wat?)* So, how does it looks like ? Just like Python!

*demo)* What can I do with it ? Probably something, here is a mosaic of
links 
[source
].

*100%)* Is it 100% compatible with CPython ? No, and it won't be, the only
thing that will be 100% compatible with CPython is an interpreter
translated to javascript (possible PythonScript future) or written in
Javascript (like Brython).

*django)* How does it work with Django ? Just like CoffeeScript I guess,
there is a demo app in the repository and a mini-explanation on the
website
.

*tldr)* I'm lazy, can I haz cheese burger ? No, but you can try the online
editor .

*future)* Where is it headed ? I'm looking forward building something like
Meteor , a backend+frontend framework, then writte an
interpreter in PythonJS [1] that is 100% compatible with CPython. If you
are interested in such a project send me an email.

*doc)* I started a bit of
documentation
.

*jquery)* Does it have jQuery bindings ?
Yes
!

*tests)* Is there any tests ? No...

*help)* How can I help ? As usual, use it, write about it, tell me if
something is wrong, do a PR, anyway notify me if you do something. Also you
can reach me directly if you want. You can also
RT
.

*forge)* Where is the code? https://github.com/amirouche/PythonScript

*copying)* I changed (in the develop branch) to LGPL 2.1 so it's similar to
MIT/Apache/new-BSD aka. business friendly but free software.

Cheers,

Amirouche

[1] a subset of Python that translates to a subset of Javascript used in
PythonScript to implement Python...

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




Re: [ANN] Python in the browser by Python

2013-05-09 Thread Javier Guerra Giraldez
On Thu, May 9, 2013 at 11:55 AM, Amirouche Boubekki
 wrote:
> I just released a new version of PythonScript, a "variant" of Python that
> compiles to javascript.


nice!

how does it compare with Pyjamas (http://pyjs.org/) ?

--
Javier

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




Why would Django (1.5.1) call Loader.load_template_source() over and over again?

2013-05-09 Thread Wesley Kincaid
I've got a fairly standard ListView trying to render a template stored in 
my DB (originally via the dbtemplates lib, finally trying my own template 
loader).  However, the view times out in the browser.  After some 
investigation, it seems that Loader.load_template_source() is called 69 
times in the process.  Does anyone see an issue in my code or can you come 
up with a reason why this is the case?

*visitor_index (db template)*
*
*




{{ site.name }}



Starting
{% for video in videos %}
{{ video.headline }}
{% endfor %}






*urls.py*

from django.conf.urls import include, url
from django.conf.urls.defaults import patterns
from videos.views import *

urlpatterns = patterns('',
url(r'^$', VisitorIndex.as_view(), name='index'),
)

*views.py*

import logging
from django.views.generic import ListView
from videos.models import Video

logger = logging.getLogger(__name__)

class VisitorIndex(ListView):
context_object_name = 'videos'
template_name = 'visitor_index'

def get_queryset(self):
logger.debug('VisitorIndex.get_queryset()')
return Video.on_site.filter(privacy_mode='PUB')

*loader.py*

import logging
from django.template import TemplateDoesNotExist
from django.template.loader import BaseLoader
from dbtemplates.models import Template

logger = logging.getLogger(__name__)

class Loader(BaseLoader):
is_usable = True

def load_template_source(self, template_name, template_dirs=None):
try:
logger.debug('Loader.load_template_source(%s, %s)' % 
(template_name, template_dirs))
template = 
Template.on_site.get(slug__exact=template_name).template_body
logger.debug('Loaded template.')
return template, template_name
except Template.DoesNotExist:
logger.debug('Template.DoesNotExist caught.')
raise TemplateDoesNotExist, template_name

*models.py*

import logging
from django.contrib.sites.models import Site
from django.contrib.sites.managers import CurrentSiteManager
from django.db import models

logger = logging.getLogger('__name__')

class Template(models.Model):
slug = models.CharField(max_length=80)
template_body = models.TextField()
site = models.ForeignKey(Site)

objects = models.Manager()
on_site = CurrentSiteManager('site')

def __unicode__(self):
return self.slug

*settings.py*

TEMPLATE_LOADERS = (
'django.template.loaders.filesystem.Loader',
'django.template.loaders.app_directories.Loader',
'dbtemplates.loader.Loader',
)

*app.log*

2013-05-08 15:08:26,167 [DEBUG] dynamicsites.middleware: ENV_HOSTNAMES 
lookup subdomain=None domain=mydomain.com domain_unsplit=mydomain.com
2013-05-08 15:08:26,168 [DEBUG] dynamicsites.middleware: Checking 
database for domain=mydomain.com
2013-05-08 15:08:26,227 [DEBUG] dynamicsites.middleware: Using site 
id=2 domain=mydomain.com
2013-05-08 15:08:26,261 [DEBUG] videos.views: 
VisitorIndex.get_queryset()
2013-05-08 15:08:26,265 [DEBUG] dbtemplates.loader: 
Loader.load_template_source(visitor_index, None)
2013-05-08 15:08:26,426 [DEBUG] dbtemplates.loader: Loaded template.
2013-05-08 15:08:26,542 [DEBUG] dbtemplates.loader: 
Loader.load_template_source(visitor_index, None)
2013-05-08 15:08:26,554 [DEBUG] dbtemplates.loader: 
Loader.load_template_source(visitor_index, None)
2013-05-08 15:08:26,569 [DEBUG] dbtemplates.loader: 
Loader.load_template_source(visitor_index, None)
2013-05-08 15:08:26,587 [DEBUG] dbtemplates.loader: 
Loader.load_template_source(visitor_index, None)
2013-05-08 15:08:26,608 [DEBUG] dbtemplates.loader: 
Loader.load_template_source(visitor_index, None)
2013-05-08 15:08:26,632 [DEBUG] dbtemplates.loader: 
Loader.load_template_source(visitor_index, None)
2013-05-08 15:08:26,658 [DEBUG] dbtemplates.loader: 
Loader.load_template_source(visitor_index, None)
2013-05-08 15:08:26,689 [DEBUG] dbtemplates.loader: 
Loader.load_template_source(visitor_index, None)
2013-05-08 15:08:26,721 [DEBUG] dbtemplates.loader: 
Loader.load_template_source(visitor_index, None)
2013-05-08 15:08:26,756 [DEBUG] dbtemplates.loader: 
Loader.load_template_source(visitor_index, None)
2013-05-08 15:08:26,794 [DEBUG] dbtemplates.loader: 
Loader.load_template_source(visitor_index, None)
2013-05-08 15:08:26,835 [DEBUG] dbtemplates.loader: 
Loader.load_template_source(visitor_index, None)
2013-05-08 15:08:26,897 [DEBUG] dbtemplates.loader: 
Loader.load_template_source(visitor_index, None)
2013-05-08 15:08:26,944 [DEBUG] dbtemplates.loader: 
Loader.load_template_source(visitor_index, None)
2013-05-08 15:08:26,998 [DEBUG] dbtemplates.loader: 
Loader.load_template_sourc

problem setting up DJANGO Database MySQL, library MySQL-python seemed installed

2013-05-09 Thread webgamer . sc
Unable to setup MySQL on CentOS5.9 for DJango

raise ImproperlyConfigured("Error loading MySQLdb module: %s" % e)
django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module: 
No module named MySQLdb
[schu@bigdata1 firstsite]$ which pip
/usr/bin/which: no pip in 
(.:/usr/libexec/:/usr/kerberos/bin:/bin:/usr/lib/jvm/jdk1.6.0_33/bin::/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/simon/bin:/usr/local/bin:/opt/Beemi/gpg:/sbin::/bin:/bin:/bin:/bin:/bin:/bin:/opt/eclipse-jee-juno)

I don't have pip either, 

Looked installed to me

[root@bigdata1 firstsite]# yum install MySQL-python
Loaded plugins: fastestmirror, kmod
Loading mirror speeds from cached hostfile
 * base: mirror.hmc.edu
 * extras: mirror.sanctuaryhost.com
 * rpmforge: mirror.hmc.edu
 * updates: mirror.veracruz.co
Setting up Install Process
Package MySQL-python-1.2.3-0.1.c1.el5.x86_64 already installed and latest 
version
Nothing to do
[root@bigdata1 firstsite]# 


Please help!

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




Fetching data from related tables

2013-05-09 Thread Sam


I have 3 tables: Continent, Country and Story.

Country has ForeignKey(Continent) and Story has ManyToManyField(Country, 
blank=True) field.

What I need is to get a list of countries which at least have one story 
belonging to it, and I need these countries grouped by continents.

How can I achieve that?


Thanks.

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




DJango MySQL database connection problem

2013-05-09 Thread webgamer . sc
yum install MySQL-python
Loaded plugins: fastestmirror, kmod
Loading mirror speeds from cached hostfile
 * base: mirror.hmc.edu
 * extras: mirror.sanctuaryhost.com
 * rpmforge: mirror.hmc.edu
 * updates: mirror.veracruz.co
Setting up Install Process
Package MySQL-python-1.2.3-0.1.c1.el5.x86_64 already installed and latest 
version
Nothing to do


Got the following error when running runserver
  File "/usr/local/lib/python2.6/site-packages/django/utils/importlib.py", 
line 35, in import_module
__import__(name)
  File 
"/usr/local/lib/python2.6/site-packages/django/db/backends/mysql/base.py", 
line 17, in 
raise ImproperlyConfigured("Error loading MySQLdb module: %s" % e)
django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module: 
No module named MySQLdb

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




Re: DJango MySQL database connection problem

2013-05-09 Thread Larry Martell
On Thu, May 9, 2013 at 4:33 PM,   wrote:
> yum install MySQL-python
> Loaded plugins: fastestmirror, kmod
> Loading mirror speeds from cached hostfile
>  * base: mirror.hmc.edu
>  * extras: mirror.sanctuaryhost.com
>  * rpmforge: mirror.hmc.edu
>  * updates: mirror.veracruz.co
> Setting up Install Process
> Package MySQL-python-1.2.3-0.1.c1.el5.x86_64 already installed and latest
> version
> Nothing to do
>
>
> Got the following error when running runserver
>   File "/usr/local/lib/python2.6/site-packages/django/utils/importlib.py",
> line 35, in import_module
> __import__(name)
>   File
> "/usr/local/lib/python2.6/site-packages/django/db/backends/mysql/base.py",
> line 17, in 
> raise ImproperlyConfigured("Error loading MySQLdb module: %s" % e)
> django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module:
> No module named MySQLdb

What platform are you on? Can you import MySQLdb from python on the
command line?

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




Re: Hello everyone, can you tell me a good django's book that explains the various functions but at the same time develop a complete website chapter by chapter?

2013-05-09 Thread Russell Keith-Magee
I wouldn't be *too* concerned about the version numbers covered by books.
Django has a strict backwards compatibility policy, specifically so that
code will continue to work between versions. We've added features, and
fixed bugs, but we've tried very hard to ensure that code will continue to
work between versions.

To that end, a tutorial that worked on Django 1.0 will work *almost*
entirely out of the box for Django 1.5. There are some exceptions, but
they're pretty well documented in the Django release notes. Off the top of
my head, the only changes you're likely to catch in a tutorial situation
are:

 * A change in the way you deploy admin (introduced in Django 1.1). If the
tutorial says to register your admin urls using "(r'^admin/(.*)',
admin.site.root),", you'll need to replace this with "(r'^admin/',
include(admin.site.urls)),"

 * A change in the use of quotation marks in the {% url %} tag (introduced
in Django 1.3). If your tutorial instructs you to put {% url name-of-view
%} in a template, you will need to use {% url "name-of-view" %} instead.

 * A subtle change in the default project layout (introduced in Django
1.4). Django 1.4 introduced a subdirectory for some project-level settings.
The changes should be fairly obvious.

 * A handful of changes to specific settings (e.g., database settings),
made over various versions. For example, the DATABASE_NAME setting in
Django 1.0 was renamed to be a 'NAME' key in a dictionary of settings in
Django 1.2.

I might have missed a couple of other changes, depending on the tutorial
you're following, but these should be the big ones.

That said, your best bet will always be to download the version of Django
that matches your tutorial; once you've got the tutorial working, you can
try upgrading versions until you're up to date. When Django introduces a
backwards incompatible change, we also introduce warnings and errors to
notify the user that these changes are happening; so, for example, if you
had a tutorial that was working under Django 1.1, and you updated your
Django install to 1.3, you would start to see warnings about the format of
your database settings.

Yours,
Russ Magee %-)

On Thu, May 9, 2013 at 5:03 PM, Federico Erbea  wrote:

> Thanks but there isn't something more new, maybe make with django 1.4?
>
> Il giorno giovedì 9 maggio 2013 10:56:17 UTC+2, Federico Erbea ha scritto:
>
>> I bought a Marco Beri's book "Sviluppare applicazioni web con django" but
>> after the first chapter only explains the different functions in
>> contrast to the first chapter where the functions were explained by
>> developing them.
>> I also bought "Instant Django Application Development 
>> Starter"
>> of Mauro Rocco, 
>> "Definitive
>> Guide to Django: Web Development Done 
>> Right"of
>>  Holovaty
>> Adrian and "Pro 
>> Django"
>> of Alchin Marty.
>> I have not read the last three, think reflect my request or do you know
>> of the best and most related.
>>
>  --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

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




Re: Django html input error

2013-05-09 Thread Rodolfo
Hi,
 
I updated Django to version 1.5.1 and now everything is OK.
 
Thank you
 
 

Em segunda-feira, 6 de maio de 2013 22h35min45s UTC-3, Rodolfo escreveu:

> Hi,
>  
> I get an
> "UnicodeEncodeError 'ascii' codec can't encode character '\xe3' in 
> position 1: ordinal not in range(128)"
>  
> with the html fragment:
>
> 
> To solve this problem, I changed the module 
> "Python32\Lib\urllib\parse.py", line 80
>
> _implicit_encoding =  'ascii'
>
> to
>
> _implicit_encoding =  'utf-8'
>
>  
>
> Is this the best solution?
>
>  
>
> Thank you
>
>  
>
> Rodolfo
>
> Django version: 1.5a1
> Python version: 3.2.3
>
>  
>
>  
>  
>

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




What's wrong with the Basic configuration of apache and mod_python?

2013-05-09 Thread lx
hi:
  the the Basic configuration of apache is:

LoadModule python_module /usr/lib64/httpd/modules/mod_python.so

SetHandler python-program
PythonHandler django.core.handlers.modpython
SetEnv DJANGO_SETTINGS_MODULE mysite.settings
PythonOption django.root /mysite
PythonDebug On
PythonPath "['/var/www/html',
'/usr/local/gdnsplus_conf/www/mysite'] + sys.path"


I have done:
ln -sf /usr/local/gdnsplus_conf/www/mysite /var/www/html/gdnsplus_conf

the version of django is:1.4.5
the version of mod_python is:3.3.1
the directory of of django app is:  /usr/local/gdnsplus_conf/www/mysite
the context of app is:
ll /usr/local/gdnsplus_conf/www/mysite
total 184
-rw-r--r-- 1 apache root  2970 Mar 25 16:20 conf.xml
-rw-r--r-- 1 apache root  4992 Apr 25 17:15 cv
-rw-r--r-- 1 apache root  4991 Apr 25 17:16 cv_all
-rw-r--r-- 1 apache root  6727 Mar 29 18:05 hand_xml.py
-rw-r--r-- 1 apache root 0 Mar 12 09:12 __init__.py
-rw-r--r-- 1 apache root   134 Mar 12 09:15 __init__.pyc
-rw-r--r-- 1 apache root  5720 Apr 17 15:27 settings.py
-rw-r--r-- 1 apache root  5400 Mar 12 09:33 settings.py.bk
-rw-r--r-- 1 apache root  3118 Apr 17 15:27 settings.pyc
-rw-r--r-- 1 apache root  2080 Apr 22 13:34 tags
drwxr-xr-x 2 apache root  4096 May  9 13:46 templates
-rw-r--r-- 1 apache root62 Apr 27 11:05 test
-rw-r--r-- 1 apache root  1238 May  9 11:09 urls.py
-rw-r--r-- 1 apache root  1144 May  9 11:10 urls.pyc
-rw-r--r-- 1 apache root 34352 May  9 13:45 views.py
-rw-r--r-- 1 apache root 30384 Apr 16 09:06 views.py.bk
-rw-r--r-- 1 apache root 33425 May  9 14:55 views.pyc
-rw-r--r-- 1 apache root  1134 Mar 12 09:12 wsgi.py
-rw-r--r-- 1 apache root  1028 Mar 12 09:15 wsgi.pyc

the infomation of  urls.py is:
urlpatterns = patterns('',
(r'^conf_xml/$', receive),
(r'^dc_list/$', listall),
(r'^show_err/$', show_err),
(r'^ipdb_file/$', ipdb_file),
(r'^ipdb_update/$', ipdb_update),
(r'^task_list/$', task_list),
(r'^task_search/$', task_search),
(r'^nip_set/$', nip_set),
(r'^nip_del/$', nip_del),
(r'^nip_update/$', nip_update),
(r'^ns_set/$', ns_set),
(r'^ns_list/$', ns_list),
(r'^reversion_list/$', list_version),
(r'^version_set/$', version_set),
(r'^index/$', all_err),
(r'^machine/$', show_machine),

The question is:
http://192.168.23.73/ns_list
is not work.

How to solve it ? thank you.

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