Re: Conflict trying to save models when roles metaclass is applied.

2010-12-02 Thread juacompe
Hi Bruno, Thank you very much!! Adding an inner Meta class works like charm. Below is the working code with proving testcases -- models.py -- from django.db.models import Model, CharField from django.db.models.base import ModelBase from roles

Add Tiny_mce for Django Admin site

2010-12-02 Thread Amao Zhao
Hi all: I am using Django1.2.3 and python2.6.5. And I want to add the Tiny_mce for my admin in my project. But I followed the doc on django, it does not work. Here is my code: The admin.py: class EntryAdmin(admin.ModelAdmin): class Media: js =

Re: List compare is there something better than a double loop?

2010-12-02 Thread Aaron Sterling
> > > I'm building a store that has a product_list (class ProductList: > store, name, description) that contains .products (class Product: > name, description, price etc...) > > If you're expecting them to be in the same order, you could do all(product == cartitem.product for product,

List compare is there something better than a double loop?

2010-12-02 Thread Sector7B
Hi, I probably have a common problem and maybe i'm not thinking about this correctly, but here it is. I'm building a store that has a product_list (class ProductList: store, name, description) that contains .products (class Product: name, description, price etc...) I also have a cart that is

Re: how to define choices option per model's instance

2010-12-02 Thread adj7388
Here is an approach I have used. I can't tell from your question whether this will help you or not. class AccountEntryModelForm(ModelForm): def __init__(self, organization=None, operation=None, *args, **kwargs): super(ModelForm, self).__init__(*args, **kwargs)

Re: Django 1.2.3, Oracle with Character Set WE8MSWIN1252 - 'utf8' codec can't decode bytes

2010-12-02 Thread Ian Kelly
On Thu, Dec 2, 2010 at 5:52 PM, Anurag Chourasia wrote: > Hi Ian, > Can't tell you how much this helps :-) > Setting the variable using ctypes before the import of cx_Oracle does the > trick for me. > Appreciate the time you spent in helping resolve this. > Is there

Override data validation on one django form element

2010-12-02 Thread Ed
I have a select list dropdown box on my form that is populated with data from a Model (Directors). The value of this dropdown doesn't need to be saved; it is really only used to dynamically trigger another element of the form (a dropdown titled Films). So when the user chooses a Director, it

Re: Django 1.2.3, Oracle with Character Set WE8MSWIN1252 - 'utf8' codec can't decode bytes

2010-12-02 Thread Anurag Chourasia
Hi Ian, Can't tell you how much this helps :-) Setting the variable using ctypes before the import of cx_Oracle does the trick for me. Appreciate the time you spent in helping resolve this. Is there any Cygwin specific doc where we could include this? Regards, Anurag On Fri, Dec 3, 2010 at

Re: Error in ajax request

2010-12-02 Thread Andre Terra
Ah, gotcha. What was I thinking? It's pretty obvious now :P On Thu, Dec 2, 2010 at 21:37, pjrhar...@gmail.com wrote: > On Dec 1, 2:43 am, Andre Terra wrote: > > Noob question here: why would it need limit=5 if the funcion has default > > values? > >

Re: Django 1.2.3, Oracle with Character Set WE8MSWIN1252 - 'utf8' codec can't decode bytes

2010-12-02 Thread Ian Kelly
On Thu, Dec 2, 2010 at 5:34 PM, Anurag Chourasia wrote: > Hi Ian, > I just tried the ctypes solution that you mentioned in your previous email > but it does not work for me. In your transcript, it appears that Django has already been loaded when you call the ctypes

Re: Django 1.2.3, Oracle with Character Set WE8MSWIN1252 - 'utf8' codec can't decode bytes

2010-12-02 Thread Anurag Chourasia
Hi Ian, I just tried the ctypes solution that you mentioned in your previous email but it does not work for me. Below is my session transcripts. >>> import ctypes *>>> ctypes.CDLL('kernel32').SetEnvironmentVariableA('NLS_LANG', '.UTF8')* *1* >>> TerminologyMap.objects.get(term_id=8) Traceback

Re: Error in ajax request

2010-12-02 Thread pjrhar...@gmail.com
On Dec 1, 2:43 am, Andre Terra wrote: > Noob question here: why would it need limit=5 if the funcion has default > values? Even if it has a default value, you still need to call it to get your decorator. As someone wrote above, its a function that returns a decorator, not

Re: Django 1.2.3, Oracle with Character Set WE8MSWIN1252 - 'utf8' codec can't decode bytes

2010-12-02 Thread Ian Kelly
On Thu, Dec 2, 2010 at 3:23 PM, Ian Kelly wrote: > Weird.  From what I can tell, this seems to have something to do with > Cygwin, or at least I'm able to replicate it in that environment. > Setting NLS_LANG in or out of process and changing the registry key > all have no

Re: Django 1.2.3, Oracle with Character Set WE8MSWIN1252 - 'utf8' codec can't decode bytes

2010-12-02 Thread Ian Kelly
On Thu, Dec 2, 2010 at 1:21 PM, Anurag Chourasia wrote: > Hi Ian, > Here is the information requested by you. > $ python > Python 2.5.2 (r252:60911, Dec  2 2008, 09:26:14) > [GCC 3.4.4 (cygming special, gdc 0.12, using dmd 0.125)] on cygwin > Type "help", "copyright",

Re: ORA-01425

2010-12-02 Thread Tim Sawyer
On 02/12/10 19:14, Jirka Vejrazka wrote: It looks as though something like that may be necessary. For those of you running into this problem, do you get the error with the following query? cursor.execute(r"SELECT 1 FROM DUAL WHERE TRANSLATE('A' USING NCHAR_CS) LIKE TRANSLATE('A' USING

Re: Django 1.2.3, Oracle with Character Set WE8MSWIN1252 - 'utf8' codec can't decode bytes

2010-12-02 Thread Anurag Chourasia
Hi Ian, Here is the information requested by you. $ python Python 2.5.2 (r252:60911, Dec 2 2008, 09:26:14) [GCC 3.4.4 (cygming special, gdc 0.12, using dmd 0.125)] on cygwin Type "help", "copyright", "credits" or "license" for more information. >>> import os >>> print os.environ['NLS_LANG']

Re: ORA-01425

2010-12-02 Thread Jirka Vejrazka
> No error for me, but that's on a monkeypatched system. I can try > without the patch, but only after weekend :( Actually, screw production servers :) Tried on unpatched Django 1.2.1, got exactly the same result, no error. Jirka -- You received this message because you are subscribed to

Removing all URLs associated with django admin / admindoc in admindoc view page

2010-12-02 Thread JeeyoungKim
Hello, I'm trying to use django's admindoc module in my project. I realized that the view documentations for the project, located under /admin/doc/ views/ (my admin docs are served by admin/doc is littered with views for the both admin and admindoc module. Those views aren't very interesting for

What Does Access Log Imply About Media Files' Location

2010-12-02 Thread octopusgrabbus
In my muddling around working on two problems involving serving media pages, I have both problems narrowed down to similar 404 entries in access_log (apache/mod_python). 10.100.0.88 - - [02/Dec/2010:14:15:29 -0500] "GET /media/admin/media/ css/base.cs s HTTP/1.1" 404 2343

Re: ORA-01425

2010-12-02 Thread Jirka Vejrazka
> It looks as though something like that may be necessary.  For those of > you running into this problem, do you get the error with the following > query? > cursor.execute(r"SELECT 1 FROM DUAL WHERE TRANSLATE('A' USING NCHAR_CS) LIKE TRANSLATE('A' USING NCHAR_CS) ESCAPE TRANSLATE('\'

Re: ORA-01425

2010-12-02 Thread Ian
On Dec 2, 8:40 am, Jirka Vejrazka wrote: > P.S. This got me thinking - maybe the Oracle backend could do some > "autodetection" of which version works fine in the current > environment? Yes, it'd be extra query at startup I guess, but don't > really see any other way...

Re: how to define choices option per model's instance

2010-12-02 Thread Alex Boyko
Hi Cal! Thank you very much for your reply and advice, but unfortunately it doesn't work. It seems like in __init__ method we can't re-assign the choices. Even if I try: class Something(models.Model): def __init__(self, *args, **kwargs): _choices = ((SomeValue, 'SomeString'), )

Re: Django 1.2.3, Oracle with Character Set WE8MSWIN1252 - 'utf8' codec can't decode bytes

2010-12-02 Thread Ian Kelly
On Thu, Dec 2, 2010 at 6:43 AM, Anurag Chourasia wrote: > Hi Ian, > Yes.I set the NLS_LANG in my shell to UTF8 before trying this. > Query using Django model still fails (direct query using cx_Oracle works > fine) > Regards, > Anurag Okay, so it would appear that

Re: django admin css problem

2010-12-02 Thread octopusgrabbus
I failed to provide the following information in a similar post, and it slowed down responses. 1) What web server are you using? If it is not the built in development server, please provide the configuration for Django. 2) Check your application's settings.py file and make sure the appropriate

Re: django admin css problem

2010-12-02 Thread ozgur yilmaz
I found the answer. The problem was about the apache (httpd) configuration. When i add the following to httpd config, the problem is solved: AllowOverride None Options None Order allow,deny Allow from all Alias /media/

django admin css problem

2010-12-02 Thread ozgur yilmaz
Hi, Yesterday i moved my site to a linux solution. Everything is going fine, except admin site. When i go to url example.com/admin, the template doesnt work. When i look at the source, i see these: But i dont have any urls or files on example.com/media/css/base.css or

custom form based on user in admin

2010-12-02 Thread Aljoša Mohorović
is this the best way to use different forms for users in admin app? = class MyModelForm: ... class RootMyModelForm: ... class MyModelAdmin(admin.ModelAdmin): form = MyModelForm def get_form(self, request, obj=None, **kwargs):

Re: Load ForeignKey label instead of ID in Charfield

2010-12-02 Thread wayne
Well, I'm guessing that what is displayed is what the unicode method returns for the model that the ForeignKey points to (can't remember for sure offhand, but I know that the admin interface works that way). Of course, it might also be changing the display because you're putting it in a TextField

Re: Conflict trying to save models when roles metaclass is applied.

2010-12-02 Thread bruno desthuilliers
On 2 déc, 06:03, juacompe wrote: > Hi Bruno, > > I have tried to save the roled model and got [AttributeError: 'Person > +Carpenter' object has no attribute 'person_ptr_id'] as in traceback > below. > Uhu... Very quick anwser, would need more in-depth analyses, but I'm pretty

Re: Load ForeignKey label instead of ID in Charfield

2010-12-02 Thread bnabilos
Hi, Thank you for your answer. That's right, I'm using a ForeignKey from a model to another and I'm allowing users to edit it by entring text. It's for a school project, I've added a method in my form (clean_field(self)) that creates and saves an object based on what the user wrote. I did that to

Re: Project management software

2010-12-02 Thread piz...@gmail.com
My PMA is unfinished and it's more a coding exercise than an end product, but you can take a look to it (MIT license): Repository: git://halcyon.zapto.org/supervise Navigate repo (cgit): http://halcyon.zapto.org Demo (only a few url's working right now): http://halcyon.zapto.org:8000

