Re: Diamanda Wiki and MyghtyBoard Forum on SVN now

2006-09-05 Thread ptree
Great work. There are some absolute filepaths used in views can be replaced with settings.SITE_IMAGES_DIR_PATH im.save("home/../../bg2.jpg',"JPEG") im.save(settings.SITE_IMAGES_DIR_PATH+'/bg2.jpg',"JPEG") It would be better if prepare some initial data for test,it puzzles me some while when

Multiple Installations, Multiple Versions and Symlinks

2006-09-05 Thread toszter
Having installed multiple versions of Django on the same apache/modPy server, I understand the PythonInterpreter and configurations, however i am a little confused on the standard of naming and organizing the varying symlinks between the two versions on the python path. It is not possible to have

Question on Modifying the admin interface.

2006-09-05 Thread kirk reeves
I have 2 issues with Admin and I am looking for a suggestion. I am currently using models.ForeignKey(Type, edit_inline=models.TABULAR, blank=True) for a field in one of my models. In Admin of the parent Model the children items appear as expected, however it would be nice to collapse the childr

Re: Filter question

2006-09-05 Thread Russell Keith-Magee
On 9/5/06, primitive <[EMAIL PROTECTED] > wrote: example codeqdict = QueryDict('id=1&fk_client_id=2')queryset = Ticket.objectsOk; so you have a GET request string 'id=1&fk_client_id=2', and you want to compose a query from it. You will be hitting against two problems:1) The 'value' for each key in

Dojo Editor2 invocation from Django

2006-09-05 Thread Gloria
Hi there. I found this nifty when I searched for Django and Dojo: http://code.djangoproject.com/wiki/AddDojoEditor The thread on this link is closed, so I am starting a new one. Please explain how I invoke this code. I am fairly new to Django, and I've avoided javascript like the plague over th

Re: Finding entries with multiple tags

2006-09-05 Thread Malcolm Tredinnick
On Tue, 2006-09-05 at 18:27 -0700, robbie wrote: > Malcolm Tredinnick wrote: > > I am really close to finishing the rewrite work necessary to make this > > easy. It's a bug that it doesn't work already. > > Is there a Django ticket for this bug? I think it's also in the way for > something I'm tr

Re: Finding entries with multiple tags

