reportlab - filename of generated PDF

2009-01-25 Thread Ivan Mincik
Dear django users, we have a problem with filename of resulting PDF generated by reportlab and then downloaded by browser. Generated PDF is OK, but filename is incorrect. It is allways something like "randomstring.pdf.part". (for example sa34sdfasdf.pdf.part) in the "view.py" there are

Re: XML Serialization Speed

2009-01-25 Thread Antoni Aloy
2009/1/26 Taylor : > > I'm thinking of changing my views so that they work with XSLT and an > XML representation of my data. I see 3 options: > 1. Use django's xml serializer. > 2. Use python's xml tools to make my own XML. > 3. Use django's template systems to drop my data

Re: Performance using session, passing data from one request to another, use js or not? Best practice?

2009-01-25 Thread Thomas Guettler
Tim Daniel schrieb: > > On 22 ene, 16:17, Thomas Guettler wrote: > >> Tim Daniel schrieb:> I read something that it would be more >> >>> efficient to store only the query and doing pickle?? I don't know how >>> to do that, I've been looking in the docs and other posts

Re: TINYMCE causing form error "This field is required."

2009-01-25 Thread Eric I.E.
I started using django-tinymce's HTMLField the previous line in models.py is placed with this: column1 = tinymce_models.HTMLField(blank=True, null=True) which seems to take care of the errors. I would like to know why that is, and I also generally like controlling forms in admin.py not in

Re: Iterating over jwplayers

2009-01-25 Thread micval
Don't know anything about SWFObject, but it seems to me, that s1.write ('preview') puts all the video objects in the first paragraph. In the for loop, all the paragraphs get assigned the same id='preview', which they should not, as the DOM gets confused. ID of a node must be unique throughout the

Re: Strange Model behavior

2009-01-25 Thread Dj Gilcrease
What do you need to do in __init__ Dj Gilcrease OpenRPG Developer ~~http://www.openrpg.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

TINYMCE causing form error "This field is required."

