Re: Trying to get tinyMCE working on an admin page

2009-09-19 Thread Joost Cassee
On 8 sep, 22:14, DrKen wrote: > Hi, new to Django and tinyMCE. I'm trying to get the tinyMCE HTML > editor working on the admin page, so started out by doing the Django > tutorial, then attempting to modify. I've got the admin page working > with text fields instead of character fields, but don'

Re: Management commands not detected in all packages under a namespace?

2009-09-19 Thread Kyle MacFarlane
On Sep 19, 6:41 am, James Bennett wrote: > On Fri, Sep 18, 2009 at 10:36 PM, Kyle MacFarlane > > wrote: > > Everything works fine except when detecting management commands. It > > will only detect commands in the first package in sys.path underneath > > "company.*". Once it has checked one packa

Re: Running Django on Tornado's HTTP server

2009-09-19 Thread Kenneth Gonsalves
On Monday 14 Sep 2009 1:56:32 am Bret Taylor wrote: > he module: > > import django.core.handlers.wsgi > import os > import tornado.httpserver > import tornado.ioloop > import tornado.wsgi > > def main(): > os.environ["DJANGO_SETTINGS_MODULE"] = 'myapp.settings' >

Re: Request Entity Too Large

2009-09-19 Thread Graham Dumpleton
On Sep 18, 4:39 am, Karen Tracey wrote: > On Thu, Sep 17, 2009 at 1:47 PM, Jashugan wrote: > > > Hello, > > > I have a user who is trying to upload a large file (> 50MB) to our > > Django application. The error that they are getting is: > > > Request Entity Too Large > > The requested resource

String encoding question

2009-09-19 Thread Joshua Russo
I was working through some regression tests and saw a scenario I thought wasn't allowed/recommended. I was under the impression that if you specified UTF-8 encoding at the top of the file you where not suppose to use u decorated unicode static string. So instead of u'prédio' I use 'prédio' in files

Re: Checking if 2 db-entries exist

2009-09-19 Thread MV
MV wrote: > I need to check if 2 different entries in the database exist, and serve > different variables to the template if > 1. they both exists > 2. if only the first one exists > 3. if only the last one exists > 4. if none exists. > > - > MV > > > > > After a good nights sleep, I figured I

Re: String encoding question

2009-09-19 Thread Masklinn
On 19 Sep 2009, at 15:59 , Joshua Russo wrote: > I was working through some regression tests and saw a scenario I > thought > wasn't allowed/recommended. I was under the impression that if you > specified > UTF-8 encoding at the top of the file you where not suppose to use u > decorated unicod

Re: MOD_PYTHON ERROR

2009-09-19 Thread W3
Thanks Karen, that was it, I thought i had deleted it but it managed to sneak in there twice somehow, so one was left. On 19 Sep, 02:21, Karen Tracey wrote: > On Fri, Sep 18, 2009 at 4:38 PM, When ideas fail > wrote: > > > > > Hello, can someone tell me what this error means? It seems to be > >

MySQL