2006-09-05 Thread robbie
Malcolm Tredinnick wrote: > I am really close to finishing the rewrite work necessary to make this > easy. It's a bug that it doesn't work already. Is there a Django ticket for this bug? I think it's also in the way for something I'm trying to do, so it would be good to track its progress... (I

Re: Need Template Tag help - I'm making this harder than it has to be.

2006-09-05 Thread limodou
On 9/5/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > It occurs to me as I look at this further that I don't want to return > the Section object at all and what I'm really trying to do is get the > appropriate Section object and then return it's child sponsors. > > Because all() will always

Re: Calling a view from another view in the same app?

2006-09-05 Thread Alan Green
Hi Facundo, Nope the problem's not in that code. The stack trace will tell you the method with the problem. Just in case you didn't know, UnboundLocalError is a Python error that you get when a method refers to a variable before assigning it a value. For example: >>> def f(): ... print q ..

Re: Strange socket problem

2006-09-05 Thread limodou
On 9/5/06, Jay Parlar <[EMAIL PROTECTED]> wrote: > > On 9/5/06, limodou <[EMAIL PROTECTED]> wrote: > > > > Sometimes I will get below error message, but not each request I could > > get this, but it occurs very often, I don't know why? I'm working in > > windows XP, python 2.4.3, django trunk vers

Re: Filter question

2006-09-05 Thread DavidA
primitive wrote: > Is it possible to use a string (coming from an request object) as a > keyword to filter? I keep getting errors, but I don't know how to > convert these strings into types that filter will understand. Sure, Python allows you to pass a dict as a set of keyword arguments, so you

Re: Calling a view from another view in the same app?

2006-09-05 Thread Facundo Casco
>> UnboundLocalError at /adm/viaj/ >>local variable 'viaje' referenced before assignment >> > > You have an assignment to a local variable named 'viaje', but you are > using the name 'viaje' before that assignment. Look for a line that > begins "viaje =". It's best not to have variables

Re: Does "extends" also copy of "load" declarations from base template?

2006-09-05 Thread Don Arbow
On Sep 1, 2006, at 9:35 AM, Rob Hudson wrote: > > If not, should it? > > If I'd like do have markup on my whole project it would be nice to set > it once in base.html via {% load markup %} and have it automatically > loaded in each template that extends base. > > I just tried this with template ta

Re: confusion with ManyToMany relation on self

2006-09-05 Thread Russell Keith-Magee
On 9/5/06, Sean Perry <[EMAIL PROTECTED]> wrote: Perhaps if symmetrical is true get_accessor_name should return None orsome similarly bogus value. This would also make the test incore/management.py work as planned.I had a quick attempt at this approach last night - it mostly works, but it causes a

Re: Restrict amount of text in a TextField form

2006-09-05 Thread Corey Oordt
cyberco: If you want to do it in the interface, you will have to use some javascript. Here is a page that shows how to do it: http://www.felgall.com/ jstip20.htm Corey On Sep 5, 2006, at 8:50 AM, cyberco wrote: > > How can I set a maximum for the amount of text a user enters in a > TextFie

Re: How to correct this error?

2006-09-05 Thread Corey Oordt
You can change to collation of your MySQL tables by table and by field. If you do it by table, all new fields are of that collation. If you already have fields of a collation, you will have to change all of them. I used PHPMyAdmin to do it as the interface is nice and simple. You probably

Re: Advanced Admin Customization

2006-09-05 Thread Corey Oordt
mthorley: I think you just need to override the save() method of your model. You can do all the processing you need before it's saved. Corey On Sep 5, 2006, at 10:21 AM, mthorley wrote: > > Thanks for the tip Nate! > > Does any one know what method receives the data from the form when it >

Re: Calling a view from another view in the same app?

2006-09-05 Thread Alan Green
On 9/6/06, Facundo Casco <[EMAIL PROTECTED]> wrote: > > Hi, maybe I'm doing something wrong (I'm just starting to learn Python and > Django), I need to call a view (viaje) from another view in the same app but > I get this error: > > UnboundLocalError at /adm/viaj/ >local variable 'viaje' re

Re: Calling a view from another view in the same app?

2006-09-05 Thread Facundo Casco
Arthur, thanks for your replay. I've changed the definitions order but I still get the same error. Facundo arthur debert wrote: > Hi facundo. > > this is an issue in python that is pretty confusing for newbies. > > What's happening here is that viajes is making a forward reference to > viaje, mea

Re: Calling a view from another view in the same app?

2006-09-05 Thread arthur debert
Hi facundo. this is an issue in python that is pretty confusing for newbies. What's happening here is that viajes is making a forward reference to viaje, meaning that when viajes is run viaje has not been defined yet, so it throws an exception(methods get parsed top to bottom in modules). The f

Calling a view from another view in the same app?

2006-09-05 Thread Facundo Casco
Hi, maybe I'm doing something wrong (I'm just starting to learn Python and Django), I need to call a view (viaje) from another view in the same app but I get this error: UnboundLocalError at /adm/viaj/   local variable 'viaje' referenced before assignment The relevant part of the code is amx

Re: Does "extends" also copy of "load" declarations from base template?

2006-09-05 Thread Ned Batchelder
Alan Green wrote: On 9/2/06, Rob Hudson <[EMAIL PROTECTED]> wrote: If not, should it? No, it doesn't. There's good argument both for and against this sub-templates picking up templatetag libraries from their base templates. If I'd like do have markup on my w

Re: {% include %}'d files not interpolating {% block %}s?

2006-09-05 Thread Cole Tuininga
On 9/5/06, Katie Lohrenz <[EMAIL PROTECTED]> wrote: > Is there a strong reason for putting the doc_head.tmpl code in a > separate file? If you put that code directly into your base template, > the title block would inherit the way you want. Hmmm, I hadn't really thought about it. I'd been so gun

