Re: django multi application, multi database, need to sync..

2008-01-17 Thread otonk

> Create the sync script using the Python DB API directly (no Django
> ORM). And then trigger it either automatically with the cron job or
> manually, by wrapping that script inside django view. You may want to
> add `modified` DateTimeField to all your Django models and store the
> last sync date/time somewhere. So the sync script should only SELECT
> records from master database where 'modified' is greater than last
> sync date and INSERT/UPDATE it into other database.

cool thanks Ivan..
--~--~-~--~~~---~--~~
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]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



django multi application, multi database, need to sync..

2008-01-16 Thread otonk

hi, i am currently designing two or more django application, one
application act as the master application, contains all the data, the
other application has partial function of the master application. The
master database belongs to the master application, other database has
a partial data from the master database. The reason we have such
design is these application is separated geographically and the
connection may not be always available. The problem with this design
is how to move partial data from master db to other db, the sync
process is triggered by user. I need an way to sync the data. I know
this is doable but I am confused with the implementation. Any solution
is appreciated. Thank you.
--~--~-~--~~~---~--~~
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]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: i18n model field not translated

2007-11-06 Thread otonk

problem solved..

it lies on the django.po

i havent remove the

#, fuzzy

mark.. thats why its not translated

link: 
http://groups.google.com/group/django-users/browse_thread/thread/e8476fa11cefc2b7

Notice that the message in question is marked as "fuzzy". That means
the
translation does not quite match the source string. I cannot read
Chinese well enough to know if the string is at all close, but one
obvious difference is that the source string contains a "%d" format
marker whilst the translation contains a "%s" marker.

By default, fuzzy translations are not included in the output. A
translator has to check each one, verify it is correct (or correct it)
and remove the fuzzy comment. Then the result will be include in the
MO
file.

You may wish to update the file and submit a diff of the changes to
Trac
so that it can be committed.


Thanks for the group..


--~--~-~--~~~---~--~~
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]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: i18n model field not translated

2007-11-05 Thread otonk

its not working...

isnt verbose_name is for meta class?..


--~--~-~--~~~---~--~~
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]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: i18n model field not translated

2007-11-05 Thread otonk

I did..

from django.db import models
from django.utils.translation import ugettext_lazy as _
--- code emmited ---

name= models.CharField(_('name'), help_text=_('This is the
help text'), max_length = 255)

--- code emmited ---

on the above code, the
[ help_text=_('This is the help text') ]
is translated.. however the _('name') is not


--~--~-~--~~~---~--~~
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]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



i18n model field not translated

2007-11-05 Thread otonk

Hi, I am working on a multilingual project, mainly in indonesia and
english.
i tried to do i18n on my model fields but i cant get it work on the
admin site.
the model name is translated, however the fields name is not.

here's my model.py

class Company(models.Model):
name= models.CharField(_('name'), help_text=_('This is the
help text'), max_length = 255)
logo= models.ImageField(_('logo'), upload_to = 'logo/%Y%m%d
%H%M%S')
detail  = models.TextField(_('detail'), blank = True)
letterhead  = models.ImageField(_('letterhead'), upload_to = 'logo/
%Y%m%d%H%M%S', blank = True)

class Admin:
pass
fields = (
(None,{
'fields': ('name','logo','detail')
}),
('Optional', {
'classes' : 'collapse',
'fields'  : ('letterhead',)
}),
)

class Meta:
verbose_name= _('Company')
verbose_name_plural = _('Companies')

def __unicode__(self):
return '%s' % self.name

as you can see the field 'name', the help_text is translated, but the
'name' itself is not translated.
did i do something wrong?


--~--~-~--~~~---~--~~
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]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---