Django Multilingual Model

2011-01-31 Thread Alagu Madhu
Hi

I am looking best model for the following tables:

-
---Table : groups_t
-

CREATE TABLE groups_t
(
  id BIGINT NOT NULL,
  code VARCHAR NOT NULL,
  version BIGINT NOT NULL
);


-
---Table : groups_i18n_t
-


CREATE TABLE groups_i18n_t
(
  group_id BIGINT NOT NULL,
  lang_id BIGINT NOT NULL,
  description TEXT NOT NULL,
  version BIGINT NOT NULL
);



-
---Table : groups_lookup_t
-



CREATE TABLE groups_lookup_t
(
group_id BIGINT NOT NULL,
lang_id BIGINT NOT NULL,
code VARCHAR NOT NULL,
description TEXT NOT NULL,
lookup_text TEXT NOT NULL
);





Thanks

Madhu Alagu

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



Re: Localeurl and django-multilingual

2010-05-10 Thread Alessandro Ronchi
2010/5/10 Nuno Maltez <nuno.li...@gmail.com>

> How are you creating the url for the links? Are you using the {% url
> %} tag and reverse() functions? It should work, we have sites with
> localeurl and django-multilingual running fine in production.
>
>
I solved with your solution. Thanks.



-- 
Alessandro Ronchi

http://www.soasi.com
SOASI - Sviluppo Software e Sistemi Open Source

Hobby & Giochi, l'e-commerce del divertimento
http://hobbygiochi.com
http://www.facebook.com/hobbygiochi

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



Re: Localeurl and django-multilingual

2010-05-10 Thread Nuno Maltez
How are you creating the url for the links? Are you using the {% url
%} tag and reverse() functions? It should work, we have sites with
localeurl and django-multilingual running fine in production.

Nuno

On Sat, May 8, 2010 at 12:34 PM, Alessandro Ronchi
<alessandro.ron...@soasi.com> wrote:
> I need to have links with language code prefix, and different contents.
>
> I've achieved that with both localeurl and django-multilingual, and I can
> get the tranlated version if i choice the correct url:
> for example http://mydomain.com/it/c/auto-intere/1/ and
> http://mydomain.com/pl/c/auto-intere/1/
>
> but if I open http://mydomain.com/pl/c/auto-intere/1/
> all the next link will redirect back to /it/
>
> So, I need to fix the user choice and set it to the user request language.
>
> Is it possible?
> How?
>
> --
> Alessandro Ronchi
>
> http://www.soasi.com
> SOASI - Sviluppo Software e Sistemi Open Source
>
> Hobby & Giochi, l'e-commerce del divertimento
> http://hobbygiochi.com
> http://www.facebook.com/hobbygiochi
>
> --
> 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 more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>

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



Localeurl and django-multilingual

2010-05-08 Thread Alessandro Ronchi
I need to have links with language code prefix, and different contents.

I've achieved that with both localeurl and django-multilingual, and I can
get the tranlated version if i choice the correct url:
for example http://mydomain.com/it/c/auto-intere/1/ and
http://mydomain.com/pl/c/auto-intere/1/

but if I open http://mydomain.com/pl/c/auto-intere/1/
all the next link will redirect back to /it/

So, I need to fix the user choice and set it to the user request language.

Is it possible?
How?

-- 
Alessandro Ronchi

http://www.soasi.com
SOASI - Sviluppo Software e Sistemi Open Source

Hobby & Giochi, l'e-commerce del divertimento
http://hobbygiochi.com
http://www.facebook.com/hobbygiochi

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



Re: ANN: django-multilingual-ng

2010-03-27 Thread ronconi
Hi Jonas!

First of all, thanks for your hard work to make this module available
on Django 1.2. I'm trying to use it, but i've got a problem:

I can use the admin interface to create my flat page in the languages
that I need (brazilian portuguese and english). When I go to the site,
I can see it in the language previously defined. But if I try to
change the language, I receive a CSRF verification failed. Request
aborted.

I'm using Django 1.2 (beta 1) and django-multilingual-ng-0.1.20.

I created a template named languages.html to encapsulate this
function. The actual code is:

{% csrf_token %}



{% for lang in LANGUAGES %}
{{ lang.1 }}
{% endfor %}




It is the default template suggested on the DjangoBook.com, Chapter
19. I just added the csrf_token and the input to show its value.

When the page is shown, the value of CSRF_Value input is NOTPROVIDED.

I'm a newbie on python, so maybe I'm making a mistake and can't find
it. I hope you can help me.

Thanks in advance,
Vinicius Ronconi

On 19 fev, 06:47, Jonas Obrist <ojiido...@gmail.com> wrote:
> Since the official django-multilingual [1] does not support Django 1.2 (and 
> has some other annoying things in my opinion), I decided to create a new 
> project based off django-multilingual which works in 1.2 and has some other 
> improvements. This project is called django-multilingual-ng, it's on the 
> cheeseshop [2] (so you can easy_install/pip install it) and github [3].
>
> Changes from django-multilingual:
>
> - django 1.2 (beta 1) compatible
> - deprecated language_id's in favour of languege_code's to make code easier 
> to write and allow changes to settings.LANGUAGES without corrupting the 
> database
> - admin UI improvements (a tabbed interface for languages instead of showing 
> all languages inline and forcing users to fill all of them in)
> - an easy command to convert django-multilingual apps to 
> django-multilingual-ng (database migration, requires south)
>
> The high level API stays the same, this means you can use the same syntax to 
> make your models multilingual as in django-multilingual. Due to the 
> language_id depreciation some low level APIs have changed. However they 
> should make things easier, not harder.
>
> Currently the two things this project is missing is documentation and more 
> testing. I've tested it in my project and I can't find any issues.
>
> If you have a look at it and maybe even use it, please give me your feedback 
> and especially report any bugs you encounter.
>
> Jonas Obrist
>
> [1]http://code.google.com/p/django-multilingual/
> [2]http://pypi.python.org/pypi/django-multilingual-ng/0.1.0b1
> [3]http://github.com/ojii/django-multilingual-ng

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



ANN: django-multilingual-ng

2010-02-19 Thread Jonas Obrist

Since the official django-multilingual [1] does not support Django 1.2 (and has 
some other annoying things in my opinion), I decided to create a new project 
based off django-multilingual which works in 1.2 and has some other 
improvements. This project is called django-multilingual-ng, it's on the 
cheeseshop [2] (so you can easy_install/pip install it) and github [3].

Changes from django-multilingual:

- django 1.2 (beta 1) compatible
- deprecated language_id's in favour of languege_code's to make code easier to 
write and allow changes to settings.LANGUAGES without corrupting the database
- admin UI improvements (a tabbed interface for languages instead of showing 
all languages inline and forcing users to fill all of them in)
- an easy command to convert django-multilingual apps to django-multilingual-ng 
(database migration, requires south)

The high level API stays the same, this means you can use the same syntax to 
make your models multilingual as in django-multilingual. Due to the language_id 
depreciation some low level APIs have changed. However they should make things 
easier, not harder.

Currently the two things this project is missing is documentation and more 
testing. I've tested it in my project and I can't find any issues.

If you have a look at it and maybe even use it, please give me your feedback 
and especially report any bugs you encounter.

Jonas Obrist

[1] http://code.google.com/p/django-multilingual/
[2] http://pypi.python.org/pypi/django-multilingual-ng/0.1.0b1
[3] http://github.com/ojii/django-multilingual-ng

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



django-multilingual NotImplementedError

2010-02-11 Thread crsantos
Hi:

Anyone having troubles with latest version of django-multilingual?

I just added a translation class to my model as this:

class Post(models.Model):

class Translation (multilingual.Translation):
title = models.CharField(max_length=200)
body = models.TextField()

author = models.ForeignKey(User)
slug = models.SlugField(max_length=100, blank=True, unique=True)
created = models.DateTimeField(auto_now=True)

When I save the Post in the admin panel, it raises a
"NotImplementedError" on multilingual/query.py in values, line 583.

In this lines lays a function:

def values(self, *fields):
raise NotImplementedError

I understand what this means... but I don't know what code misses
there.

Anyone having success with previous versions?

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



django-multilingual issues

2009-03-05 Thread phred78

Hi,

I'm using django-multilingual to get some models translated, but I
found two errors.

class Translation(multilingual.Translation):
title = models.CharField(max_length=120, blank=True)
introduction = models.TextField(blank=True)
body = models.TextField(blank=True)
slug = models.SlugField(blank=True)

On my admin.py file, I put it like this:

class NewsItemAdmin(multilingual.ModelAdmin):
prepopulated_fields = {"slug": ("title",)}
list_display = ('title',)
search_fields = ('title',)

The problem is that it won't prepopulate the different slug fields. If
you think about a news item, it will have different titles per
language and so the slug should be different as well. Has anyone come
across this and is it possible to work around it?