Re: Does "extends" also copy of "load" declarations from base template?

2006-09-05 Thread Alan Green
On 9/2/06, Rob Hudson <[EMAIL PROTECTED]> wrote: > > If not, should it? No, it doesn't. There's good argument both for and against this sub-templates picking up templatetag libraries from their base templates. > If I'd like do have markup on my whole project it would be nice to set > it once in

Re: {% include %}'d files not interpolating {% block %}s?

2006-09-05 Thread Katie Lohrenz
Cole Tuininga wrote: > Fair enough. Is there a better way to accomplish this? I'd much > prefer to have the title defined within the template rather than > having to pass it in as a variable from the view... I've hit the same snag before. The block you're defining must be present in the parent

Problem querying M2M relationships

2006-09-05 Thread Guillermo Fernandez Castellanos
Hi, I have two models: class Class(models.Model): name = models.CharField(unique=True,maxlength=79) class Person(models.Model): name = models.CharField(maxlength=79) classes = models.ManyToManyField(Class, blank=True) i define some classes (Musi

Re: Need help getting Python code into Django App

2006-09-05 Thread gabor
adamjspooner wrote: > Ok, so I posted this request in a different topic and never heard a > peep, so I thought I'd try it in it's own post. > > I'm a newb to Django. I love it because I love Python. I'm also a > semi-newb to Python. I've written some cool stuff in Python that I > like, but can

Re: mod_python - Using Apache prefork Vs Apache worker

2006-09-05 Thread gabor
Filipe wrote: > Hi, > > The docs say [1] that: > "Django requires Apache 2.x and mod_python 3.x, and you should use > Apache's prefork MPM, as opposed to the worker MPM." > > I want to test a Django site on a server (I plan to deploy there some > other sites in the future) where there are instal

Re: Need help getting Python code into Django App

2006-09-05 Thread Adrian Holovaty
On 9/5/06, adamjspooner <[EMAIL PROTECTED]> wrote: > I'm a newb to Django. I love it because I love Python. I'm also a > semi-newb to Python. I've written some cool stuff in Python that I > like, but can't seem to make the connection between my Python code and > Django. My biggest trouble is w

Re: Need help getting Python code into Django App

2006-09-05 Thread adamjspooner
> Hey Spoon, > > You're asking a lot of disparate questions here, but the basic thing > to understand is that a Django view is *just Python code*. A view is > just a Python function that returns an HttpResponse object. You can > put whatever you want in there; you can do whatever you need to do >

Re: CheckboxSelectMultipleField problem

2006-09-05 Thread Guillermo Fernandez Castellanos
Hi, The prepare is actually a method of Manipulator that calls the prepare method in each of the fields. So you might want to call it from the Manipulator.save() method. Or in the html2python by overiding it, calling first self.prepare() and then Method.html2Python(self). But I'm just guessing,

Need help getting Python code into Django App

2006-09-05 Thread adamjspooner
Ok, so I posted this request in a different topic and never heard a peep, so I thought I'd try it in it's own post. I'm a newb to Django. I love it because I love Python. I'm also a semi-newb to Python. I've written some cool stuff in Python that I like, but can't seem to make the connection b

mod_python - Using Apache prefork Vs Apache worker

2006-09-05 Thread Filipe
Hi, The docs say [1] that: "Django requires Apache 2.x and mod_python 3.x, and you should use Apache's prefork MPM, as opposed to the worker MPM." I want to test a Django site on a server (I plan to deploy there some other sites in the future) where there are installed Apache 2 and mod_python 3.

Re: CheckboxSelectMultipleField problem

2006-09-05 Thread mthorley
I've run into a similar problem witha a custom field I am developing that is, in-part, based off of CheckboxSelectMultipleField. Do you know if there is any way to automate the call of prepare? -- mthorley --~--~-~--~~~---~--~~ You received this message because y

Re: CheckboxSelectMultipleField problem

2006-09-05 Thread Guillermo Fernandez Castellanos
Cheers, After a lot of trial-and-error and some source reading, an answer to my own post: In order to use a CheckboxSelectMultipleField as a SelectMultipleField you must prepare the data before :-) That means: if request.POST: new_data = request.POST.copy() errors = manipulat

