Re: Django model -> DOT converter

2006-08-05 Thread [EMAIL PROTECTED]
Nice work! & I'd love to see this in contrib somewhere. --Simon --~--~-~--~~~---~--~~ 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 unsubscrib

Re: get_for_model building bad SQL?

2006-08-05 Thread Malcolm Tredinnick
Hi Jay, Please start a new thread for a new topic, rather than replying on an existing thread. Makes things easier to track both in threaded email clients and in the web view. Thanks. :-) On Fri, 2006-08-04 at 23:06 -0600, Jay Klehr wrote: [...] > When I run this line: > > ctype = ContentType.o

Re: Django model -> DOT converter

2006-08-05 Thread Antonio Cavedoni
On 5 Aug 2006, at 3:05, Russell Keith-Magee wrote: > Nifty! If I may make some comments (and this is intended as > constructive criticism, not an attempt to belittle your work) Well, I was just procrastinating my university thesis anyway… > - The graphs that are drawn are accurate, but don't d

Internationalization and HTTP headers.

2006-08-05 Thread Poromenos
I have translated my site from English to Greek (el) and I have left english as the fallback language (I haven't created an english .po file), but the HTTP-header language selection doesn't work for me. If I set the installation language it works fine, but I can't get it to select content via the

multiple choices in model

2006-08-05 Thread Michael
Hello,From dajngo documentaytion: A choices list looks like this: YEAR_IN_SCHOOL_CHOICES = (('FR', 'Freshman'),('SO', 'Sophomore'),('JR', 'Junior'),('SR', 'Senior'),('GR', 'Graduate'),)Is it possible to have field with multiple choices in model like year=models.CharField(maxlen

Re: Internationalization and HTTP headers.

2006-08-05 Thread Poromenos
Never mind, I hadn't installed the Locale middleware, apparently it's used for HTTP header detection as well as manual language override. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post

Re: Django model -> DOT converter

2006-08-05 Thread Antonio Cavedoni
On 5 Aug 2006, at 2:44, Malcolm Tredinnick wrote: > That's a lot of circles! :-) Hehe, I told you it was crude! ;-) > If you weren't aware of them, you might want to have a look at the > "record" style for Nodes in graphviz. They are useful for > displaying things like class diagrams or data

Re: Django model -> DOT converter

2006-08-05 Thread Antonio Cavedoni
On 5 Aug 2006, at 3:40, Jeremy Dunck wrote: > On 8/4/06, Antonio Cavedoni <[EMAIL PROTECTED]> wrote: >> I have an initial, rather crude implementation of the Django model -> >> DOT (the Graphviz file format) converter. > > Related: > http://groups.google.com/group/django-users/browse_frm/thread/

Re: File upload and custom manipulator

2006-08-05 Thread didier Belot
2006/8/5, [EMAIL PROTECTED] <[EMAIL PROTECTED]>: > > I had problems with file uploading time ago and I found this post > > http://groups.google.com/group/django-users/browse_thread/thread/d83259c6bdd0151f/3880fdebcef9a367?lnk=gst&q=uploading+images&rnum=5#3880fdebcef9a367 > > It helped me so much.

Re: How to user django upload file ?

2006-08-05 Thread Gabriel Puliatti
On 8/5/06, Zheng JinYuan <[EMAIL PROTECTED]> wrote: > > Can not find document in django site about how to upload file ? Any tips ? > I did that a couple of days ago. http://code.google.com/p/arrrt Get the code, and look for the functions for uploading in views.py. -- Wagner's music is better

Django covered in podcast with Guido

2006-08-05 Thread Simon Willison
http://www.twit.tv/floss11 Django gets some good discussion about 50 minutes in. --~--~-~--~~~---~--~~ 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.

Re: How would I do this with Djangol?

2006-08-05 Thread John Matthew
Thanks Chris,I looked at that but it only gives me one record.  What i need is the last price for each stock.  Maybe im using the latest() function wrong?ThanksJohn On 8/4/06, Chris Long wrote:This might help: http://www.djangoproject.com/documentation/db_api/#latest-field-name-noneChris --~--~---

Invalid character error using Oracle backed

2006-08-05 Thread David
Django-0.95, with Oracle backend patch (latest: 3496?) applied. Python 2.4 on Linux Oracle XE and Oracle 10gR2 When I try to run syncdb using the Oracle backend, I reliably get the following error (last part of traceback only, let me know if I should post the whole traceback): File "django/db/

Using custom forms with generic views

2006-08-05 Thread jeffmikels
I'm trying to create a site that has entries of different types and tags that can link to any type of entry. In my models, I have a tags = models.ManyToManyField(Tag, blank=True, filter_interface=models.HORIZONTAL, related_name="tags") when using generic views and form.tags, I get a select box;

Re: How would I do this with Djangol?

2006-08-05 Thread HBTaylor
I'm not sure about your models, but I assume it is something like the following: from django.db import models class Holding(models.Model): symbol = models.CharField(maxlength=10) def __str__(self): return self.symbol def _get_latest_price(self): return self.price_se

List all categories, list all objects within these categories

2006-08-05 Thread [EMAIL PROTECTED]
Hi, Using the models below, I want a single page to show: bookcategory1 book1 book2 bookcategory2 book1 book2 ... bookcategory3 ... ... ... ## # Models class BookCategory(models.Model): ... class

Re: List all categories, list all objects within these categories

2006-08-05 Thread Jonathan Buchanan
[EMAIL PROTECTED] wrote: > Hi, > > Using the models below, I want a single page to show: > > bookcategory1 > book1 > book2 > bookcategory2 > book1 > book2 > ... > bookcategory3 > ... > ... > ... > > ## > > # Models > >

Re: List all categories, list all objects within these categories

2006-08-05 Thread [EMAIL PROTECTED]
Hello Jonathan, Thank you for your quick reply. Works fine! Bye, Cello --~--~-~--~~~---~--~~ 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 un

Re: List all categories, list all objects within these categories

2006-08-05 Thread Todd O'Bryan
In your view code, include { 'categories':BookCategory.objects.all () } in your context. Then, in the template {% for cat in categories %} {{ cat }} {% for book in cat.book_set.all %} {{ book }} {% endfor %} {% endfor %} This assumes you have the __

Re: get_for_model building bad SQL?

2006-08-05 Thread Jay Klehr
Malcom, sorry about the reply, I use my email client to interact with google group and pressed reply so that it would use the right account to send from (since I'm not subscribed with my default account). Won't happen again now that I know google groups is smarter than I though. ;) I created

indirect ManyToMany relations between models

2006-08-05 Thread dummy
Hi all, I have the following 3 Models: class Company(models.Model): name = models.CharField(maxlength=40) class InfoType(models.Model): type = models.CharField(maxlength=40) class MetaObject(models.Model): company = models.ManyToManyField(Company, null=True, blank=True)

Re: List all categories, list all objects within these categories

2006-08-05 Thread [EMAIL PROTECTED]
Oww... Todd, thank you too! At least both of you came up with an identical solution :) Cello --~--~-~--~~~---~--~~ 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@g

Re: Off Topic: Mac software for database design?

2006-08-05 Thread [EMAIL PROTECTED]
& that should have also said that while MySQL Workbench is flaky ( as you've found out ), I haven't had any problems with MySQL admin. There's also YourSQL which is quite nice (http://yoursql.ludit.it/) --Simon --~--~-~--~~~---~--~~ You received this message bec

Re: Off Topic: Mac software for database design?

2006-08-05 Thread Gennan Chen
I am using Eclipse with PyDev and Quantum. It is a nice IDE. Gen On Aug 5, 2006, at 3:44 PM, [EMAIL PROTECTED] wrote:& that should have also said that while MySQL Workbench is flaky ( asyou've found out ), I haven't had any problems with MySQL admin.There's also YourSQL which is quite nice (http://

Re: Invalid character error using Oracle backed

2006-08-05 Thread Malcolm Tredinnick
On Sat, 2006-08-05 at 08:15 -0700, David wrote: > Django-0.95, with Oracle backend patch (latest: 3496?) applied. > Python 2.4 on Linux > Oracle XE and Oracle 10gR2 > > When I try to run syncdb using the Oracle backend, I reliably get the > following error (last part of traceback only, let me kno

Re: indirect ManyToMany relations between models

2006-08-05 Thread Malcolm Tredinnick
On Sat, 2006-08-05 at 19:37 +0200, [EMAIL PROTECTED] wrote: [...] > I want to select now all objects of InfoType for Company belonging indirectly > together by MetaObject. > > I have implemented this into Company: > > class Company(models.Model): > ... > def infotypes(self): >

Re: Off Topic: Mac software for database design?

2006-08-05 Thread Rob Hudson
Thanks everyone for the replies. I tried CocoaMySQL but will have to try the others. MySQL Workbench looks promising since it can give you a diagram of your schema. I'll have to play with some of the diagraming tools mentioned. Appreciate all the feedback. -Rob --~--~-~--~~-

Re: Invalid character error using Oracle backed

2006-08-05 Thread Michael van der Westhuizen
Hi, On 8/6/06, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > > On Sat, 2006-08-05 at 08:15 -0700, David wrote: [snip] > > File "django/db/backends/oracle/base.py", line 70, in execute > > return Database.Cursor.execute(self, query, params) > > cx_Oracle.DatabaseError: ORA-00911: invalid c

Re: Django model -> DOT converter

2006-08-05 Thread limodou
On 8/5/06, Antonio Cavedoni <[EMAIL PROTECTED]> wrote: > > On 5 Aug 2006, at 3:40, Jeremy Dunck wrote: > > On 8/4/06, Antonio Cavedoni <[EMAIL PROTECTED]> wrote: > >> I have an initial, rather crude implementation of the Django model -> > >> DOT (the Graphviz file format) converter. > > > > Relate