Re: Process UploadedFile with PIL on-the-fly

2010-12-02 Thread wayne
On Dec 2, 4:40 am, muzhig wrote: > Hi! I need to resize and make a stamp on uploaded images and only then > save a model. > I have a procedure, that processes incoming File: > > def processUploadedImage(file): >         img = Image.open(file) >        

Re: Records detected by admin site, but not displayed?

2010-12-02 Thread wayne
On Dec 2, 8:15 am, Sithembewena Lloyd Dube wrote: > Hi all, > > I have an admin site enabled for my Django project. For some reason, some > records are no longer displayed (they were displayed just fine before). > > Tried restarting the dev server to no avail. > > Please see

Re: Project management software

2010-12-02 Thread tiemonster
Baurzhan, I explicitly will not provide support for time-tracking in this software. It is one of many features that I feel moves project management software beyond the realm of understanding for business users and into the realm of the project manager. That's not the point of this project.

Re: Load ForeignKey label instead of ID in Charfield

2010-12-02 Thread wayne
On Dec 2, 10:03 am, bnabilos wrote: > Hello, > > I'm using a ForeignKey in my model and a Charfield in my form, when I > save data everything works well but when I try to edit something, I > get the ForeignKey ID in the Charfield. > > There is a way to display the label

Re: ORA-01425