Another thing that is not working is markdown. In my save def I put
the same columns as the ones in the Translation class but it won't
work. I thought it would just easily create several body_XX and
body_html_XX, where XX is the language code, but it won't. I keep
getting a module error.

Thank you,

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



Re: Having trouble with django-multilingual

2008-11-06 Thread Alex Koshelev
Django-multilingual has its own discussion group:
http://groups.google.com/group/django-multilingual.

Try to ask there.


On Thu, Nov 6, 2008 at 18:44, Brandon Taylor <[EMAIL PROTECTED]>wrote:

>
> Hi Everyone,
>
> I'm having a hard time getting django-multilingual to work the way I
> expect.
>
> #settings.py
>
> LANGUAGES = (
>('en', 'English'),
>('es', 'Spanish'),
> )
>
> TEMPLATE_CONTEXT_PROCESSORS = (
>...
>'multilingual.context_processors.multilingual',
> )
>
> MIDDLEWARE_CLASSES = (
>..
>'multilingual.middleware.DefaultLanguageMiddleware',
> )
>
> #models.py
>
> from django.db import models
> from django.contrib import admin
> import multilingual
>
>
> class Widget(models.Model):
>name = models.CharField(max_length=50)
>
>class Translation(multilingual.Translation):
>name = models.CharField(max_length=50)
>
>class Meta:
>verbose_name = _('Widget')
>verbose_name_plural = _('Widgets')
>
>def __unicode__(self):
>return self.name
>
> #index.html
>
> {% for widget in widgets %}
> 
>{{ widget.name }}
> 
> {% endfor %}
>
>
> When I switch my locale in FireFox, widget.name is always English.
> What am I doing wrong? I'm trying to follow the documentation as
> closely as possible, but obviously I'm missing something.
>
> Advice appreciated,
> Brandon
> >
>

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Having trouble with django-multilingual

2008-11-06 Thread Brandon Taylor

Hi Everyone,

I'm having a hard time getting django-multilingual to work the way I
expect.

#settings.py

LANGUAGES = (
('en', 'English'),
('es', 'Spanish'),
)

TEMPLATE_CONTEXT_PROCESSORS = (
...
'multilingual.context_processors.multilingual',
)

MIDDLEWARE_CLASSES = (
..
'multilingual.middleware.DefaultLanguageMiddleware',
)

#models.py

from django.db import models
from django.contrib import admin
import multilingual


class Widget(models.Model):
name = models.CharField(max_length=50)

class Translation(multilingual.Translation):
name = models.CharField(max_length=50)

class Meta:
verbose_name = _('Widget')
verbose_name_plural = _('Widgets')

def __unicode__(self):
return self.name

#index.html

{% for widget in widgets %}

{{ widget.name }}

{% endfor %}


When I switch my locale in FireFox, widget.name is always English.
What am I doing wrong? I'm trying to follow the documentation as
closely as possible, but obviously I'm missing something.

Advice appreciated,
Brandon
--~--~-~--~~~---~--~~
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: Django multilingual

2008-01-28 Thread code_berzerker


Theres earlier similar discussion.
http://groups.google.com/group/django-users/browse_frm/thread/d6e7eab4cc81c7b8
For unlimited landuage support check my post at this thread.
--~--~-~--~~~---~--~~
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: Django multilingual

2008-01-28 Thread Horst Gutmann

2008/1/28 Ivan Illarionov <[EMAIL PROTECTED]>:
> Models that need flexibility have `lang` and `is_translation_of`
> fields. Views (or custom managers) filter the output based on `lang`
> and add the link to other language if translation exists. Some models
> just have two separate text fields for each language and views (or
> custom managers) display the text from either one or another. Some
> content appears only in one language and is hardcoded into views/
> templates. My multilingual projects deal only with two languages:
> Russian and English - and don't have the goal to support more. I try
> to customize each language version of the site to reflect both
> cultural and local/international differences - any automagic solution
> will fail to do that.

Same here. I'm currently working on a German/English-site and also
just have for each field that's supposed to be multilingual actually 2
fields and an additional property for convenience:

class Document(models.Model):
title_de = models.CharField(...)
title_en = models.CharField(...)
...
title = property(_get_title_for_current_language)

- Horst

--~--~-~--~~~---~--~~
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: Django multilingual

2008-01-27 Thread Ivan Illarionov

Models that need flexibility have `lang` and `is_translation_of`
fields. Views (or custom managers) filter the output based on `lang`
and add the link to other language if translation exists. Some models
just have two separate text fields for each language and views (or
custom managers) display the text from either one or another. Some
content appears only in one language and is hardcoded into views/
templates. My multilingual projects deal only with two languages:
Russian and English - and don't have the goal to support more. I try
to customize each language version of the site to reflect both
cultural and local/international differences - any automagic solution
will fail to do that.

