generic relations

2008-06-04 Thread Filippo Santovito

Hi all,
I've read http://www.djangoproject.com/documentation/models/generic_relations/
.
How can I share a tag between Animal and Vegetables?

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



bug in unique_for_year with 0.96?

2007-07-09 Thread Filippo Santovito

I'm trying to use unique_for_year but it seems the Admin simply
ignores this constraint:
i'm using this model for testing and I'm able to add two entry with
the same date:

class MyModel(models.Model):
class Admin:
pass
mydata = models.DateField()
myfield = models.CharField(maxlength=10,
unique_for_year="mydata")

Am I missing anything or is it a bug?


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



problem with django dev server and subprocess.Popen

2007-07-06 Thread Filippo Santovito

Hi all,
I'm having a strange problem with a view.
Its code runs well if I test if in the shell but seems to block the
dev server:

#django 0.96
def html2pdf(request, url = None ):
from django.http import HttpResponse
import subprocess

response = HttpResponse(mimetype='application/pdf')
response['Content-Disposition'] = 'attachment;
filename=documento.pdf'

#with this url (managed by django) the dev server freezes
url = r"http://localhost:8000/;
#using this one everything works well
#url = r"http://www.google.it;
output = subprocess.Popen(
 ["/usr/bin/htmldoc" , url, "--format", "pdf14",
"--webpage", "--charset", "iso-8859-15"],
 stdout=subprocess.PIPE,
 stderr=subprocess.PIPE
 ).communicate()[0]

response.write(output)
return response


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---