2010-12-02 Thread Jirka Vejrazka
> Interesting that I'm seeing this in an upgrade from 10.2.0.4 to 10.2.0.5. > > Instead of changing from LIKE to LIKEC - if I add more backslashes will that > work? Honestly, I can't tell. It's been too long and I can't test it now :-((( Jirka -- You received this message because you

Re: Fwd: Django in production on Windows

2010-12-02 Thread Javier Guerra Giraldez
On Thu, Dec 2, 2010 at 10:57 AM, ashdesigner wrote: > browsing through techy blogs I often saw FastCGI mentioned as someway 'slow', > 'deprecated', you're reading the wrong blogs > 'IIS7-incompatible' that might be true, i have no idea. a big reason to stay far from

Re: ORA-01425

2010-12-02 Thread Tim Sawyer
On 02/12/10 15:40, Jirka Vejrazka wrote: I'm using Django against an Oracle 10 database. It used to work. Then they upgraded it to 10.2.0.5 (not sure what from, I can probably find out). Hi Tim, sorry, I don't have a solution for you, but you might want to check out

Re: dict objects are unhashable

2010-12-02 Thread Tom Evans
On Thu, Dec 2, 2010 at 3:31 PM, Carlos Aboim wrote: > Thank you Tom for your answer and pacience. But I am totally lost! > I recoded urls because we don't need specify the default template_name > So I am going post all my releated files and code if you could analyze > it for me

Load ForeignKey label instead of ID in Charfield

2010-12-02 Thread bnabilos
Hello, I'm using a ForeignKey in my model and a Charfield in my form, when I save data everything works well but when I try to edit something, I get the ForeignKey ID in the Charfield. There is a way to display the label instead of the ID when editing an entry ? Thank you -- You received this

Re: Fwd: Django in production on Windows

2010-12-02 Thread ashdesigner
Guys, Again, the issue is just as follows: 1. Windows + IIS only(!). 2. Win/*nix + whatever else. Our employed admins can administer IIS only. Which means, having to deal with any other webserver (different from IIS) unbinds us from using a Win platform at all. Anthony On Dec 2, 6:33 pm,

Re: Fwd: Django in production on Windows

2010-12-02 Thread ashdesigner
Javier, As a beginner, I don't have any own experience to judge, but browsing through techy blogs I often saw FastCGI mentioned as someway 'slow', 'deprecated', 'IIS7-incompatible', etc. Maybe I am wrong, but using PyISAPIe was described as 'much much faster'. You see, performance matters

Re: ORA-01425

2010-12-02 Thread Tim Sawyer
Interesting. I'm using Django 1.2.3. I just manually applied the diff from http://code.djangoproject.com/ticket/5985 which is to change from LIKE to LIKEC and it works now. Has this regressed for some reason? Looks like it was

Re: Fwd: Django in production on Windows

2010-12-02 Thread ashdesigner
Lloyd, Yes, correct. To us it is purely a webserver (IIS) issue. Anthony On Dec 2, 6:29 pm, Sithembewena Lloyd Dube wrote: > True, Javier. But the issue isn't whether or not Django + Python can run > smooth on Windows - it is a web server problem? Specifically IIS? > > On

Re: ORA-01425

2010-12-02 Thread Jirka Vejrazka
> I'm using Django against an Oracle 10 database.  It used to work.  Then they > upgraded it to 10.2.0.5 (not sure what from, I can probably find out). Hi Tim, sorry, I don't have a solution for you, but you might want to check out http://code.djangoproject.com/ticket/14149 and add description

Re: Fwd: Django in production on Windows

2010-12-02 Thread ashdesigner
Lloyd, Yes, correct. It is purely a webserver (IIS) issue. Anthony On Dec 2, 6:29 pm, Sithembewena Lloyd Dube wrote: > True, Javier. But the issue isn't whether or not Django + Python can run > smooth on Windows - it is a web server problem? Specifically IIS? > > On Thu, Dec

Re: Fwd: Django in production on Windows

2010-12-02 Thread Javier Guerra Giraldez
On Thu, Dec 2, 2010 at 10:29 AM, Sithembewena Lloyd Dube wrote: > it is a web server problem? Specifically IIS? if IIS can do FastCGI (and it should!) you can do django with flup if IIS can proxy HTTP (and it would be weird if it doesnt), you can do Django with

Re: dict objects are unhashable

2010-12-02 Thread Carlos Aboim
Thank you Tom for your answer and pacience. But I am totally lost! I recoded urls because we don't need specify the default template_name So I am going post all my releated files and code if you could analyze it for me I'll apreciate. urls inside app folder: http://dpaste.com/hold/282239/

Re: Fwd: Django in production on Windows

2010-12-02 Thread ashdesigner
Javier, Under "hack approach" I meant PyISAPIe + IIS (wich is weird by itself, but still). Anthony On Dec 2, 6:25 pm, Javier Guerra Giraldez wrote: > On Thu, Dec 2, 2010 at 10:05 AM, ashdesigner > wrote: > > not to use Python/Django > >

Re: Django in production on Windows

2010-12-02 Thread ashdesigner
David, Thanks for your advice. Our IT environment is not hostile towards *nix, but the general corporate policy is to stick to MS as much as we can. Which means, we may start supporting a *nix OS, but this will cost us some extra money. As such, I have to obtain significant reasons to prove my

Re: Fwd: Django in production on Windows

2010-12-02 Thread Sithembewena Lloyd Dube
True, Javier. But the issue isn't whether or not Django + Python can run smooth on Windows - it is a web server problem? Specifically IIS? On Thu, Dec 2, 2010 at 5:25 PM, Javier Guerra Giraldez wrote: > On Thu, Dec 2, 2010 at 10:05 AM, ashdesigner

Re: Fwd: Django in production on Windows

2010-12-02 Thread Javier Guerra Giraldez
On Thu, Dec 2, 2010 at 10:05 AM, ashdesigner wrote: > not to use Python/Django > +IIS+Windows because of lack of support and tools immaturity ("hack" > approach). not at all. there are lots of goods reasons to go the *nix route (be it Linux, BSD, Solaris, etc). but

Re: Fwd: Django in production on Windows

2010-12-02 Thread Sithembewena Lloyd Dube
Correct :) On Thu, Dec 2, 2010 at 5:05 PM, ashdesigner wrote: > > I thank you all so much for the really valuable pieces of advice. All > > in all, the underscore seems to be as follows: not to use Python/Django > > +IIS+Windows because of lack of support and tools

Re: Django in production on Windows

2010-12-02 Thread ashdesigner
Lloyd, The only thing we shall really avoid is a painful webserver administration and/or project support and development. In fact, we may hire a Linux admin, but I have to provide convincing reasons for that to the IT dpt. We have to get the project up and running asap, with as less obstacles as

ORA-01425

2010-12-02 Thread Tim Sawyer
Hello, I'm using Django against an Oracle 10 database. It used to work. Then they upgraded it to 10.2.0.5 (not sure what from, I can probably find out). This query now gives: ORA-01425: escape character must be character string of length 1. 'SELECT

Re: Django in production on Windows

2010-12-02 Thread David De La Harpe Golden
On 02/12/10 14:22, ashdesigner wrote: > Guys, > > As I can judge from the posts and links above, an ISAPI plugin > (PyISAPIe) which is declared the best and fastest way to run Django > apps on Windows and primarily intended to be used with IIS Hmm. Fastcgi looked most promising to me, not that

Re: Fwd: Django in production on Windows

2010-12-02 Thread ashdesigner
I thank you all so much for the really valuable pieces of advice. All in all, the underscore seems to be as follows: not to use Python/Django +IIS+Windows because of lack of support and tools immaturity ("hack" approach). One'd better deploy on Win/Unix + Apache, am I right? On Dec 2, 5:39 pm,

Re: Django in production on Windows

2010-12-02 Thread Sithembewena Lloyd Dube
Hi Anthony, if you could share, what would the nature of your requirements be? Do you just want to deploy Django web apps? I am trying to think of ways you could do this - although I honestly think it sounds like you need to go Linux. Regards, Lloyd -- You received this message because you

Fwd: Django in production on Windows

2010-12-02 Thread Javier Guerra Giraldez
On Thu, Dec 2, 2010 at 9:22 AM, ashdesigner wrote: > maybe I just don't get the point. i guess the point is that nobody likes IIS, so there's no development specific for that platform -- Javier -- Javier -- You received this message because you are subscribed to

Re: Django in production on Windows

2010-12-02 Thread Sithembewena Lloyd Dube
Hi Antony, I think that the main issue would be that the vast majority of Django developers deploy on Unix/ Linux. As such, there is probably more activity with development of open source software to support Django on those platforms than there is on Windows. Regarding the fact that your company

Re: dict objects are unhashable

2010-12-02 Thread Tom Evans
On Thu, Dec 2, 2010 at 2:42 PM, Carlos Aboim wrote: > Yeah I understand you! > > but is something missing me, because if I put it this way > > my urls: > info_dict = { >    'queryset': Obra.objects.all(), >    'template_object_name': 'obras', >    'paginate_by': 5, >    

Re: dict objects are unhashable

2010-12-02 Thread Carlos Aboim
Yeah I understand you! but is something missing me, because if I put it this way my urls: info_dict = { 'queryset': Obra.objects.all(), 'template_object_name': 'obras', 'paginate_by': 5, 'tamplate_name': 'obras/obra_list.html', } (r'page(?P[0-9]+)/$',

Re: dict objects are unhashable

2010-12-02 Thread Tom Evans
On Thu, Dec 2, 2010 at 2:18 PM, Carlos Aboim wrote: > Hi guys (and gals), > Why I am getting this error? > > Caught TypeError while rendering: dict objects are unhashable > > I am using a generic view (object_list) to render my template. But I > guess I am not passing all the

Re: Django in production on Windows

2010-12-02 Thread ashdesigner
Guys, As I can judge from the posts and links above, an ISAPI plugin (PyISAPIe) which is declared the best and fastest way to run Django apps on Windows and primarily intended to be used with IIS (although it is announced to work with Apache as well) simply doesn't work smothly with IIS. Or at

dict objects are unhashable

2010-12-02 Thread Carlos Aboim
Hi guys (and gals), Why I am getting this error? Caught TypeError while rendering: dict objects are unhashable I am using a generic view (object_list) to render my template. But I guess I am not passing all the data correctly. Could you show me the correct direction? my urls: info_dict = {

Records detected by admin site, but not displayed?

2010-12-02 Thread Sithembewena Lloyd Dube
Hi all, I have an admin site enabled for my Django project. For some reason, some records are no longer displayed (they were displayed just fine before). Tried restarting the dev server to no avail. Please see the attached screen dump? What could be causing this? -- Regards, Sithembewena

Re: Django Graphics

2010-12-02 Thread George Silva
Perhaps you can process/display CAD drawings using PostGIS + OpenLayers? On Thu, Dec 2, 2010 at 8:36 AM, Shamail Tayyab wrote: > Have you also tried the python's imaging library? > > You can easily make any type of images in PIL and the display them as > images in browser.

Re: Django 1.2.3, Oracle with Character Set WE8MSWIN1252 - 'utf8' codec can't decode bytes

2010-12-02 Thread Anurag Chourasia
Hi Ian, Yes.I set the NLS_LANG in my shell to UTF8 before trying this. Query using Django model still fails (direct query using cx_Oracle works fine) Regards, Anurag On Thu, Dec 2, 2010 at 1:20 PM, Ian Kelly wrote: > On Wed, Dec 1, 2010 at 7:58 PM, Anurag Chourasia

Re: Django in production on Windows

2010-12-02 Thread CrabbyPete
I'm not saying not to use IIS, I could just not get it to work. Other people have asked how to get it work as well. Its not easy and I would love to here from someone that was able to get it to work with IIS. I developed everything on windows, and running Apache on windows was great. No headaches

Re: Django + Russian Charaters

2010-12-02 Thread Karen Tracey
On Thu, Dec 2, 2010 at 2:24 AM, pROCKrammer wrote: > Hi, I am getting such error while adding text with russian charaters > from the admin panel, Please help me > > The Model is > > class JobTitle (models.Model): ># Char Fields >title =

Process UploadedFile with PIL on-the-fly

2010-12-02 Thread muzhig
Hi! I need to resize and make a stamp on uploaded images and only then save a model. I have a procedure, that processes incoming File: def processUploadedImage(file): img = Image.open(file) downsampleUploadedimage(img) stampUploadedImage(img) img.save(file, "JPEG")

Re: Conflict trying to save models when roles metaclass is applied.

2010-12-02 Thread juacompe
Hi Bruno, I have tried to save the roled model and got [AttributeError: 'Person +Carpenter' object has no attribute 'person_ptr_id'] as in traceback below. In [1]: from carpenter.models import Person, Carpenter In [2]: jack = Person(name='Jack') In [3]: Carpenter(jack) Out[3]:

Re: Django Graphics

2010-12-02 Thread Shamail Tayyab
Have you also tried the python's imaging library? You can easily make any type of images in PIL and the display them as images in browser. (Should fit your requirement of circles, triangles etc and has lots more) Tx -- Shamail Tayyab Blog: http://shamail.in/blog On Dec 2, 3:08 pm, Jagdeep

Re: Django in production on Windows

2010-12-02 Thread ashdesigner
Cal, Thanks for promotion, but I think you could read the subject first. Anthony On Dec 2, 8:02 am, "Cal Leeming [Simplicity Media Ltd]" wrote: > It's a shame you are not using a *nix os, because you could have then > used uWSGI

Re: Django Graphics

2010-12-02 Thread Tom Evans
On Thu, Dec 2, 2010 at 10:08 AM, Jagdeep Singh Malhi wrote: > > > On Dec 2, 1:18 pm, "Cal Leeming [Simplicity Media Ltd]" > wrote: >> Please define 'handle graphics'. >> >> Do you mean serving graphics media? Creating graphics on the

Re: Django Graphics

2010-12-02 Thread Kenneth Gonsalves
On Thu, 2010-12-02 at 02:08 -0800, Jagdeep Singh Malhi wrote: > > Do you mean serving graphics media? Creating graphics on the fly? > > Resizing? Overlaying? Give us some clues ;) > > CAD. > > Making circle, triangle etc like in AutoCAD / QCAD, or paint brush > > Making sketches / figures.

Re: Django Graphics

2010-12-02 Thread Jagdeep Singh Malhi
On Dec 2, 1:18 pm, "Cal Leeming [Simplicity Media Ltd]" wrote: > Please define 'handle graphics'. > > Do you mean serving graphics media? Creating graphics on the fly? > Resizing? Overlaying? Give us some clues ;) CAD. Making circle, triangle etc like in

Re: get_object_or_404 on composite key and Value Error:Invalid Literal for int with base 10

2010-12-02 Thread Tom Evans
No, django does not support composite primary keys. So trying to use composite primary keys will not work. The best you can accomplish is a constraint. HTH Tom On Thu, Dec 2, 2010 at 7:45 AM, Pranav wrote: > > > On Dec 2, 12:10 am, bruno desthuilliers >

Re: Django Graphics

2010-12-02 Thread Kenneth Gonsalves
On Thu, 2010-12-02 at 00:14 -0800, Jagdeep Singh Malhi wrote: > Can we handle graphics in Django? yes -- regards Kenneth Gonsalves -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: Django Graphics

2010-12-02 Thread Cal Leeming [Simplicity Media Ltd]
Ah. http://lmgtfy.com/?q=django+charts+ ;) On 02/12/2010 08:22, Venkatraman S wrote: On Thu, Dec 2, 2010 at 1:44 PM, Jagdeep Singh Malhi > wrote: Can we handle graphics in Django? referring to charts? -- You received this

Re: Current Django 1.3 Alpha 2 Documentation as PDF

2010-12-02 Thread ckar...@googlemail.com
Current Doc: http://ubuntuone.com/p/Rmu/ Changelog: Udocs/topics/i18n/internationalization.txt Udocs/releases/1.3.txt Udocs/releases/1.3-alpha-2.txt Udocs/ref/contrib/admin/index.txt Udocs/ref/request-response.txt Udocs/ref/databases.txt -- You received this message

Re: Django Graphics

2010-12-02 Thread Venkatraman S
On Thu, Dec 2, 2010 at 1:44 PM, Jagdeep Singh Malhi wrote: > Can we handle graphics in Django? > > referring to charts? -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Django Graphics

2010-12-02 Thread Jagdeep Singh Malhi
Can we handle graphics in Django? -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For

Re: Django Graphics

2010-12-02 Thread Cal Leeming [Simplicity Media Ltd]
Please define 'handle graphics'. Do you mean serving graphics media? Creating graphics on the fly? Resizing? Overlaying? Give us some clues ;) On 02/12/2010 08:14, Jagdeep Singh Malhi wrote: Can we handle graphics in Django? -- You received this message because you are subscribed to the

Re: how to define choices option per model's instance

2010-12-02 Thread Cal Leeming [Simplicity Media Ltd]
Hi Alex, I think this is what you might be looking for. class Something(models.Model): def __init__(self, *args, **kwargs): if kwargs.has_key('range_marks'): _choices = kwargs.get('range_marks') del kwargs['range_marks'] else: _choices =