Re: Running two django projects on the same server

2006-09-05 Thread Brett Parker
On Tue, Sep 05, 2006 at 04:23:59PM -, brian corrigan wrote: > > Hi all, > > I'm trying to run two seperate Django project on the same server, one > on port 7000 and one on 8000. Both projects use the auto generated > admin and authentication. When I am logged into one (say on port 7000) > an

Re: {% include %}'d files not interpolating {% block %}s?

2006-09-05 Thread Cole Tuininga
On 9/5/06, Adrian Holovaty <[EMAIL PROTECTED]> wrote: > I believe the {% include %} tag doesn't integrate with template > inheritance as you're expecting it to. Fair enough. Is there a better way to accomplish this? I'd much prefer to have the title defined within the template rather than havin

Re: I'm a new user trying to set up a second app, and I'm getting 404s

2006-09-05 Thread markscottwright
Damn. I figure it out 10 seconds after posting. I needed to add allow_empty=True to the arguments for object_list. Sorry everyone. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to

I'm a new user trying to set up a second app, and I'm getting 404s

2006-09-05 Thread markscottwright
I'm trying to add my own app to the site I created when I went though the tutorial. So, I've already got "polls" set up, and I'm trying to set up an app called liontamer. I've done essentially the same thing as the polls site (described below), but when I try to go to the root url (localhost:800

Re: Returning images with Django

2006-09-05 Thread Filipe
I see. thanks. --~--~-~--~~~---~--~~ 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]

Re: trouble getting make-messages.py to generate .po files

2006-09-05 Thread arthur debert
Ok, got this one figured out, posting here if someone hits the same wall. The pre-installed gettext on the mac is version .10 something. gettext support for python is >.12 so you must install a newer version. installed it from darwin ports and it worked like a charm. cheers arthur --~--~

Re: Django to replace in-house PHP framework [speculative][long]

2006-09-05 Thread Eric Walstad
Hey Rory... On Monday 04 September 2006 17:03, Rory Campbell-Lange wrote: > I'd be hugely grateful for advice on how suited Django might be to > integrating with custom-written pl/pgsql queries, stuff that running the > Django test tutorial does not answer. I imagine mapping python objects > to pl

Re: A bit puzzled on how to create the 'complete' website

