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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.