On 27 янв, 15:28, maco <[EMAIL PROTECTED]> wrote:
> Can you share the logic behind the models and views you use. Don't
> need to go into details, just the philosophy behind it, 
> eg.http://orestis.gr/en/blog/2007/05/14/international-part3/
--~--~-~--~~~---~--~~
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: Django multilingual

2008-01-27 Thread maco

Can you share the logic behind the models and views you use. Don't
need to go into details, just the philosophy behind it, eg.
http://orestis.gr/en/blog/2007/05/14/international-part3/

cheers

On Jan 26, 5:36 pm, Ivan Illarionov <[EMAIL PROTECTED]> wrote:
> Piotr, having django-multilingual features in the core won't make them
> any better. Complex models and use-cases will still need custom/manual
> solutions. It will add unneeded overhead to single-language sites and
> may even break the sites that use explicit custom solutions (like
> mine).
>
> I am developing several 2 language projects with Django and I don't
> use django-multilingual - I do all multilingual tasks manually - and
> some code is hardcoded/optimized for my Russian/English needs - no
> general-purpose solution will ever help.
--~--~-~--~~~---~--~~
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: Django multilingual

2008-01-26 Thread Ivan Illarionov

Piotr, having django-multilingual features in the core won't make them
any better. Complex models and use-cases will still need custom/manual
solutions. It will add unneeded overhead to single-language sites and
may even break the sites that use explicit custom solutions (like
mine).

I am developing several 2 language projects with Django and I don't
use django-multilingual - I do all multilingual tasks manually - and
some code is hardcoded/optimized for my Russian/English needs - no
general-purpose solution will ever help.
--~--~-~--~~~---~--~~
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: Django multilingual

2008-01-26 Thread Piotr Majewski

I see your point, but i just wanted to post my idea for future
features of Djangos ORM. I hope that developers will consider this
usefull and important functionality.

On 26 Sty, 04:23, "Russell Keith-Magee" <[EMAIL PROTECTED]>
wrote:
> On Jan 26, 2008 6:03 AM, Piotr Majewski <[EMAIL PROTECTED]> wrote:
>
>
>
> > I would love to have the (native) feature that django-multilingual
> > gives. For me an many developers i know this is vital. Is it any way
> > that django 1.0 will support multilingual models (content) ?
>
> Hi Piotr,
>
> Unlikely. The current development focus is to get a v1.0 out the door;
> primarily this means completing the newforms changeover (including
> newforms-admin), finishing the queryset refactor, and a handful of
> other small bugs and features.
>
> If we extend this list to include every feature that each user thinks
> is essential, we will never get v1.0 out the door. For me (and many
> people I know), aggregate columns are a must-have feature;
> multi-lingual features are less important. Everyone has different
> priorities, and we can't satisfy everyone at once.
>
> I should also point out that being in the core doesn't grant code
> special magic powers. I haven't looked at django-multilingual myself,
> but if it works now, it won't work any better by virtue of being part
> of the Django core. If anything, being an external project is a
> benefit, as those developers with a particular interest in
> multilingual features don't need to have access to the Django core
> repository in order to contribute directly to the multilingual
> project.
>
> Yours,
> Russ Magee %-)
--~--~-~--~~~---~--~~
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: Django multilingual

2008-01-25 Thread Russell Keith-Magee

On Jan 26, 2008 6:03 AM, Piotr Majewski <[EMAIL PROTECTED]> wrote:
>
> I would love to have the (native) feature that django-multilingual
> gives. For me an many developers i know this is vital. Is it any way
> that django 1.0 will support multilingual models (content) ?

Hi Piotr,

Unlikely. The current development focus is to get a v1.0 out the door;
primarily this means completing the newforms changeover (including
newforms-admin), finishing the queryset refactor, and a handful of
other small bugs and features.

If we extend this list to include every feature that each user thinks
is essential, we will never get v1.0 out the door. For me (and many
people I know), aggregate columns are a must-have feature;
multi-lingual features are less important. Everyone has different
priorities, and we can't satisfy everyone at once.

I should also point out that being in the core doesn't grant code
special magic powers. I haven't looked at django-multilingual myself,
but if it works now, it won't work any better by virtue of being part
of the Django core. If anything, being an external project is a
benefit, as those developers with a particular interest in
multilingual features don't need to have access to the Django core
repository in order to contribute directly to the multilingual
project.

