Re: developers needed

2006-01-29 Thread den1jay
Well, Django is a new framework based on python scripting language and it is not as famous as PHP scripting language, Dotnet or framework like rubyonrails. The best option I would reckon is to post your project specs or job advert here on the google group. I have experience developing web apps (f

Re: utf-8 characters in database fileds(names)

2006-01-29 Thread cayco
Thank you! I'll try that although I switched to PostreSQL.

How to make localisation for contrib/comments/templatetags ?

2006-01-29 Thread cayco
Hi! I want to do polish translation for that file. I couldn' t find anything to translate for that file in conf/locale/en/LC_MESSAGES/django.po What is the command to generato .po file for templatetags/*? I tried: /usr/lib/python2.4/site-packages/Django-0.91-py2.4.egg/django $ python bin/make-me

Re: one to many confusion

2006-01-29 Thread Jeremy Jones
Nevermind. Apparently, my reference to a class attribute in my __repr__ was messing stuff up. I guess you can't do that Jeremy Jones wrote: I have the following two classes as part of my overall model: class CustomerOrder(meta.Model): customer = meta.ForeignKey(CustomerAddress)

Re: modifying DEFAULT_RESULTS_PER_PAGE

2006-01-29 Thread Ivan Fedorov
Chris Leonello пишет: Is there anyway to change the MAX_SHOW_ALL_ALLOWED and DEFAULT_RESULTS_PER_PAGE variables short of editing the contrib/admin/views/main.py file? Since these are parameters that directly relate to presentation, it seems that they should be controlled at a module level basis

Re: one to many confusion

2006-01-29 Thread tonemcd
Did you want to do this? class ItemGroup(meta.Model): product_group = meta.ForeignKey(ProductGroup) customer_order = meta.ForeignKey(CustomerOrder) def __repr__(self): return "%s" % self.get_productgroup().name I *think* that should work, if have an example where I'm doing t

Creating a menu structure

2006-01-29 Thread Mookai
Hi, I am trying to create an menu structure that is editable in the admin, but I get stuck on the ordering. There is the option order_with_respect_to that is working really well for items that are edited inline, but I can't get it to work with a structure that is refering to itself. The structur

Re: How to make localisation for contrib/comments/templatetags ?

2006-01-29 Thread Ivan Fedorov
cayco пишет: Hi! I want to do polish translation for that file. I couldn' t find anything to translate for that file in conf/locale/en/LC_MESSAGES/django.po What is the command to generato .po file for templatetags/*? I tried: /usr/lib/python2.4/site-packages/Django-0.91-py2.4.egg/django $ pyt

effbot using django...

2006-01-29 Thread tonemcd
>From http://online.effbot.org/2006_01_01_archive.htm#20060129 > perfectionists with deadlines [#] > > I decided that I should look a bit closer at the Django documentation, to see > if I could figure out > if it really was a good choice to use it as a > front-end for

Re: one to many confusion

2006-01-29 Thread Adrian Holovaty
On 1/29/06, Jeremy Jones <[EMAIL PROTECTED]> wrote: > Nevermind. Apparently, my reference to a class attribute in my __repr__ > was messing stuff up. I guess you can't do that You can definitely reference class attributes in __repr__() -- but you need to use the right API function for relat

Re: effbot using django...

2006-01-29 Thread Adrian Holovaty
On 1/29/06, tonemcd <[EMAIL PROTECTED]> wrote: > >From http://online.effbot.org/2006_01_01_archive.htm#20060129 > > > perfectionists with deadlines [#] > > > > I decided that I should look a bit closer at the Django documentation, to > > see if I could figu

Re: one to many confusion

2006-01-29 Thread Jeremy Jones
Adrian Holovaty wrote: On 1/29/06, Jeremy Jones <[EMAIL PROTECTED]> wrote: Nevermind. Apparently, my reference to a class attribute in my __repr__ was messing stuff up. I guess you can't do that You can definitely reference class attributes in __repr__() -- but you need to use the rig

Re: How to make localisation for contrib/comments/templatetags ?

2006-01-29 Thread cayco
Thanks Ivan! I also had to export PYTHONPATH with my project's root dir to make it work. But in generated django.po there is no translation strings for file: contrib/comments/templatetags/comments.py I noticed that in this file you have long strings and which include lines like: (line 45 for e

seemingly spurious "Unknown table 'store_itemgroups' in order clause" error message in admin

2006-01-29 Thread Jeremy Jones
I have the following class as one of my model classes: class OrderDetail(meta.Model): item_group = meta.OneToOneField(itemgroups.ItemGroup) parents_names = meta.CharField(maxlength=100) birth_date = meta.CharField(maxlength=100) birth_time = meta.CharField(maxlength=100) birt

Re: one to many confusion

2006-01-29 Thread Pasi Savolainen
Adrian Holovaty <[EMAIL PROTECTED]> writes: > On 1/29/06, Jeremy Jones <[EMAIL PROTECTED]> wrote: >> Nevermind. Apparently, my reference to a class attribute in my __repr__ >> was messing stuff up. I guess you can't do that > > You can definitely reference class attributes in __repr__() --

Re: How to make localisation for contrib/comments/templatetags ?

2006-01-29 Thread hugo
>I noticed that in this file you have long strings and which include >lines like: >comment" %}" /> Yeah, there is the problem that the make-messages.py can only pull Python translations from .py files and can only pull translation tags from raw templates, not from constructed templates. The solut

Tutorial -- no attribute error

2006-01-29 Thread kbochert
I'm trying to run through the tutorial and when I get to the step: 'python manage.py sql polls' I get the error AttributeError: 'module' object has no attribute '_MODELS' (management.py line 65) I'm using SQLite. This question has been asked here before without reply. Am I out of luck? Thanks Ka

Re: Tutorial -- no attribute error

2006-01-29 Thread Adrian Holovaty
On 1/29/06, kbochert <[EMAIL PROTECTED]> wrote: > > Yeah -- just found it. Sticky key prevented saving of the polls.py > file > Why do these things always happen when I'm learning something new?? > > On to the next stupidity. No problem at all -- we should improve that error message. Adrian -

Re: one to many confusion

2006-01-29 Thread Adrian Holovaty
On 1/29/06, Pasi Savolainen <[EMAIL PROTECTED]> wrote: > class Foo (meta.Model): > name = meta.CharField (maxlength=100): > def __repr__(self): > return name; > - - > > note missing 'self.' from __repr__. > > The surprising result was that I got a _plaintext_ backtrace, not the

Re: Tutorial -- no attribute error

2006-01-29 Thread Adrian Holovaty
On 1/29/06, kbochert <[EMAIL PROTECTED]> wrote: > I'm trying to run through the tutorial and when I get to the step: > 'python manage.py sql polls' > I get the error > AttributeError: 'module' object has no attribute '_MODELS' > (management.py line 65) > I'm using SQLite. Hi Karl, Chances are yo

Re: Tutorial -- no attribute error

2006-01-29 Thread kbochert
Yeah -- just found it. Sticky key prevented saving of the polls.py file Why do these things always happen when I'm learning something new?? On to the next stupidity. Thanks

Re: developers needed

2006-01-29 Thread Eric Walstad
Hi Nikki, There's also a list of Django developers for hire here: I'd say your best bet for finding Django developers is this list and the django-developers list. Please include me in your list of cadidates. My info is in the DevelopersFo

Re: one to many confusion

2006-01-29 Thread Robert Wittams
Adrian Holovaty wrote: > On 1/29/06, Pasi Savolainen <[EMAIL PROTECTED]> wrote: > >>class Foo (meta.Model): >> name = meta.CharField (maxlength=100): >> def __repr__(self): >> return name; >>- - >> >>note missing 'self.' from __repr__. >> >>The surprising result was that I got a _

FileField :: mx file size

2006-01-29 Thread arthur debert
Hi there In an app we are coding, we are allowing users to upload image files - in django's admin nonetheless. we want to set a max file size (e.g. 400 kb) so we can keep our servers happy (those file will be processed by PIL). The idea is to avoid an uneducated user uploading his 10 mb digital

Re: FileField :: mx file size

2006-01-29 Thread Adrian Holovaty
On 1/29/06, arthur debert <[EMAIL PROTECTED]> wrote: > we want to set a max file size (e.g. 400 kb) so we can keep our > servers happy (those file will be processed by PIL). The idea is to > avoid an uneducated user uploading his 10 mb digital camera files and > giving the server a hard time. > >

Re: glitches in admin interface

2006-01-29 Thread Roberto Aguilar
On 1/21/06, Luke Skibinski Holt <[EMAIL PROTECTED]> wrote: > > It seems my problem with the repeating fields is a known bug with > one-to-one relationships (http://code.djangoproject.com/ticket/1245) I just updated that ticket. I have a hunch that it's a matter of adding a join clause that joins

Using Foreign key attributes in a template

2006-01-29 Thread Roberto Aguilar
I have a Journal model that has a OneToOneField linking to a Blurb model (blurbs have title, text, author, etc.). In a template i do the following to get to the blurb attributes: {{ entry.get_blurb.get_author.username }} {{ entry.get_blurb.title }} {{ entry.get_blurb.text }} etc. is there a way

Re: Using Foreign key attributes in a template

2006-01-29 Thread Adrian Holovaty
On 1/29/06, Roberto Aguilar <[EMAIL PROTECTED]> wrote: > is there a way to say something like: > > {% set blurb entry.get_blurb %} > > and then just use: > > {{ blurb.get_author.username }} > {{ blurb.subject }} > {{ blurb.text }} > > It looks like having to use get_blurb every time is expensive s

Re: image field update impossible.

2006-01-29 Thread [EMAIL PROTECTED]
It doesn't solve the problem, i can't still override the image with a new one, an invalid filename error rise. see there http://img95.imageshack.us/img95/4536/see9za.png.

Re: Using Foreign key attributes in a template

2006-01-29 Thread Roberto Aguilar
On 1/29/06, Adrian Holovaty <[EMAIL PROTECTED]> wrote: > > On 1/29/06, Roberto Aguilar <[EMAIL PROTECTED]> wrote: > > is there a way to say something like: > > > > {% set blurb entry.get_blurb %} > > > > and then just use: > > > > {{ blurb.get_author.username }} > > {{ blurb.subject }} > > {{ blur

Re: image field update impossible.

2006-01-29 Thread Roberto Aguilar
Is it possible to attach a validator to that field and remove the file if it exists? Check out unlink on this page: http://docs.python.org/lib/os-file-dir.html -berto. On 1/29/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > It doesn't solve the problem, i can't still override the image wi

Re: FileField :: mx file size

2006-01-29 Thread tonemcd
I didn't think you could do that - find out the size of an file to upload *before* it's uploaded, and act upon it. I've wanted to do that in CGI, Perl, PHP and Zope, and never figured out how to do it (it would have saved a few embarrasing incidents in the past; the 170 Mbyte powerpoint, the CD!!

Re: FileField :: mx file size

2006-01-29 Thread Adrian Holovaty
On 1/30/06, tonemcd <[EMAIL PROTECTED]> wrote: > I didn't think you could do that - find out the size of an file to > upload *before* it's uploaded, and act upon it. I've wanted to do that > in CGI, Perl, PHP and Zope, and never figured out how to do it (it > would have saved a few embarrasing inc

Re: FileField :: mx file size

2006-01-29 Thread Amit Upadhyay
On 1/30/06, tonemcd <[EMAIL PROTECTED]> wrote: I didn't think you could do that - find out the size of an file toupload *before* it's uploaded, and act upon it. I've wanted to do thatin CGI, Perl, PHP and Zope, and never figured out how to do it (itwould have saved a few embarrasing incidents in th

Re: image field update impossible.

2006-01-29 Thread tonemcd
I guess a validator would sort things out in this situation. However, this is a general problem - uploading files that have the same name (test.doc, figures.xls, etc.) - how do you know that its ok to overwrite the file with the same name? If it's just you uploading files, you're probably ok, but

Re: FileField :: mx file size

2006-01-29 Thread tonemcd
So does this happen *before* the file is uploaded - I mean when the submit button is pressed? It seems that Django will be getting information from the browser about the length of the data to be uploaded - and that's something I've always thought HTTP could not do... If so, this is *very* interes

Re: image field update impossible.

2006-01-29 Thread [EMAIL PROTECTED]
the file i was trying to upload had a different name, or even just dont edit anything and save the page, an error will still raise.

Re: effbot using django...

2006-01-29 Thread tonemcd
and he's looking for some help re: templates > (Update: The sample pages are now generated by a django application, directly > from > moinmoin output) > > (Update: I've fixed sidebar handling in the renderer. if anyone wants to work > on a nice > template/style to replace the current undesign,

Re: image field update impossible.

2006-01-29 Thread tonemcd
Ah I see. Sorry, but I've not used ImageFields yet, so I don't think I can help in that instance... Cheers, Tone