2006-09-05 Thread Eric Walstad
Hey Laundro, On Tuesday 05 September 2006 06:56, [EMAIL PROTECTED] wrote: > Do I need to create one big view.py that sends all relevant data to one > large template? (I'd imagine not). Is there a way to 'cascade' > view.py's, so that some sort of website-logic decision script can > decide which v

Running two django projects on the same server

2006-09-05 Thread brian corrigan
Hi all, I'm trying to run two seperate Django project on the same server, one on port 7000 and one on 8000. Both projects use the auto generated admin and authentication. When I am logged into one (say on port 7000) and try and access the other project on 8000 I get the following error: Suspicio

Re: {% include %}'d files not interpolating {% block %}s?

2006-09-05 Thread Adrian Holovaty
On 9/4/06, Cole Tuininga <[EMAIL PROTECTED]> wrote: > The idea being that my individaul page templates can simply {% inherit > "base.tmpl" %} and then simply do something like: > > {% block title %}The title for the particular template{% endblock %} > > However, when I render this, it turns out to

Re: Need Template Tag help - I'm making this harder than it has to be.

2006-09-05 Thread [EMAIL PROTECTED]
It occurs to me as I look at this further that I don't want to return the Section object at all and what I'm really trying to do is get the appropriate Section object and then return it's child sponsors. --~--~-~--~~~---~--~~ You received this message because you

Re: Strange socket problem

2006-09-05 Thread Jay Parlar
On 9/5/06, limodou <[EMAIL PROTECTED]> wrote: > > Sometimes I will get below error message, but not each request I could > get this, but it occurs very often, I don't know why? I'm working in > windows XP, python 2.4.3, django trunk version. Has anyone also > encountered this problem? > > [05/Sep/

Re: Need Template Tag help - I'm making this harder than it has to be.

2006-09-05 Thread coulix
A short cut register = template.Library() class SponsorsListNode(template.Node): def __init__(self, section, varname): self.section = section self.varname = varname def __repr__(self): return "" def render(self, context): context[self.varname] = Secti

Re: Filter question

2006-09-05 Thread primitive
example code qdict = QueryDict('id=1&fk_client_id=2') queryset = Ticket.objects for k, v in qdict.iteritems(): queryset = queryset.filter(k = v) Essentially what I want to do here, is get a list of filter keywords from an HTTP request, and then iterate through these to create the final filt

Need Template Tag help - I'm making this harder than it has to be.

2006-09-05 Thread [EMAIL PROTECTED]
What I'm trying to do is grab the site sponsors according to site section. Some sponsor section A, others section B, etc. As I have it, I'm returning a list of sponsors filtered by section. This works, but it seems dumb, since I'm always returning a list of one (section). In my template, which th

Re: add/edit/delete for users and login functionality

2006-09-05 Thread James Bennett
On 9/5/06, Chubby <[EMAIL PROTECTED]> wrote: > I would want to have parts of the generated admin page available to the > users. > With parts i mean the functionality to add, edit and delete records > from > the tables containing the application data (so not the users/groups > etc). You'll want to

Re: Advanced Admin Customization

2006-09-05 Thread mthorley
Thanks for the tip Nate! Does any one know what method receives the data from the form when it is submitted? I tried models.Field.get_db_prep_save but that doesn't seem to be working. I need to process the form data before it is passed off to the database for saving. -- mthorley --~--~

add/edit/delete for users and login functionality

2006-09-05 Thread Chubby
Hi, i'm going to use django to develop a web app (and several more after that :)). I did the tutorial and a few things where unclear to me. I would want to have parts of the generated admin page available to the users. With parts i mean the functionality to add, edit and delete records from the t

Re: How to correct this error?

2006-09-05 Thread PythonistL
Thank you for the reply I still use Django 0.91 and I could not find django/db/backends/mysql/base.py I found only C:\Python23\Lib\site-packages\django\core\base.py and C:\Python23\Lib\site-packages\django\core\db\mysql.py Which file should I change with if self.connection.get_server_info() >=

A bit puzzled on how to create the 'complete' website

2006-09-05 Thread Laundro
Hi, I'm relatively new to Django, but I have created my fair share of view.py's already, some basic, some less basic. There's still something I can't get my head around (yet), and that is how to integrate it all into one big website. For instance, the views I have created are search forms, regis

Re: my private django repository goes public

2006-09-05 Thread garaged
On 8/26/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Hi, > > for svn checkout or export the correct trunk-url is > http://svn.sourceforge.net/svnroot/django-userlibs/trunk > > Regards, > Dirk I finally got a chance to look at your work, but I really don't understand how to make it work, t

Re: Restrict amount of text in a TextField form

2006-09-05 Thread Guillermo Fernandez Castellanos
Hi, It seems to me that TextField has a maximum number of text. In the code /django/forms/__init__.py: class TextField(FormField): def __init__(self, field_name, length=30, maxlength=None, is_required=False, validator_list=None, member_name=None): It seems to be maxlength. You can see it us

Re: Filter question

2006-09-05 Thread Russell Keith-Magee
On 9/5/06, primitive <[EMAIL PROTECTED]> wrote: Is it possible to use a string (coming from an request object) as akeyword to filter? I keep getting errors, but I don't know how toconvert these strings into types that filter will understand. Short answer; yes. request.GET is just a dictionary of or

Re: Filter question

2006-09-05 Thread Laundro
Just from the top of my head (I'm a bit bored at work). As the filter options are python scripts anyway, maybe you could integrate them in your script and call them from within the script and send the altered text to your template? Or maybe you could write your template from within the script its

Re: Diamanda Wiki and MyghtyBoard Forum on SVN now

2006-09-05 Thread [EMAIL PROTECTED]
thanks for the report, I'll fix it and push to SVN --~--~-~--~~~---~--~~ 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 gr

Restrict amount of text in a TextField form

2006-09-05 Thread cyberco
How can I set a maximum for the amount of text a user enters in a TextField form? CharField has a 'maxlength' parameter, but TextField not. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To po

Filter question

2006-09-05 Thread primitive
Good day, I am a Python and Django newbie, so bear with me if this is a silly question. Is it possible to use a string (coming from an request object) as a keyword to filter? I keep getting errors, but I don't know how to convert these strings into types that filter will understand. eg. I conve

Re: How much text in a db field is acceptable?

2006-09-05 Thread cyberco
There is no formatting whatsoever, so I guess I can feel comfortable storing (max) 5000 characters in a database field. Thanks! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this g

Re: How to use Django as a web interface for another program?

2006-09-05 Thread Iwan Memruk
首诗,I think you can use Django without using its DB features -- only views and templates.Just check out the tutorials, and whenever Model data is being fetched or stored, use your server calls in whatever format you need instead. On 9/4/06, 一首诗 <[EMAIL PROTECTED]> wrote: Hi allIn most cases, web app

Strange socket problem

2006-09-05 Thread limodou
Sometimes I will get below error message, but not each request I could get this, but it occurs very often, I don't know why? I'm working in windows XP, python 2.4.3, django trunk version. Has anyone also encountered this problem? [05/Sep/2006 19:48:56] "GET /site_media/cbc/syntax/Scripts/shBrushX

Re: can't open file 'django-admin.py'

2006-09-05 Thread briantcva
That was the painfully obvious step I was missing. As expected, both relieved and annoyed. Thanks for both. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email t

Re: Diamanda Wiki and MyghtyBoard Forum on SVN now

2006-09-05 Thread limodou
On 9/5/06, limodou <[EMAIL PROTECTED]> wrote: > On 9/5/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > > Link: http://code.google.com/p/diamanda/ > > The SVN repository contains the latest code for diamanda wiki and > > MyghtyBoard forum (NEW). > > > > Requiremens: > > - django svn or 0.95

Re: How to correct this error?

2006-09-05 Thread Scater
in mysql config: [mysqld] default-character-set = cp1251 default-collation = cp1251_ukrainian_ci init-connect="SET NAMES cp1251" for your database: create database dbase charset=utf8; and ... in file django/db/backends/mysql/base.py we have: if self.connection.get_server_info() >= '4.1': curs

Re: How to correct this error?

2006-09-05 Thread [EMAIL PROTECTED]
Yes, you can use MySQL's CONVERT() or CAST() functions (http://dev.mysql.com/doc/refman/5.0/en/charset-convert.html). As limodou says - move everything to UTF-8, it'll save you hours of hardwork later. --Simon --~--~-~--~~~---~--~~ You received this message becau

Re: Generic views table sort

2006-09-05 Thread Aidas Bendoraitis
For that reason I made a custom object_list view based on the generic one. -- code start -- def object_list(request, queryset, paginate_by=None, page=None, allow_empty=False, template_name=None, template_loader=loader, extra_context=None, context_processors=None, template_object_

Re: Generic views table sort

2006-09-05 Thread charles sibbald
take a look at http://www.softcomplex.com table sorting and pagination, simply amazing- Original Message From: Robert <[EMAIL PROTECTED]>To: Django users Sent: Tuesday, September 5, 2006 11:13:55 AMSubject: Generic views table sortHi,I'm using 'object_list' for getting object list and now I

WebServices datasource

2006-09-05 Thread Marc Fargas
Hi, In reference to [1], what would be the best way to provide a datasource for a model that is backed on a WebService ? Image you have a webservice that returns "customer objects", then I'd like to have a model called Customer on which to use .objects.all() and so. So, how should I build that mo

Re: Returning images with Django

2006-09-05 Thread Ned Batchelder
Filipe wrote: Ian Holsman wrote: im = Image.open('%s/blah.jpg' % settings.MEDIA_ROOT ) resp = HttpResponse( mimetype="image/jpeg" ) im.save( resp, 'JPEG' ) return resp ? yeah, precisely! thanks. although it works perfectly there's something I don't quite u

Generic views table sort

2006-09-05 Thread Robert
Hi, I'm using 'object_list' for getting object list and now I need to add column sorting in my table. I am new to both python & Django, and read contrib/admin/teamplates,tamplatetags many times and can't understand how pagination & column sorting works in Admin panel. Also tried a javascript 's

Re: Returning images with Django

2006-09-05 Thread Filipe
Ian Holsman wrote: > im = Image.open('%s/blah.jpg' % settings.MEDIA_ROOT ) > resp = HttpResponse( mimetype="image/jpeg" ) > im.save( resp, 'JPEG' ) > return resp > ? yeah, precisely! thanks. although it works perfectly there's something I don't quite understand (i'm still a newbie

Re: How to correct this error?

2006-09-05 Thread limodou
On 9/5/06, PythonistL <[EMAIL PROTECTED]> wrote: > > Limodou, > Thank you for your reply. > Is it possible to "convert" the field in MySQL instead of converting > characters? > Thank you for reply > L > I don't know. I only use utf-8, so I havenot encountered your problem till now. -- I like pyt

Re: How to correct this error?

2006-09-05 Thread PythonistL
Limodou, Thank you for your reply. Is it possible to "convert" the field in MySQL instead of converting characters? Thank you for reply L --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post

Re: How much text in a db field is acceptable?

2006-09-05 Thread Guillermo Fernandez Castellanos
Hi, Databases can handle much larger files than that. People use databases to keep the entrances of the blogs, and some of them can be pretty large (see some of the django developper blogs as an example). Hope it helps. G On 9/5/06, cyberco <[EMAIL PROTECTED]> wrote: > > Thanks for the pointer

Re: How much text in a db field is acceptable?

2006-09-05 Thread Kenneth Gonsalves
On 05-Sep-06, at 1:57 PM, cyberco wrote: > he model (i.e. each row in the db table) potentially contains 5k > characters. Is that too much for a database and should I put that text > in files? Or is that no problem at all? 5k is nothing - the question is, what kind of formatting do you have o

Re: How to correct this error?

2006-09-05 Thread limodou
On 9/5/06, PythonistL <[EMAIL PROTECTED]> wrote: > > Hello , > I use MySQL with Django and it works great untill I try to insert > non-English characters.Then I get > > > (1267, "Illegal mix of collations (utf8_czech_ci,IMPLICIT) and > (latin1_swedish_ci,COERCIBLE) for operation '='") > > How can

Re: How much text in a db field is acceptable?

2006-09-05 Thread cyberco
Thanks for the pointer, but flatpages is not exactly what I am after. To be more specific: one of the fields in my model is a TextField that holds a maximum of 5000 characters. This means that each instance of the model (i.e. each row in the db table) potentially contains 5k characters. Is that to

How to correct this error?

2006-09-05 Thread PythonistL
Hello , I use MySQL with Django and it works great untill I try to insert non-English characters.Then I get (1267, "Illegal mix of collations (utf8_czech_ci,IMPLICIT) and (latin1_swedish_ci,COERCIBLE) for operation '='") How can I correct this error? Thank you for help L. --~--~-~--~-

Re: Django to replace in-house PHP framework [speculative][long]

2006-09-05 Thread Rory Campbell-Lange
Hi. On 04/09/06, [EMAIL PROTECTED] ([EMAIL PROTECTED]) wrote: > > Django ORM is high level and specific ORM which in generall work with > tables described in models and it was designed for a > CMS-maker-framework :) If you have more advanced database stuff then > you could use independent python

Re: can't open file 'django-admin.py'

2006-09-05 Thread Sean
If I understand you correctly your problem is the shell not finding the django-admin.py file. Setting the PythonPath doesn't put django-admin.py on your normal Path, which is used to find commands in the shell. So you could either symlink django-admin to some place in your Path, like /usr/bin, or