Yours,
Russ Magee %-)

--~--~-~--~~~---~--~~
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 multilingual

2008-01-25 Thread Piotr Majewski

I would love to have the (native) feature that django-multilingual
gives. For me an many developers i know this is vital. Is it any way
that django 1.0 will support multilingual models (content) ?
--~--~-~--~~~---~--~~
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: Django-multilingual

2007-11-20 Thread Marcin Kaszynski



On Nov 20, 2:23 am, Kenneth Gonsalves <[EMAIL PROTECTED]> wrote:
> from the 'introduction' page, the links to the 'installation' and
> 'usage' pages are broken

Fixed, thanks!

-mk

--~--~-~--~~~---~--~~
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: Django-multilingual

2007-11-19 Thread Kenneth Gonsalves


On 20-Nov-07, at 3:03 AM, Marcin Kaszynski wrote:

> this is just a quick note that after a couple of months of hiatus the
> Django-Multilingual library went from 'unmaintained' to 'maintained as
> time permits', which will hopefully be okay for most uses.

from the 'introduction' page, the links to the 'installation' and  
'usage' pages are broken

-- 

regards
kg
http://lawgon.livejournal.com
http://nrcfosshelpline.in/web/



--~--~-~--~~~---~--~~
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-multilingual

2007-11-19 Thread Marcin Kaszynski

Hi,

this is just a quick note that after a couple of months of hiatus the
Django-Multilingual library went from 'unmaintained' to 'maintained as
time permits', which will hopefully be okay for most uses.

I received several offers of help, which is incredibly cool and
already resulted in much better documentation (thanks, Dan) and
support for current Django trunk (thank you, Matthias).  There is
still a lot to be done, but the library is usable with Django trunk
again and keeps getting better.  From now on I want to make sure that
Multilingual supports at least two versions of Django: trunk and the
last stable version (currently 0.96[.1]).

I do have a favor to ask of you: if you tried to use the library and
ran into problems that are not already solved or present on the
project page[1], please add it to the list or at least send me an
email.  And of course, if you tried to use it and are happy with the
results, do not hesitate to let us know either :)

Thanks,
-mk

[1]: http://code.google.com/p/django-multilingual/issues/list

--~--~-~--~~~---~--~~
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: Django-multilingual

2007-11-09 Thread Matthias Urlichs

I've been hacking on django-multilingual a bit in the last few days.

Fixes, so far:
* import it into git (OK, that's not a fix per se, but how would I
work on it otherwise?)
* language codes in the database instead of in settings.py. Yay!
* allow "unique" constraints in translated fields (they need to be per-
language, dammit)
* make it work with newer Django, including the order_by_related patch
(Django issue 2076)
* VERY rudimentary Debian packaging

Availability:
http://netz.smurf.noris.de/cgi/gitweb?p=django-multilingual.git (web
frontend)
http://netz.smurf.noris.de/git/django-multilingual.git/ (pull via "git
clone")
NB: You want the "base" branch; "origin" is Upstream, and "master"
some local changes.


--~--~-~--~~~---~--~~
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: Django-multilingual

2007-10-07 Thread Alex Koshelev

I've use django-multilingual in many projects and happy. It's simple
to integrate and use. No other implementations can do it so
transparent for developer and end user( django-multilingual extends
admin edit page and allows edit entry in all languages very simple).
Use it!

Chris Hoeppner:
> Hi there!
>
> I wonder if someone has been using django-multilingual. I'd like to
> "push it into" a live database, and am wondering what kind of
> alterations to the schema this might involve. Would it be easier to just
> add _lang columns for all the fields I'd like to translate, and
> conditionally outputting based on the LANGUAGE context var? It seems
> cleaner and more flexible the way django-multilingual goes, but the
> alterations are frightening me a bit.
>
> ~Chris


--~--~-~--~~~---~--~~
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-multilingual

2007-10-07 Thread Chris Hoeppner

Hi there!

I wonder if someone has been using django-multilingual. I'd like to
"push it into" a live database, and am wondering what kind of
alterations to the schema this might involve. Would it be easier to just
add _lang columns for all the fields I'd like to translate, and
conditionally outputting based on the LANGUAGE context var? It seems
cleaner and more flexible the way django-multilingual goes, but the
alterations are frightening me a bit.

~Chris


--~--~-~--~~~---~--~~
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: Django-multilingual newforms-admin branche?

2007-06-03 Thread [EMAIL PROTECTED]

Hi,

On Jun 1, 11:05 am, Glin <[EMAIL PROTECTED]> wrote:
> Hi, I wonder if there is branch of django-multilingualfor newforms-
> admin?

Nope, there is no such branch yet, but I would be more than happy to
see someone helping out with this.  It would be even better if it was
possible to detect and support both old- and newforms-admin; I did not
have the time to look into the Django branch yet, so I don't know how
much problems that would cause.

There are some changes to D-M that depend on having a better admin
interface to translations -- current implementation is a hack based on
edit_inline and makes some things difficult.

-mk


--~--~-~--~~~---~--~~
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: Django-multilingual newforms-admin branche?

2007-06-01 Thread Russell Keith-Magee

On 6/1/07, Glin <[EMAIL PROTECTED]> wrote:
>
> Hi, I wonder if there is branch of django-multilingual for newforms-
> admin?
>
> I suppose that newforms admin will be merged with trunk in one or two
> releases and lot of people already works with newforms admin, so it
> would be great to have the posibility to work with multilingual models
> in newfomrs-admin, too.

It will be merged much sooner than "one or two releases" time. It is
one of the major prerequisites for the 0.97 release.

Unless I am mistaken, newforms-admin is reasonably close to getting
merged back to trunk. There are still one or two outstanding features
to sort out, but the timeline for the merge is "in the near future",
not "at some point in the future".

Yours,
Russ Magee %-)

--~--~-~--~~~---~--~~
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-multilingual newforms-admin branche?

2007-06-01 Thread Glin

Hi, I wonder if there is branch of django-multilingual for newforms-
admin?

I suppose that newforms admin will be merged with trunk in one or two
releases and lot of people already works with newforms admin, so it
would be great to have the posibility to work with multilingual models
in newfomrs-admin, too.


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Another suggestion for django-multilingual

2007-05-28 Thread Eugene Morozov

Hello,
I found another deficiency in django-multilingual. I'm sure that on
many sites, including the one I'm developing now, there would be one
primary language for content and translations will appear slowly after
the content in the primary language is published. I want to display
content in primary language if there's no translation for currently
selected language. Unfortunately, there's no such a feature in django-
multilingual and implementing it would require learning django ORM
internals.
Eugene


--~--~-~--~~~---~--~~
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: Another problem with django-multilingual

2007-05-22 Thread Eugene Morozov

Hello,
Thank you for fixing the bug so quickly. But if you'll add
'i18n.multilingual' to the list of installed apps in the settings.py
in the example I've attached to #22, then "manage.py runserver" or
"manage.py syncdb" commands stop working with exception
"AttributeError: 'module' object has no attribute 'multilingual'"
Eugene

On 23 май, 00:06, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
> Hi Eugene,
>
> On May 22, 5:44 pm, Eugene Morozov <[EMAIL PROTECTED]> wrote:
>
> > I'm trying to use django-multilingual for multilingual site, instead
> > of reinventing the wheel. But in admin interface I get:
> > "Something's wrong with your database installation. Make sure the
> > appropriate database tables have been created, and make sure the
> > database is readable by the appropriate user." for every translatable
> > model.
>
> A knee-jerk question here is: did you remember to run syncdb after
> creating the translatable models?  If you did, try again and make sure
> there were no validation errors.
>
> > slug = models.SlugField(prepopulate_from=("name",))
>
> The prepopulate_from parameter contains a nonexistant field name (you
> probably wanted to use "title" instead), but apparently Django does
> not validate it.  I just pasted your Entry model into one of apps in
> my testproject, added missing models (Author, Blog and Picture) and it
> simply worked for me.
>
> If syncdb does not help, then please try to create a minimal test app
> for the problem and post it to django-multilingual bug tracker (http://
> code.google.com/p/django-multilingual/).
>
> -mk


--~--~-~--~~~---~--~~
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: Another problem with django-multilingual

2007-05-22 Thread [EMAIL PROTECTED]

Due to some weirdness on google groups I did not see your second
message when replying to the first one.  The SQL you posted was enough
to solve the problem.

On May 22, 9:28 pm, Eugene Morozov <[EMAIL PROTECTED]> wrote:
> In addition to this issue, I'm getting SQL errors on attempts to 
> savemultilingualobjects, because of such invalid constructs:

It is the same issue: django-multilingual constructs incorrect table
names for language codes that contain a dash.

I just committed a fix for that.

> Aliases must be quoted by django, but they aren't. I've tried to find
> what causes this quoting error but gave up after two hours... Need to
> get some sleep.

They are not because this part of SQL is generated by D-M, not Django
core, in multilingual/query.py.  I should probably fix it soon.

