Fixed #1594 #1641

Closed
wants to merge 9 commits into
from

Projects

None yet

3 participants

@littlepea

Added get_current_language() method and using it instead of translation.get_language(), also added get_language_code() method to check if language code is in LANGUAGES

Common case is when in settings LANGUAGE_CODE = 'en-us' and in LANGUAGES it's 'en' which causes manage.py cms check to fail.

@ojii
Collaborator
ojii commented Mar 19, 2013

hi Evgeny

Looked through this PR and looks pretty sane, however it needs tests to check that we don't break this in the future.

  • Jonas
@littlepea

Hi,

Ok, I'll work on it. When are you planing to have a release candidate for 2.4?

Just wanna make sure I'll be on time to make it into that release

@ojii
Collaborator
ojii commented Mar 19, 2013

no timeline yet. basically "when it's ready". But I hope it's rather soon.

@digi604
Member
digi604 commented Mar 26, 2013

yep tests are needed. And hurry if you want to make to 2.4 :)

@littlepea

Ok, tests are done, I've also merged this fork with upstream from divio/django-cms.git@develop to make sure all the tests are passing.

I've run all the test including the ones I've just added and everything passes,

I also have a site running on this fork and everything works (and actually didn't work on the upstream because of this bug)

I've tested with test_requirements/django-1.4.txt, django-trunk.txt is actually incorrect, because it downloads 1.6 but expects <1.5

@ojii
Collaborator
ojii commented Mar 27, 2013

test fail on 1.3/2.5

Traceback (most recent call last):
  File "/home/jonas/workspace/django-cms/cms/tests/permmod.py", line 755, in test_switch_moderator_on
    self.assertEqual(page1.get_absolute_url(), page2.get_absolute_url())
AttributeError: 'NoneType' object has no attribute 'get_absolute_url'
@littlepea

Ok, It had something to do with the merge from upstream I did. Maybe I shouldn't have done it. I tried to revert but it didn't help.

So I'm going to delete this fork and pull request and I'm going to fork again, just add my changes and tests. Run tests and make another pull request, so everything will be in one commit.

I'll make sure the tests pass.

@littlepea littlepea closed this Mar 28, 2013
@littlepea littlepea referenced this pull request Mar 28, 2013
Merged

Fixes #1594 #1676

@littlepea

Here's the new pull request: #1676

All tests passed for me locally for both versions of django. Let's see what travis says...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment