mirror of
https://github.com/Hopiu/django-rosetta.git
synced 2026-04-30 09:54:42 +00:00
bumbed the requirements to Django 1.2, added a fix to handle the tests under Django 1.2
This commit is contained in:
parent
acbd1ceac0
commit
eca151e974
2 changed files with 19 additions and 1 deletions
|
|
@ -15,6 +15,15 @@ Features
|
|||
* Installed and uninstalled in under a minute
|
||||
* Uses Django's admin interface CSS
|
||||
|
||||
|
||||
************
|
||||
Requirements
|
||||
************
|
||||
|
||||
Rosetta requires Django 1.2 or later.
|
||||
|
||||
Note that Rosetta is known to work with Django 1.1, but it is not supported.
|
||||
|
||||
************
|
||||
Installation
|
||||
************
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@
|
|||
from django.conf import settings
|
||||
from django.contrib.auth.models import User
|
||||
from django.core.urlresolvers import reverse
|
||||
from django.dispatch import receiver
|
||||
from django.template.defaultfilters import floatformat
|
||||
from django.test import TestCase
|
||||
from django.test.client import Client
|
||||
|
|
@ -11,6 +10,16 @@ from rosetta.signals import entry_changed, post_save
|
|||
import os, shutil, django
|
||||
|
||||
|
||||
try:
|
||||
from django.dispatch import receiver
|
||||
except ImportError:
|
||||
# We might be in django < 1.3, so backport this function
|
||||
def receiver(signal, **kwargs):
|
||||
def _decorator(func):
|
||||
signal.connect(func, **kwargs)
|
||||
return func
|
||||
return _decorator
|
||||
|
||||
class RosettaTestCase(TestCase):
|
||||
urls = 'rosetta.tests.urls'
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue