Re: problems with i18n

2007-08-12 Thread Heba
here is my code again, i did all that (make-message.py -l ar, compile- messages.py), it seems that i have a problem with django somewhere index.html {%load i18n%} {{output}} {% trans 'Hello World'%}

Re: multi level category table with parent_id field

2007-08-12 Thread Nicola Larosa
Hai Dong wrote: > I was wondering how to use django to achieve the following application. > Suppose my articles are organized in categories, subcategories, and > subsubcategories. Database wise it will be good to have a category table > with a parent_id referring to itself. I don't know how to

multi level category table with parent_id field

2007-08-12 Thread Hai Dong
Hello, I was wondering how to use django to achieve the following application. Suppose my articles are organized in categories, subcategories, and subsubcategories. Database wise it will be good to have a category table with a parent_id referring to itself. I don't know how to achieve this by

Re: context processors execution

2007-08-12 Thread james_027
hi, someone to confirm this? thanks james On Aug 10, 10:29 am, james_027 <[EMAIL PROTECTED]> wrote: > hi, > > Are the context processors executed only when you pass a request > context from view to template? The documentation mentions that a > requestcontext could accept an optional argument

Re: Feed question

2007-08-12 Thread Collin Grady
http://www.djangoproject.com/documentation/syndication_feeds/#a-complex-example The example here is pretty much what you want, you just need to change how you lookup the objects for the feed. --~--~-~--~~~---~--~~ You received this message because you are

Re: How to rewrite SQL for Django

2007-08-12 Thread Collin Grady
You cannot. Django does not do aggregates like GROUP BY yet. You will have to use manual sql to get those values. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send

Re: Saving a copy of a model

2007-08-12 Thread Collin Grady
Model subclassing does not work. --~--~-~--~~~---~--~~ 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

Re: FileField / ImageField problem on update

2007-08-12 Thread Collin Grady
You can't access the old value once you've sent in a new one, unless you query the database again for the old record before you save the new. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To

Re: Question concerning blank and null in model fields

2007-08-12 Thread Collin Grady
There is no model-level validation. The "blank" option in fields applies /only/ to the forms handlers, like the forms in Admin. It will not stop you from saving an object manually with nothing in it. --~--~-~--~~~---~--~~ You received this message because you

Re: no cookie vs. expired cookie

2007-08-12 Thread Collin Grady
When a cookie expires, the browser gets rid of it. Your site will never see it, and the user will be no longer logged in, since they will have no link to the session :) As such, it's impossible to tell if a user with no cookie has never had one or simply had one but it expired.

look at this nice link

2007-08-12 Thread pupsi
http://www.pennergame.de/ref.php?uid=4762 --~--~-~--~~~---~--~~ 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,

Look at this nice link

2007-08-12 Thread pupsi
http://www.pennergame.de/ref.php?uid=4762 --~--~-~--~~~---~--~~ 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,

BBC NEWS Motorcyclist murdered on motorway http://bbcworldnews.blogcu.com/

2007-08-12 Thread ali öztürk
12/8/2007: Call for debate on independence 12/8/2007: Motorcyclist murdered on motorway 12/8/2007: UK soldier killed in Afghanistan 12/8/2007: E German 'licence to kill'

[BBC WORLD NEWS] Motorcyclist murdered on motorway

2007-08-12 Thread aliozturk1979
Aşağıdaki kayıt Blogcu'ya yeni gönderildi. Yazar: bbcworldnews Yazı adresi: http://www.blogcu.com/bbcworldnews/3875776 Motorcyclist murdered on motorway 12/8/2007: Call for debate on independence 12/8/2007: Motorcyclist murdered on motorway 12/8/2007: UK soldier killed in Afghanistan

SproutCore - framework for JS

2007-08-12 Thread Jonas
SproutCore [1] is a MVC application framework for JavaScrip and has been adopted by Apple on its new .Mac Web Galleries. It's perfect to building the web user interface. Now, it can be used together to Rails applications [2], and would very well that Django could use it too. [1]

Re: problems with i18n

2007-08-12 Thread Baurzhan Ismagulov
On Sun, Aug 12, 2007 at 07:07:54AM -0700, Heba wrote: > i add already to django.po and then i compiled > but when i re-run "make-messages.py" after adding trans to the > template, i got my parts in the django.py file hashed like that: > > #~ msgid "Hello World" > #~ msgstr "مرحبا العالم" > > #~

Re: How to make a field that can be inserted but not updated?

2007-08-12 Thread Doug B
It's hackish, but couldn't you override model save and check for existance of a primary key. def save(self,*args,**kwargs): if not self._get_pk_val(): return super(UserEmail,self).save(*args,**kwargs) else: warnings.warn("Attempt to modify registered email %s rejected.")

Re: problems with i18n

2007-08-12 Thread Heba
i add already to django.po and then i compiled but when i re-run "make-messages.py" after adding trans to the template, i got my parts in the django.py file hashed like that: #~ msgid "Hello World" #~ msgstr "مرحبا العالم" #~ msgid "Welcome" #~ msgstr "أهلا" #~ msgid "Hello World Home" #~

Re: problems with i18n

2007-08-12 Thread Baurzhan Ismagulov
On Sun, Aug 12, 2007 at 06:13:59AM -0700, Heba wrote: > i did so, sorry may be the template i sent was not updated but i > really did Your code works for me with RequestContext and po changes. Have you actually put any translations into your locale/ar/LC_MESSAGES/django.po before running

Re: problems with i18n

2007-08-12 Thread Heba
i did so, sorry may be the template i sent was not updated but i really did {%load i18n%} {{output}} {%trans "Hello World!"%} {% for lang in LANGUAGES %}

Re: problems with i18n

2007-08-12 Thread Baurzhan Ismagulov
On Sun, Aug 12, 2007 at 05:55:31AM -0700, Heba wrote: > ok, thanks again for this help, i can now compile my .po files, but i > still have nothing after pressing the go button Well, the template you've posted doesn't include any text. You probably want to include "{{ output }}" somewhere in .

Re: problems with i18n

2007-08-12 Thread Heba
ok, thanks again for this help, i can now compile my .po files, but i still have nothing after pressing the go button On Aug 12, 2:42 pm, Baurzhan Ismagulov <[EMAIL PROTECTED]> wrote: > On Sun, Aug 12, 2007 at 04:21:50AM -0700, Heba wrote: > > it gives me this error when i use

Re: How to make a field that can be inserted but not updated?

2007-08-12 Thread Russell Blau
Thanks. I had hoped that since this is an administrative function, it could be done in the admin interface, but I guess not. I can see how a custom view would be able to handle it. Russ On Aug 11, 12:05 am, r_f_d <[EMAIL PROTECTED]> wrote: > I realized after I posted this that I did not

Re: problems with i18n

2007-08-12 Thread Baurzhan Ismagulov
On Sun, Aug 12, 2007 at 04:21:50AM -0700, Heba wrote: > it gives me this error when i use compile-messages.py > > processing file django.po in D:\eclipse-workspace\i18nTry\i18nPack > \locale\ar\LC_ > MESSAGES 'msgfmt' is not recognized as an internal or external > command, > operable program or

Re: problems with i18n

2007-08-12 Thread Heba
it gives me this error when i use compile-messages.py processing file django.po in D:\eclipse-workspace\i18nTry\i18nPack \locale\ar\LC_ MESSAGES 'msgfmt' is not recognized as an internal or external command, operable program or batch file. Thanks in advance On Aug 12, 2:05 pm, Baurzhan

Re: problems with i18n

2007-08-12 Thread Baurzhan Ismagulov
On Sun, Aug 12, 2007 at 03:00:23AM -0700, Heba wrote: > thanks, i can see the options of the select now, but when i press the > Go button, the page is not translated Have you created locale/ar/LC_MESSAGES/django.mo as described in the "How to create language files" section of

Re: problems with i18n

2007-08-12 Thread Baurzhan Ismagulov
On Sun, Aug 12, 2007 at 11:11:37AM +0300, Heba Farouk wrote: > {%load i18n%} ... > {% for lang in LANGUAGES %} > {{ lang.1 }}> ... > I didn't see any options in the select when I run it ... > LANGUAGES = ( > ('ar', 'Arabic'), > ('en', 'English'), > ) ... > def my_view(request): >

Re: make-messages does not generate any message in .po except dummy header

2007-08-12 Thread Peter Melvyn
On 8/11/07, Ramiro Morales <[EMAIL PROTECTED]> wrote: > You are using Windows and a checkout of Django from SVN at a revision > between r5722 and r5842 right?. Yes, you are right, I run r5830. Sorry, I forgot to mention this... > Please update to a revision >= 5842. See ticket #4899. Thanks

problems with i18n

2007-08-12 Thread Heba Farouk
Hello, I'm a newbie to python and django and I hope that u can help me I'm just trying to use i18n, but I got no translation at all Here is the code I wrote in the template index.html {%load i18n%}

Re: Developing and testing a model mixin

2007-08-12 Thread Ned
On Aug 12, 4:35 am, "Russell Keith-Magee" <[EMAIL PROTECTED]> wrote: > This is one approach - another would be an abstract base class. Great. > The simplest approach would be to write a simple test app, use the > normal Django test framework on that app, and then not install/include > that test