2009-01-25 Thread Eric I.E.
When I add TinyMCE to my form fields it turns them from optional (blank=True, null=True) into required fields. I am using django-tinymce in conjunction with django-filebrowser. My field is defined in models.py like this: column1 = models.TextField(help_text="Extended Info", blank=True,

Re: Strange Model behavior

2009-01-25 Thread Martin Conte Mac Donell
On 1/26/09, Mark Jones wrote: > class Fails(models.Model): > code = models.CharField(max_length=64) > quizid = models.IntegerField(null=False, blank=False) > published_on = models.DateTimeField(auto_now_add=True) > > def __init__(self, *args, **kwargs): >

Strange Model behavior

2009-01-25 Thread Mark Jones
Sample.py includes the following: == from django.db import models class Good(models.Model): code = models.CharField(max_length=64) quizid = models.IntegerField(null=False, blank=False) published_on = models.DateTimeField(auto_now_add=True) class

creating tree inputs in the admin

2009-01-25 Thread ajlozier
Hello everyone, I have been programming in PHP for a few years now but I am experimenting with django on a personal project of mine. Most likely the closest experience I've had with a framework like this is CakePHP or Zend. I have really been enjoying it so far. I appreciate the simplicity of

Re: mod_wsgi problem (python 2.6.1, Apache 2.2.11, Windows XP SP3)

2009-01-25 Thread Graham Dumpleton
This isn't going to be Django issue, so if you do have any useful information, perhaps post any followups to one of the discussions on mod_wsgi Google Group going on about Python 2.6 and mod_wsgi. This message has also been posted there.

Re: Multithreaded development server

2009-01-25 Thread Russell Keith-Magee
On Sun, Jan 25, 2009 at 10:45 PM, Almad wrote: > > For those interested, patch from #3357 works nicely and can be started > from within: > http://devel.almad.net/trac/django-sane-testing/changeset/d2c24247d7e4 > > However, it's still buggy for my case. If You want it too, You

Re: absolute_import, app names, dots, and a bug

2009-01-25 Thread Karen Tracey
On Sun, Jan 25, 2009 at 7:03 PM, Todd O'Bryan wrote: > > I've been trying to convert my apps to use the relative imports from > __future__ and have noticed a problem. I think it may be something > Django is doing, but I'm not sure. > > In the __init__.py module inside an

absolute_import, app names, dots, and a bug

2009-01-25 Thread Todd O'Bryan
I've been trying to convert my apps to use the relative imports from __future__ and have noticed a problem. I think it may be something Django is doing, but I'm not sure. In the __init__.py module inside an app, I have from __future__ import absolute_import from ..another_app.models import

Favorite Front-End Dev Environment?

2009-01-25 Thread Joshua K
Howdy Everyone, What is everyone's favorite development environment for the front end? I've found Django in general to be an excellent web framework. However, when I first started playing around I was overwhelmed by having to hand-code all that HTML. I used Quanta to do that part of the

Re: Django docs and automation tests

2009-01-25 Thread Russell Keith-Magee
On Mon, Jan 26, 2009 at 12:32 AM, Oleg Oltar wrote: > Hi! > Can you please explain me idea of testing django applications with Client() > There many examples in doc, where test cases just checked the > response.status_code == 200, > But I am often getting 302 instead of

XML Serialization Speed

2009-01-25 Thread Taylor
I'm thinking of changing my views so that they work with XSLT and an XML representation of my data. I see 3 options: 1. Use django's xml serializer. 2. Use python's xml tools to make my own XML. 3. Use django's template systems to drop my data into xml. Like so: {{ monster.hp }} ... My

Re: How to access mail.outbox

2009-01-25 Thread Russell Keith-Magee
On Mon, Jan 26, 2009 at 12:20 AM, Oleg Oltar wrote: > Hi! > I am trying to write nose tests for my django application. One of the points > is to check if > emails are sent properly. > The suggested in the doc >

mod_wsgi problem (python 2.6.1, Apache 2.2.11, Windows XP SP3)

2009-01-25 Thread Jonathan Prater
Hopefully, someone here can help me with this issue. I've got a mod_wsgi.so compiled against Python 2.6.1 and Apache 2.2.11 for use on Windows. It loads perfectly well (no errors during Apache startup), and I've followed the steps given on the Django website and the mod_wsgi site for

Re: "connect a function to the signal"

2009-01-25 Thread boyombo
On Jan 23, 9:56 pm, "bax...@gretschpages.com" wrote: > > I think what you want to do is: > > > user_activated.connect(create_site_user) > > Thanks. But where, after the send(), or in the signal? just a line of code. i use models.py where i define the func, import

Re: Generic View Not Returning Objects

2009-01-25 Thread Daniel Roseman
On Jan 25, 9:54 pm, "ben.bleik...@gmail.com" wrote: > I am having an issue with Django 1.0.2 returning a list of blog posts > in my generic date based archive_index view. > > My URLs file looks like this: > > #Dictionaries > blog_dict = { >         'queryset':

Generic View Not Returning Objects

2009-01-25 Thread ben.bleik...@gmail.com
I am having an issue with Django 1.0.2 returning a list of blog posts in my generic date based archive_index view. My URLs file looks like this: #Dictionaries blog_dict = { 'queryset': Entry.objects.all(), 'date_field': 'pub_date', 'template_object_name': 'entry', }

Re: undefined in Textarea

2009-01-25 Thread issya
Ahh, that was it. Thanks for the help. I was doing this data.comments = $(form).find('inp...@name=comments]').val(); instead of... data.comments = $(form).find('textar...@name=comments]').val(); Thank you! On Jan 25, 3:26 pm, Daniel Roseman wrote: > On

Re: undefined in Textarea

2009-01-25 Thread Daniel Roseman
On Jan 25, 7:51 pm, issya wrote: > I am making a modelform that looks like the below. > > class ContactForm(forms.ModelForm): >         name = forms.CharField(widget=forms.TextInput(attrs= > {'class':'required'})) >         phone =

undefined in Textarea

2009-01-25 Thread issya
I am making a modelform that looks like the below. class ContactForm(forms.ModelForm): name = forms.CharField(widget=forms.TextInput(attrs= {'class':'required'})) phone = forms.CharField(widget=forms.TextInput(attrs= {'class':'required'})) comments =

Re: Duplicate field(s) in RestaurantAdmin.fieldsets

2009-01-25 Thread wotaskd
Hello everyone, Still couldn't find a way to make this code work without eliminating the super/child relationship. I was wondering if anybody thinks the error below is a bug or maybe it is expected behavior? Maybe there's a different way to implement it? Cheers, wotaskd On Jan 23, 5:08 pm,

Re: Django docs and automation tests

2009-01-25 Thread Milan Andric
On Jan 25, 9:32 am, Oleg Oltar wrote: > Hi! > Can you please explain me idea of testing django applications with Client() > > There many examples in doc, where test cases just checked the > response.status_code == 200, > > But I am often getting 302 instead of 200. Is

Re: Django docs and automation tests

2009-01-25 Thread Karen Tracey
On Sun, Jan 25, 2009 at 10:32 AM, Oleg Oltar wrote: > Hi! > Can you please explain me idea of testing django applications with Client() > > There many examples in doc, where test cases just checked the > response.status_code == 200, > > But I am often getting 302 instead

Django docs and automation tests

2009-01-25 Thread Oleg Oltar
Hi! Can you please explain me idea of testing django applications with Client() There many examples in doc, where test cases just checked the response.status_code == 200, But I am often getting 302 instead of 200. Is there any workaround in this case? thanks, Oleg

How to access mail.outbox

2009-01-25 Thread Oleg Oltar
Hi! I am trying to write nose tests for my django application. One of the points is to check if emails are sent properly. The suggested in the doc way( http://docs.djangoproject.com/en/dev/topics/testing/#django.core.mail.django.core.mail.outbox) it to check it is to use mail.outbox variable

Re: Django-OAuth Issue

2009-01-25 Thread David Larlet
Hello Chris, Le 25 janv. 09 à 02:40, Chris a écrit : > > Hello David sorry for the late response. I think that I found a minor > bug with django-oauth. > > So I tried Malcolm Tredinnick's recommendation and used the client > oauth library found here: >

Re: Multithreaded development server

2009-01-25 Thread Almad
For those interested, patch from #3357 works nicely and can be started from within: http://devel.almad.net/trac/django-sane-testing/changeset/d2c24247d7e4 However, it's still buggy for my case. If You want it too, You can use CP WSGI as suggested by mikeal some time ago, I'm now using it too:

Using same model in several applications (in admin)

2009-01-25 Thread Evgeniy Ivanov
Hi list, What is correct way of using the same model with different modelAdmin classes in different applications? The reason is that I need to have different change_lists for this model (since different applications are used in different ways). I've tried subclassing (and specified the same

Re: sqlite3 problems setting up

2009-01-25 Thread Steve Holden
DragonSlayre wrote: > > > On Jan 25, 6:04 pm, Steve Holden wrote: >> When you install something by running >> >> python setup.py install >> >> it gets installed into the python that is used to run setup.py. It looks >> like you had /usr/local/bin on your path when you

Re: Multithreaded development server

2009-01-25 Thread Almad
Thanks for the responses. My probem is that single-threaded server makes django untestable even under simple conditions (like, using urllib2 with digest authentication). I'd love to use CherryPy as I'm using it for some applications anyway, but I'm now trying to develop library that would allow

Re: Optimal translation of tables

2009-01-25 Thread Kless
Not, by now. I have created the models and I'm working now on views and templates, but I haven't started to profiling SQL. On 24 ene, 20:20, Adrián Ribao wrote: > Do you use a custom Model Manager or something similar to make it > optimal? I'm using this approach now but it

Re: django-smtpd allows you to handle email messages just like Django processes HTTP requests

2009-01-25 Thread Kless
The integration with the SMTP server already is solved with this project: Sos (Son Of Sam Email Server) http://www.zedshaw.com/projects/sos/ Good luck! On 24 ene, 16:29, nside wrote: > Hello, > > I just started a new project that basically allows you to write email >