2009-09-19 Thread When ideas fail
Hello, when I run python manage.py syncdb I get this error: File "C:\\Python26\lib\site-packages\MySQLdb\connections.py", lin e 170, in __init__ super(Connection, self).__init__(*args, **kwargs2) _mysql_exceptions.OperationalError: (2003, "Can't connect to MySQL server on 'lo calhost' (1006

Re: String encoding question

2009-09-19 Thread Karen Tracey
On Sat, Sep 19, 2009 at 9:59 AM, Joshua Russo wrote: > I was working through some regression tests and saw a scenario I thought > wasn't allowed/recommended. I was under the impression that if you specified > UTF-8 encoding at the top of the file you where not suppose to use u > decorated unicode

Re: MySQL

2009-09-19 Thread Karen Tracey
On Sat, Sep 19, 2009 at 10:27 AM, When ideas fail wrote: > > Hello, when I run python manage.py syncdb I get this error: > > File "C:\\Python26\lib\site-packages\MySQLdb\connections.py", lin > e 170, in __init__ >super(Connection, self).__init__(*args, **kwargs2) > _mysql_exceptions.Operatio

Re: String encoding question

2009-09-19 Thread Masklinn
On 19 Sep 2009, at 16:31 , Karen Tracey wrote: > Without the encoding declaration, the interpreter would not know the > encoding of the source bytes, so would be unable (without making some > assumption) to correctly build unicode string objects from unicode > literals. It doesn't even bother tr

Re: String encoding question

2009-09-19 Thread Joshua Russo
On Sat, Sep 19, 2009 at 1:31 PM, Karen Tracey wrote: > On Sat, Sep 19, 2009 at 9:59 AM, Joshua Russo wrote: > >> I was working through some regression tests and saw a scenario I thought >> wasn't allowed/recommended. I was under the impression that if you specified >> UTF-8 encoding at the top of

Re: String encoding question

2009-09-19 Thread Joshua Russo
> > ... in fact using utf-8 string literals can cause problems in other places > with code that assumes another encoding (e.g. ascii) for byte strings. > Could you expand on this? I know that the Unicode string object has different methods than standard String, but are there other scenarios where

Best way to store arbitrary key:value pairs?

2009-09-19 Thread ajs
Hi, I'm trying to come up with the best way to implement this: I have an arbitrary set of key:value pairs I'd like to store in a database. I'd like to be able to search and filter query results based on a given key and value. Naturally, the less expensive the lookup the better. Is there an ele

Foreign Key selector on page does not preset

2009-09-19 Thread adelaide_mike
Hi. In my Django 1.0.2 app I have a parent and a child table. On my child ModelForm a selector field for the parent is automatically provided. The form also displays a "date" field representing a column in the child model. In my view I have: form = MyForm(initial={'date': request.session['dat

Re: String encoding question

2009-09-19 Thread Masklinn
On 19 Sep 2009, at 17:19 , Joshua Russo wrote: >> ... in fact using utf-8 string literals can cause problems in other >> places >> with code that assumes another encoding (e.g. ascii) for byte >> strings. >> > > Could you expand on this? I know that the Unicode string object has > different me

Re: String encoding question

2009-09-19 Thread Karen Tracey
On Sat, Sep 19, 2009 at 11:19 AM, Joshua Russo wrote: > ... in fact using utf-8 string literals can cause problems in other places >> with code that assumes another encoding (e.g. ascii) for byte strings. >> > > Could you expand on this? I know that the Unicode string object has > different method

Re: String encoding question

2009-09-19 Thread Joshua Russo
On Sat, Sep 19, 2009 at 2:40 PM, Karen Tracey wrote: > On Sat, Sep 19, 2009 at 11:19 AM, Joshua Russo wrote: > >> ... in fact using utf-8 string literals can cause problems in other places >>> with code that assumes another encoding (e.g. ascii) for byte strings. >>> >> >> Could you expand on thi

Re: String encoding question

2009-09-19 Thread Karen Tracey
On Sat, Sep 19, 2009 at 11:51 AM, Joshua Russo wrote: > Just one other thing. I was under the impression that x = u'' is equivalent > to x = Unicode(''). Is that not correct? Seeing as you seem to be > indicating a difference between the unicode object and a literal. > > > Note you could answer t

Re: send_mass_mail on object creation

2009-09-19 Thread aa56280
> The way I have handled this in the past is to create a simple app that you > can run from the command line. I had it check a table that was updated with > the list of emails to send and set it up as a scheduled task (cron job) for > every 20 minutes or so. I was leaning toward a similar solutio

Re: String encoding question

2009-09-19 Thread Joshua Russo
On Sat, Sep 19, 2009 at 3:07 PM, Karen Tracey wrote: > On Sat, Sep 19, 2009 at 11:51 AM, Joshua Russo wrote: > >> Just one other thing. I was under the impression that x = u'' >> is equivalent to x = Unicode(''). Is that not correct? Seeing as you seem >> to be indicating a difference between th

Model field help_text

2009-09-19 Thread cerberos
I have a ModelForm form, I want to use a different widget than the default but when I do I lose the help_text. The first thing I tried was modelName.fieldName.help_text but it didn't work, I've tried all sorts in a shell but can't get the model's fields, I can't even get a list of the model's fie

help with django-threadedcomments

2009-09-19 Thread thornomad
Hi everyone - is anyone using the latest from django-threadedcomments with success ? I am using the latest git clone of django-threadedcomments ... running the following in my template throws an error: {% get_comment_form for object as comment_form %} I get error: TemplateSyntaxError at /video

Writers for a Django Blog

2009-09-19 Thread Vitaly Babiy
Hey guys, I am looking for people would be interested in writing articles for a django/web development blog, if you are interested please let me know. Thanks, Vitaly Babiy --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Group

Re: Writers for a Django Blog

2009-09-19 Thread Adam Olsen
On Sat, Sep 19, 2009 at 1:45 PM, Vitaly Babiy wrote: > Hey guys, > I am looking for people would be interested in writing articles for a > django/web development blog, if you are interested please let me know. > What would be cool is if I could register my own RSS feed with your site, and any en

Re: Running Django on Tornado's HTTP server

2009-09-19 Thread Antoni Aloy
2009/9/19 Kenneth Gonsalves : > > On Monday 14 Sep 2009 1:56:32 am Bret Taylor wrote: >> he module: >> >>     import django.core.handlers.wsgi >>     import os >>     import tornado.httpserver >>     import tornado.ioloop >>     import tornado.wsgi >> >>     def main(): >>         os.environ["DJAN

Re: Writers for a Django Blog

2009-09-19 Thread thornomad
I believe that functionality is available at: http://www.djangoproject.com/community/ On Sep 19, 4:46 pm, Adam Olsen wrote: > On Sat, Sep 19, 2009 at 1:45 PM, Vitaly Babiy wrote: > > Hey guys, > > I am looking for people would be interested in writing articles for a > > django/web development

Re: Upload image

2009-09-19 Thread Mike Ramirez
On Saturday 19 September 2009 16:49:49 Ramos wrote: > imagingtk.c:20:16: error: tk.h: No such file or directory > To install PIL, you'll need the tk8.4-dev package I believe. http://packages.ubuntu.com/hardy/i386/tk8.4-dev/filelist (not sure what the latest version of tk is for hardy), Once PI

Re: Upload image

2009-09-19 Thread Ramos
Hi: Mike Ramirez Thanks for your response so quickly. I install what I recommended, but continued presenting the same problem. On Sat, 2009-09-19 at 17:14 -0700, Mike Ramirez wrote: > On Saturday 19 September 2009 16:49:49 Ramos wrote: > > imagingtk.c:20:16: error: tk.h: No such file or di

Re: Best way to store arbitrary key:value pairs?

2009-09-19 Thread brad
> I have an arbitrary set of key:value pairs I'd like to store in a > database.   It's my uderstanding that this is exactly the scenario for which CouchDB was created. There's django-storages that let's you interface with couchdb. I haven't personally used either, so I can just speculate. Good

passenger_wsgi import error

2009-09-19 Thread neri...@gmail.com
I'm trying to use passenger_wsgi on Dreamhost and keeep getting 'An error occurred importing your passenger_wsgi.py'. I think I've located the syntax that is causing the problem but I don't know how to resolve it and Dreamhost doesn't offer any assistance for this. import sys, os INTERP = "/home/

Order_by on greatgrandparent.name

2009-09-19 Thread adelaide_mike
I have a multi-table model, each table related to the next by a one to many foreign key. I wish to do: q = Child.objects.filter(date__gte=startdate).order_by ('parent.grandparent.greatgrandparent__name') This raises an exception no such column: parent.grandparent.greatgrandparent__name Is ther

Re: How to refer to a data item?

2009-09-19 Thread adelaide_mike
Django itself uses the term "column" as witnessed by an exception I just raised reading: no such column. Mike On Sep 17, 11:34 pm, Javier Guerra wrote: > On Thu, Sep 17, 2009 at 9:04 AM, adelaide_mike > > wrote: > > as a database developer for many years I am used to a world > > populated by r

Re: Model field help_text

2009-09-19 Thread cerberos
On Sep 20, 1:14 am, cerberos wrote: > I have a ModelForm form, I want to use a different widget than the > default but when I do I lose the help_text. > > The first thing I tried was modelName.fieldName.help_text but it > didn't work, I've tried all sorts in a shell but can't get the model's > fi

Django error

2009-09-19 Thread zweb
When I try to download a file through django in IE , I get [Sun Sep 20 05:34:20 2009] [error] [client 127.0.0.1] response = func(request, response), referer: http://www.com [Sun Sep 20 05:34:20 2009] [error] [client 127.0.0.1] File "/home/ pmc/webapps/test/lib/python2.5/django/http/util

Django error

2009-09-19 Thread zweb
When I try to download a file through django in IE , I get [Sun Sep 20 05:34:20 2009] [error] [client 127.0.0.1] response = func(request, response), referer: http://www.com [Sun Sep 20 05:34:20 2009] [error] [client 127.0.0.1] File "/home/ pmc/webapps/test/lib/python2.5/django/http/util

Re: Upload image

2009-09-19 Thread Ramos
Hi: At the moment I just solve the problem, the pictures up. To fix the problem I did was: 1 - sudo apt-get install libjpeg62 libjpeg62-dev 2 - sudo easy_install - find-links http://www.pythonware.com/products/pil/ Imaging 3 - sudo invoke-rc.d apache2 restart While in another server

Django error

2009-09-19 Thread zweb
When I try to download a file through django in IE , I get [Sun Sep 20 05:34:20 2009] [error] [client 127.0.0.1] response = func(request, response), referer: http://www.com [Sun Sep 20 05:34:20 2009] [error] [client 127.0.0.1] File "/home/ pmc/webapps/test/lib/python2.5/django/http/util