Thanks for trying out D-M and submitting the bug report,
-mk


--~--~-~--~~~---~--~~
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: Another problem with django-multilingual

2007-05-22 Thread [EMAIL PROTECTED]

Hi Eugene,

On May 22, 5:44 pm, Eugene Morozov <[EMAIL PROTECTED]> wrote:
> I'm trying to use django-multilingual for multilingual site, instead
> of reinventing the wheel. But in admin interface I get:
> "Something's wrong with your database installation. Make sure the
> appropriate database tables have been created, and make sure the
> database is readable by the appropriate user." for every translatable
> model.

A knee-jerk question here is: did you remember to run syncdb after
creating the translatable models?  If you did, try again and make sure
there were no validation errors.

> slug = models.SlugField(prepopulate_from=("name",))

The prepopulate_from parameter contains a nonexistant field name (you
probably wanted to use "title" instead), but apparently Django does
not validate it.  I just pasted your Entry model into one of apps in
my testproject, added missing models (Author, Blog and Picture) and it
simply worked for me.

If syncdb does not help, then please try to create a minimal test app
for the problem and post it to django-multilingual bug tracker (http://
code.google.com/p/django-multilingual/).

-mk


--~--~-~--~~~---~--~~
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: Another problem with django-multilingual

2007-05-22 Thread Eugene Morozov

In addition to this issue, I'm getting SQL errors on attempts to save
multilingual objects, because of such invalid constructs:
  LEFT JOIN blog_blogtranslation AS blog_blogtranslation_zh-cn ON
((blog_blogtranslation_zh-cn.master_id = blog_blog.id) AND
(blog_blogtranslation_zh-cn.language_id = 38))

Aliases must be quoted by django, but they aren't. I've tried to find
what causes this quoting error but gave up after two hours... Need to
get some sleep.

Did anyone attempted to use django-multilingual?
Eugene


On 22 май, 19:44, Eugene Morozov <[EMAIL PROTECTED]> wrote:
> Hello,
> I'm trying to use django-multilingual for multilingual site, instead
> of reinventing the wheel. But in admin interface I get:
> "Something's wrong with your database installation. Make sure the
> appropriate database tables have been created, and make sure the
> database is readable by the appropriate user." for every translatable
> model. For example, I have a model for blog entry:
>
> class Entry(models.Model):
> author = models.ForeignKey(Author, related_name="entries")
> blog = models.ForeignKey(Blog, related_name="entries")
> pictures = models.ManyToManyField(Picture, blank=True,
>   related_name="entries")
> comments_allowed = models.BooleanField(_("Comments allowed"))
> posted = models.DateTimeField(_("Date posted"), auto_now_add=True)
>
> class Translation(multilingual.Translation):
> title = models.CharField(_("Title"), maxlength=250,
>  help_text=_("Title of the entry"))
> slug = models.SlugField(prepopulate_from=("name",))
> body = models.TextField(_("Body"))
>
> As you see, it has both translatable and non-translatable fields. I'm
> running Django-0.96 on python2.5. I use psycopg2 db adapter.
> Eugene


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Another problem with django-multilingual

2007-05-22 Thread Eugene Morozov

Hello,
I'm trying to use django-multilingual for multilingual site, instead
of reinventing the wheel. But in admin interface I get:
"Something's wrong with your database installation. Make sure the
appropriate database tables have been created, and make sure the
database is readable by the appropriate user." for every translatable
model. For example, I have a model for blog entry:

class Entry(models.Model):
author = models.ForeignKey(Author, related_name="entries")
blog = models.ForeignKey(Blog, related_name="entries")
pictures = models.ManyToManyField(Picture, blank=True,
  related_name="entries")
comments_allowed = models.BooleanField(_("Comments allowed"))
posted = models.DateTimeField(_("Date posted"), auto_now_add=True)

class Translation(multilingual.Translation):
title = models.CharField(_("Title"), maxlength=250,
 help_text=_("Title of the entry"))
slug = models.SlugField(prepopulate_from=("name",))
body = models.TextField(_("Body"))

As you see, it has both translatable and non-translatable fields. I'm
running Django-0.96 on python2.5. I use psycopg2 db adapter.
Eugene


--~--~-~--~~~---~--~~
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: Problem with django-multilingual and admin interface

2007-05-13 Thread [EMAIL PROTECTED]

Hi Jan,

On May 13, 9:38 pm, Jan Söderback <[EMAIL PROTECTED]> wrote:
> Any ideas about what might be missing?

it is a bug in Django admin interface -- the edit view assumes that
the model has at least one editable field.  You can either use Jure's
workaround or patch your copy of Django.  See this ticket for details
and a patch:

http://code.djangoproject.com/ticket/3434

Regards,
-mk


--~--~-~--~~~---~--~~
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: Problem with django-multilingual and admin interface

2007-05-13 Thread Jan Söderback

On May 13, 10:57 pm, "Jure Čuhalev" <[EMAIL PROTECTED]> wrote:
> I was hit by the same problem. If you add a property to your class
> Play (not to the Translation one) then Translation will be able to
> bound to something visible in Admin and it will work.

That worked. Thank you very much!


--~--~-~--~~~---~--~~
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: Problem with django-multilingual and admin interface

2007-05-13 Thread Jure Čuhalev

Hi,

I was hit by the same problem. If you add a property to your class
Play (not to the Translation one) then Translation will be able to
bound to something visible in Admin and it will work.

It's more of a workaround then real solution, but if you are in a
hurry it could be useful.

regards,
Jure Cuhalev


On 5/13/07, Jan Söderback <[EMAIL PROTECTED]> wrote:
>
> Hello,
>
> I'm trying to use Marcin Kaszynski's django-multilingual plugin, but
> when I try to use the add action in the admin interface for a
> translatable class, I get an exception:
>
> -
> Traceback (most recent call last):
> File "/usr/lib/python2.5/site-packages/django/core/handlers/base.py"
> in get_response
>   77. response = callback(request, *callback_args, **callback_kwargs)
> File "/usr/lib/python2.5/site-packages/django/contrib/admin/views/
> decorators.py" in _checklogin
>   55. return view_func(request, *args, **kwargs)
> File "/usr/lib/python2.5/site-packages/django/views/decorators/
> cache.py" in _wrapped_view_func
>   39. response = view_func(request, *args, **kwargs)
> File "/usr/lib/python2.5/site-packages/django/contrib/admin/views/
> main.py" in add_stage
>   298. return render_change_form(model, manipulator, c, add=True)
> File "/usr/lib/python2.5/site-packages/django/contrib/admin/views/
> main.py" in render_change_form
>   196. first_form_field_id =
> bound_field_sets[0].bound_field_lines[0].bound_fields[0].form_fields[0].get_id();
>
>   IndexError at /nplay/admin/reservation/play/add/
>   list index out of range
> -
>
> It seems like bound_field_sets is empty at line 196
>
> Here's my model:
> -
> import multilingual
>
> class Play(models.Model):
> class Translation(multilingual.Translation):
> name = models.CharField(maxlength=100)
> description = models.TextField()
> short_description = models.CharField(maxlength=200)
> class
> Admin:
>
> pass
> -
>
> I'm using the svn trunk of django and django-multilingual, running on
> Python 2.5 (Ubuntu 7.04)
>
> Any ideas about what might be missing?
>
>
> >
>

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Problem with django-multilingual and admin interface

2007-05-13 Thread Jan Söderback

Hello,

I'm trying to use Marcin Kaszynski's django-multilingual plugin, but
when I try to use the add action in the admin interface for a
translatable class, I get an exception:

-
Traceback (most recent call last):
File "/usr/lib/python2.5/site-packages/django/core/handlers/base.py"
in get_response
  77. response = callback(request, *callback_args, **callback_kwargs)
File "/usr/lib/python2.5/site-packages/django/contrib/admin/views/
decorators.py" in _checklogin
  55. return view_func(request, *args, **kwargs)
File "/usr/lib/python2.5/site-packages/django/views/decorators/
cache.py" in _wrapped_view_func
  39. response = view_func(request, *args, **kwargs)
File "/usr/lib/python2.5/site-packages/django/contrib/admin/views/
main.py" in add_stage
  298. return render_change_form(model, manipulator, c, add=True)
File "/usr/lib/python2.5/site-packages/django/contrib/admin/views/
main.py" in render_change_form
  196. first_form_field_id =
bound_field_sets[0].bound_field_lines[0].bound_fields[0].form_fields[0].get_id();

  IndexError at /nplay/admin/reservation/play/add/
  list index out of range
-

It seems like bound_field_sets is empty at line 196

Here's my model:
-
import multilingual

class Play(models.Model):
class Translation(multilingual.Translation):
name = models.CharField(maxlength=100)
description = models.TextField()
short_description = models.CharField(maxlength=200)
class
Admin:
 
pass
---------

I'm using the svn trunk of django and django-multilingual, running on
Python 2.5 (Ubuntu 7.04)

Any ideas about what might be missing?


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---