Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to version 0.3.3 from the original repo + a bugfix for issue #74 at Google Code's issue tracker #1

Open
wants to merge 97 commits into
base: master
Choose a base branch
from

Conversation

boris-chervenkov
Copy link

No description provided.

(no author) and others added 30 commits February 17, 2009 20:45
git-svn-id: http://django-modeltranslation.googlecode.com/svn/trunk@15 eb01185e-fd33-11dd-bc25-5f29055a2a2d
…ing #4 (thanks to carl.j.meyer).

git-svn-id: http://django-modeltranslation.googlecode.com/svn/trunk@24 eb01185e-fd33-11dd-bc25-5f29055a2a2d
…to be kept in the project root and this has to be in PYTHONPATH anyway.

git-svn-id: http://django-modeltranslation.googlecode.com/svn/trunk@28 eb01185e-fd33-11dd-bc25-5f29055a2a2d
…lus management commands are used. Resolves issue 16.

git-svn-id: http://django-modeltranslation.googlecode.com/svn/trunk@29 eb01185e-fd33-11dd-bc25-5f29055a2a2d
git-svn-id: http://django-modeltranslation.googlecode.com/svn/trunk@30 eb01185e-fd33-11dd-bc25-5f29055a2a2d
…cStackedInline). Factored out patch_translation_field functionality and import cleanups.

git-svn-id: http://django-modeltranslation.googlecode.com/svn/trunk@31 eb01185e-fd33-11dd-bc25-5f29055a2a2d
…xplicitly. Mostly resolves issue 17.

git-svn-id: http://django-modeltranslation.googlecode.com/svn/trunk@32 eb01185e-fd33-11dd-bc25-5f29055a2a2d
…ration in production by ensuring that models are registered for translation before TranslationAdmin runs. Resolves issue 19 (thanks to carl.j.meyer).

git-svn-id: http://django-modeltranslation.googlecode.com/svn/trunk@36 eb01185e-fd33-11dd-bc25-5f29055a2a2d
git-svn-id: http://django-modeltranslation.googlecode.com/svn/trunk@37 eb01185e-fd33-11dd-bc25-5f29055a2a2d
deschler and others added 26 commits September 29, 2010 10:19
…ery tabs. Resolves issue (thanks to kottenator).

git-svn-id: http://django-modeltranslation.googlecode.com/svn/trunk@101 eb01185e-fd33-11dd-bc25-5f29055a2a2d
…e field (which has been defined with "blank=True") hasn't cleared the default field. Resolves issue 47.

git-svn-id: http://django-modeltranslation.googlecode.com/svn/trunk@103 eb01185e-fd33-11dd-bc25-5f29055a2a2d
…asses" less confusing. Resolves issue 32.

git-svn-id: http://django-modeltranslation.googlecode.com/svn/trunk@104 eb01185e-fd33-11dd-bc25-5f29055a2a2d
…ently fails until the support is fixed in modeltranslation).

git-svn-id: http://django-modeltranslation.googlecode.com/svn/trunk@108 eb01185e-fd33-11dd-bc25-5f29055a2a2d
…d issue 61 (thanks to Chris Adams).

git-svn-id: http://django-modeltranslation.googlecode.com/svn/trunk@122 eb01185e-fd33-11dd-bc25-5f29055a2a2d
This allows use of a version of jQuery other than the one provided by Django.
Users who want to force the use of Django's jQuery can include force_jquery.js
…m original fields

http://code.google.com/p/django-modeltranslation/issues/detail?id=74&sort=-id

Steps to reproduce the problem:
1. Add several char fields to a model with different lengths and mark them for translation
2. Go to the admin, and all field inputs will have the attributes of the last field in the admin - most notably maxlength="..."

The problem is that when you're copying the widget from the original field, "copy.copy" is used.
"copy" does not copy the attrs dictionary, but rather sets a reference to the dict of the original widget.
Since Django admin uses one widget instance for all Charfields, all char fields get the attrs of the last field's widget.

"deepcopy"must be used instead - then everything works correctly.

Patch:

modeltranslation/admin.py - line 44 - TranslationAdminBase.patch_translation_field(...)

44:            field.widget = copy(orig_formfield.widget)

must become

44:            field.widget = deepcopy(orig_formfield.widget)
@acdha
Copy link
Owner

acdha commented May 7, 2012

I'm not a maintainer on the upstream project so I'd prefer to discuss changes over in http://groups.google.com/group/django-modeltranslation and perhaps interest the project owners in switching to Github.

That said, this is a very good simply change but I'd prefer to only pull in 5f9dec4 - normally that should be in a branch independent of other changes but since this is so simple I just cherry-picked it in after doing a git svn rebase against the upstream Google Code project.

@acdha
Copy link
Owner

acdha commented Nov 14, 2012

@boris-chervenkov: I've reset my git-svn fork to follow @deschler's official repository. This will unfortunately completely break your pull request – my apologies for the hassle.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants