Permalink
Browse files

Merged hvad-nani refactor with master

  • Loading branch information...
KristianOellegaard committed May 4, 2012
1 parent 7cfb07c commit 6d920089358cf8a2d28764e80c877fe333e81272
Showing with 3,319 additions and 2,966 deletions.
  1. +8 −9 README.rst
  2. +2 −0 hvad/__init__.py
  3. +563 −0 hvad/admin.py
  4. 0 hvad/compat/__init__.py
  5. +71 −0 hvad/compat/date.py
  6. +58 −0 hvad/descriptors.py
  7. +3 −0 hvad/exceptions.py
  8. +109 −0 hvad/fieldtranslator.py
  9. +278 −0 hvad/forms.py
  10. +805 −0 hvad/manager.py
  11. +305 −0 hvad/models.py
  12. +43 −0 hvad/templates/admin/hvad/change_form.html
  13. +16 −0 hvad/templates/admin/hvad/deletion_not_allowed.html
  14. +83 −0 hvad/templates/admin/hvad/edit_inline/stacked.html
  15. +130 −0 hvad/templates/admin/hvad/edit_inline/tabular.html
  16. +11 −0 hvad/templates/admin/hvad/includes/translation_tabs.html
  17. 0 hvad/test_utils/__init__.py
  18. +141 −0 hvad/test_utils/context_managers.py
  19. +44 −0 hvad/test_utils/data.py
  20. +85 −0 hvad/test_utils/fixtures.py
  21. +173 −0 hvad/test_utils/request_factory.py
  22. +91 −0 hvad/test_utils/testcase.py
  23. +21 −0 hvad/tests/__init__.py
  24. +9 −9 {nani → hvad}/tests/admin.py
  25. +6 −6 {nani → hvad}/tests/basic.py
  26. +3 −3 {nani → hvad}/tests/dates.py
  27. 0 {nani → hvad}/tests/docs.py
  28. +3 −3 {nani → hvad}/tests/fallbacks.py
  29. +2 −2 {nani → hvad}/tests/fieldtranslator.py
  30. +3 −3 {nani → hvad}/tests/forms.py
  31. +6 −6 {nani → hvad}/tests/forms_inline.py
  32. +2 −2 {nani → hvad}/tests/limit_choices_to.py
  33. +2 −2 {nani → hvad}/tests/ordering.py
  34. +4 −4 {nani → hvad}/tests/query.py
  35. +6 −6 {nani → hvad}/tests/related.py
  36. +2 −2 {nani → hvad}/tests/serialization.py
  37. +4 −4 {nani → hvad}/tests/views.py
  38. +80 −0 hvad/utils.py
  39. +83 −0 hvad/views.py
  40. +3 −1 nani/__init__.py
  41. +3 −561 nani/admin.py
  42. +4 −0 nani/compat/__init__.py
  43. +3 −70 nani/compat/date.py
  44. +3 −57 nani/descriptors.py
  45. +3 −2 nani/exceptions.py
  46. +3 −108 nani/fieldtranslator.py
  47. +3 −277 nani/forms.py
  48. +3 −804 nani/manager.py
  49. +3 −304 nani/models.py
  50. +4 −0 nani/test_utils/__init__.py
  51. +3 −140 nani/test_utils/context_managers.py
  52. +3 −43 nani/test_utils/data.py
  53. +3 −84 nani/test_utils/fixtures.py
  54. +3 −172 nani/test_utils/request_factory.py
  55. +3 −90 nani/test_utils/testcase.py
  56. +0 −21 nani/tests/__init__.py
  57. +3 −79 nani/utils.py
  58. +3 −84 nani/views.py
  59. +3 −3 runtests.sh
  60. +1 −1 testproject/alternate_models_app/models/normal.py
  61. +1 −1 testproject/app/admin.py
  62. +1 −1 testproject/app/models.py
  63. +1 −1 testproject/app/views.py
  64. +1 −1 testproject/settings.py
View
@@ -7,7 +7,9 @@ Django.
Documentation for django-hvad can be found at http://django-hvad.readthedocs.org/.
-This project provides the same functionality as django-nani, but it as opposed to django-nani, this project does not affect the default queries, which means that everything will continue to work as it was before.
+This project provides the same functionality as django-nani, but it as opposed
+to django-nani, this project does not affect the default queries, which means
+that everything will continue to work as it was before.
You have to activate the translated fields, by calling a specific method on the manager.
@@ -24,11 +26,13 @@ Example
Normal.objects.all()
-Returns all objects, but without any translated fields attached - this query is just the default django queryset and can therefore be used as usual.
+Returns all objects, but without any translated fields attached - this query is
+just the default django queryset and can therefore be used as usual.
Normal.objects.language().all()
-Returns all objects as translated instances, but only the ones that are translated into the currect language. You can also specify which language to get, using e.g.
+Returns all objects as translated instances, but only the ones that are translated
+into the currect language. You can also specify which language to get, using e.g.
Normal.objects.language("en").all()
@@ -43,12 +47,7 @@ Features
* High level (no custom SQL Compiler or other scary things)
-Important
----------
-
-We keep the nani name internally in the code, as we want to be able to adapt and contribute to/from django-nani
-
Thanks to
---------
-Jonas Obrist (https://github.com/ojii) for making django-nani and for helping me with this project.
+Jonas Obrist (https://github.com/ojii) for making django-nani and for helping me with this project.
View
@@ -0,0 +1,2 @@
+__version__ = '0.1.5'
+
Oops, something went wrong.

0 comments on commit 6d92008

Please sign in to comment.