[Python-modules-commits] [django-hvad] 01/01: New upstream version 1.8.0

Hans-Christoph Steiner eighthave at moszumanska.debian.org
Fri Sep 22 22:01:46 UTC 2017


This is an automated email from the git hooks/post-receive script.

eighthave pushed a commit to branch master
in repository django-hvad.

commit 354145e7511ac7799d5bb3766db072d44591fe47
Author: Hans-Christoph Steiner <hans at eds.org>
Date:   Fri Sep 22 23:53:13 2017 +0200

    New upstream version 1.8.0
---
 AUTHORS                                            |   15 +
 LICENSE                                            |   24 +
 MANIFEST.in                                        |    7 +
 PKG-INFO                                           |  166 ++++
 README.rst                                         |  144 +++
 django_hvad.egg-info/PKG-INFO                      |  166 ++++
 django_hvad.egg-info/SOURCES.txt                   |   89 ++
 django_hvad.egg-info/dependency_links.txt          |    1 +
 django_hvad.egg-info/not-zip-safe                  |    1 +
 django_hvad.egg-info/requires.txt                  |    1 +
 django_hvad.egg-info/top_level.txt                 |    1 +
 docs/Makefile                                      |  130 +++
 docs/_ext/__pycache__/djangodocs.cpython-35.pyc    |  Bin 0 -> 683 bytes
 docs/_ext/__pycache__/github.cpython-35.pyc        |  Bin 0 -> 1256 bytes
 docs/_ext/djangodocs.py                            |   28 +
 docs/_ext/github.py                                |   31 +
 docs/_static/.gitignore                            |    0
 docs/_static/stylesheet.css                        |   22 +
 docs/conf.py                                       |  107 ++
 docs/glossary.rst                                  |   42 +
 docs/index.rst                                     |   62 ++
 docs/internal/admin.rst                            |   89 ++
 docs/internal/descriptors.rst                      |   86 ++
 docs/internal/exceptions.rst                       |   15 +
 docs/internal/fieldtranslator.rst                  |   50 +
 docs/internal/forms.rst                            |  216 ++++
 docs/internal/general.rst                          |   66 ++
 docs/internal/index.rst                            |   35 +
 docs/internal/manager.rst                          |  754 ++++++++++++++
 docs/internal/models.rst                           |  153 +++
 docs/internal/query.rst                            |   43 +
 docs/internal/utils.rst                            |  112 +++
 docs/make.bat                                      |  155 +++
 docs/public/admin.rst                              |  112 +++
 docs/public/contact.rst                            |    5 +
 docs/public/contributing.rst                       |   92 ++
 docs/public/faq.rst                                |  235 +++++
 docs/public/forms.rst                              |  239 +++++
 docs/public/installation.rst                       |   51 +
 docs/public/models.rst                             |  348 +++++++
 docs/public/queryset.rst                           |  236 +++++
 docs/public/quickstart.rst                         |  148 +++
 docs/public/release_notes.rst                      |  774 +++++++++++++++
 docs/public/restframework.rst                      |  220 +++++
 hvad/__init__.py                                   |    2 +
 hvad/admin.py                                      |  451 +++++++++
 hvad/compat.py                                     |   33 +
 hvad/contrib/__init__.py                           |    0
 hvad/contrib/restframework/__init__.py             |   11 +
 hvad/contrib/restframework/serializers.py          |  265 +++++
 hvad/contrib/restframework/utils.py                |   65 ++
 hvad/descriptors.py                                |   77 ++
 hvad/exceptions.py                                 |   24 +
 hvad/forms.py                                      |  363 +++++++
 hvad/locale/en/LC_MESSAGES/django.mo               |  Bin 0 -> 378 bytes
 hvad/locale/en/LC_MESSAGES/django.po               |   76 ++
 hvad/locale/fr/LC_MESSAGES/django.mo               |  Bin 0 -> 1226 bytes
 hvad/locale/fr/LC_MESSAGES/django.po               |   80 ++
 hvad/locale/it/LC_MESSAGES/django.mo               |  Bin 0 -> 1529 bytes
 hvad/locale/it/LC_MESSAGES/django.po               |   84 ++
 hvad/locale/lv/LC_MESSAGES/django.mo               |  Bin 0 -> 1789 bytes
 hvad/locale/lv/LC_MESSAGES/django.po               |   95 ++
 hvad/locale/ru/LC_MESSAGES/django.mo               |  Bin 0 -> 1949 bytes
 hvad/locale/ru/LC_MESSAGES/django.po               |   94 ++
 hvad/manager.py                                    | 1028 ++++++++++++++++++++
 hvad/models.py                                     |  462 +++++++++
 hvad/query.py                                      |  131 +++
 hvad/settings.py                                   |  126 +++
 hvad/templates/admin/hvad/change_form.html         |   35 +
 .../templates/admin/hvad/deletion_not_allowed.html |   16 +
 hvad/templates/admin/hvad/edit_inline/stacked.html |   83 ++
 hvad/templates/admin/hvad/edit_inline/tabular.html |  129 +++
 .../admin/hvad/includes/translation_tabs.html      |   10 +
 hvad/test_utils/__init__.py                        |    0
 hvad/test_utils/context_managers.py                |   62 ++
 hvad/test_utils/data.py                            |   93 ++
 hvad/test_utils/fixtures.py                        |  135 +++
 hvad/test_utils/forms.py                           |   39 +
 hvad/test_utils/project/__init__.py                |    0
 hvad/test_utils/project/app/__init__.py            |    0
 hvad/test_utils/project/app/admin.py               |   16 +
 hvad/test_utils/project/app/models.py              |  299 ++++++
 hvad/test_utils/project/manage.py                  |   11 +
 hvad/test_utils/project/urls.py                    |    8 +
 hvad/test_utils/testcase.py                        |   39 +
 hvad/tests/contrib/__init__.py                     |    0
 hvad/tests/contrib/restframework.py                |  582 +++++++++++
 hvad/utils.py                                      |  151 +++
 hvad/views.py                                      |   64 ++
 setup.cfg                                          |    4 +
 setup.py                                           |   41 +
 91 files changed, 10555 insertions(+)

diff --git a/AUTHORS b/AUTHORS
new file mode 100644
index 0000000..6c11434
--- /dev/null
+++ b/AUTHORS
@@ -0,0 +1,15 @@
+Alphabetical list of contributors:
+
+* Andi Albrecht
+* Angelo Dini
+* Benjamin Wohlwend
+* Charlie Denton
+* Daniele Procida
+* Ian Clelland
+* Iván Raskovsky
+* Jonas Obrist
+* Julien Hartmann
+* Kristian Øllegaard
+* Martin Koistinen
+* Paulo Alvarado
+* Stefan Foulis
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..8440c10
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,24 @@
+Copyright (c) 2011, Jonas Obrist
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+    * Redistributions of source code must retain the above copyright
+      notice, this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright
+      notice, this list of conditions and the following disclaimer in the
+      documentation and/or other materials provided with the distribution.
+    * Neither the name of Jonas Obrist nor the
+      names of its contributors may be used to endorse or promote products
+      derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL JONAS OBRIST BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
\ No newline at end of file
diff --git a/MANIFEST.in b/MANIFEST.in
new file mode 100644
index 0000000..935ede2
--- /dev/null
+++ b/MANIFEST.in
@@ -0,0 +1,7 @@
+include AUTHORS
+include LICENSE
+include README.rst
+recursive-include hvad/templates *
+recursive-include hvad/locale *
+recursive-include docs *
+prune testproject
diff --git a/PKG-INFO b/PKG-INFO
new file mode 100644
index 0000000..d372d2b
--- /dev/null
+++ b/PKG-INFO
@@ -0,0 +1,166 @@
+Metadata-Version: 1.1
+Name: django-hvad
+Version: 1.8.0
+Summary: A content translation framework for django integrated automatically in the normal ORM. Removes the pain of having to think about translations in a django project.
+Home-page: https://github.com/KristianOellegaard/django-hvad
+Author: Kristian Ollegaard
+Author-email: kristian.ollegaard at divio.ch
+License: UNKNOWN
+Description: ========================================
+        django-hvad |package| |coverage| |build|
+        ========================================
+        
+        **Model translations made easy.**
+        
+        This project adds support for model translations in Django. It is designed to be
+        unobtrusive, efficient and reliable. On the technical side, it uses an automatically
+        created `Translations Model` to store translatable fields in arbitrary
+        languages with a foreign key to the main model, enabling fast queries.
+        
+        Started in 2011, hvad has grown mature and is now used on large scale applications.
+        
+        Quick links:
+        
+        - `Documentation`_.
+        - `Release notes`_.
+        - `Issue tracker`_.
+        
+        Features
+        --------
+        
+        * **Simple** - only 3 new queryset methods.
+        * **Natural** - use Django ORM as usual, it just became language aware.
+        * **Fast** - no additional queries for reads, just an inner join to an indexed key.
+        * **Complete** - relationships, custom managers and querysets, proxy models, and abstract models.
+        * **Batteries included** - translation-enabled forms and admin are provided.
+        * **Reliable** - more than 300 test cases and counting. |coverage| |build|
+        * **Compatible** with Django 1.8 to 1.11, running Python 2.7, 3.4, 3.5 or 3.6.
+        
+        Django-hvad also features support for `Django REST framework`_ 3.1 or newer, including
+        translation-aware serializers.
+        
+        Example Uses
+        ------------
+        
+        Declaring a translatable ``Book`` model::
+        
+            class Book(TranslatableModel):
+                author = models.ForeignKey(Author)
+                release = models.Date()
+        
+                translations = TranslatedFields(
+                    title = models.CharField(max_length=250)
+                )
+        
+        Thus, only the title will vary based on the language. Release date and
+        author are shared among all languages. Let's now create a ``Book`` instance::
+        
+            # The recommended way:
+            book = Book.objects.language('en').create(
+                author = Author.objects.get(name='Antoine de Saint Exupéry'),
+                release = datetime.date(1943, 4, 6),
+                title = "The Little Prince",
+            )
+        
+            # Also works
+            book = Book(language_code='en')
+            book.author = Author.objects.get(name='Antoine de Saint Exupéry')
+            book.release = datetime.date(1943, 4, 6)
+            book.title = "The Little Prince"
+            book.save()
+        
+        Providing some translations::
+        
+            book.translate('fr')
+            book.title = "Le Petit Prince"
+            book.save()
+            book.translate('de')
+            book.title = "Der kleine Prinz"
+            book.save()
+        
+        Every call to ``translate()`` creates a new translation from scratch and switches
+        to that translation; ``save()`` only saves the latest translation. Let's now perform
+        some language-aware queries::
+        
+            Book.objects.all()
+        
+        Compatible by default: returns all objects, without any translated fields attached.
+        Starting from v1.0, default behavior can be overriden to work like next query::
+        
+            Book.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.::
+        
+            Book.objects.language("en").all()
+        
+        Usual queryset methods work like they always did: let's get all books as translated instances,
+        filtering on the ``title`` attribute, returning those that have
+        ``Petit Prince`` in their French title, ordered by publication date (in their
+        French edition)::
+        
+            Book.objects.language("fr").filter(title__contains='Petit Prince').order_by('release')
+        
+        Other random examples::
+        
+            # last German book published in year 1948
+            Book.objects.language("de").filter(release__year=1948).latest()
+        
+            # other books from the same author as mybook. Cache author as well.
+            Book.objects.language().select_related('author').filter(author__books=mybook)
+        
+            # books that have "Django" in their title, regardless of the language
+            Book.objects.language('all').filter(title__icontains='Django')
+        
+        
+        More examples in the `quickstart guide`_.
+        
+        Releases
+        --------
+        
+        Django-hvad uses the same release pattern as Django. The following versions
+        are thus available:
+        
+        * Stable branch 1.7, available through `PyPI`_ and git branch ``releases/1.7.x``.
+        * Stable branch 1.8, available through `PyPI`_ and git branch ``releases/1.8.x``.
+        * Development branch 1.9, available through git branch ``master``.
+        
+        Stable branches have minor bugfix releases as needed, with guaranteed compatibility.
+        See the `installation guide`_ for details, or have a look at the `release notes`_.
+        
+        Thanks to
+        ---------
+        
+        Jonas Obrist (https://github.com/ojii) for making django-nani and for helping me with this project.
+        
+        Kristian Øllegaard (https://github.com/KristianOellegaard/) for django-hvad and trusting me
+        to continue the development.
+        
+        .. |package| image:: https://badge.fury.io/py/django-hvad.svg
+                             :target: https://pypi.python.org/pypi/django-hvad
+        .. |build| image:: https://secure.travis-ci.org/KristianOellegaard/django-hvad.svg?branch=master
+        .. |coverage| image:: https://coveralls.io/repos/KristianOellegaard/django-hvad/badge.svg
+                              :target: https://coveralls.io/r/KristianOellegaard/django-hvad
+        
+        .. _documentation: http://django-hvad.readthedocs.org/
+        .. _release notes: https://django-hvad.readthedocs.org/en/latest/public/release_notes.html
+        .. _issue tracker: https://github.com/KristianOellegaard/django-hvad/issues
+        .. _PyPI: https://pypi.python.org/pypi/django-hvad
+        .. _Django REST framework: http://www.django-rest-framework.org/
+        .. _installation guide: http://django-hvad.readthedocs.org/en/latest/public/installation.html
+        .. _quickstart guide: http://django-hvad.readthedocs.org/en/latest/public/quickstart.html
+        
+        
+Platform: UNKNOWN
+Classifier: Development Status :: 5 - Production/Stable
+Classifier: Framework :: Django
+Classifier: Intended Audience :: Developers
+Classifier: License :: OSI Approved :: BSD License
+Classifier: Operating System :: OS Independent
+Classifier: Programming Language :: Python :: 2.7
+Classifier: Programming Language :: Python :: 3.4
+Classifier: Programming Language :: Python :: 3.5
+Classifier: Programming Language :: Python :: 3.6
+Classifier: Topic :: Database
+Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
+Classifier: Topic :: Text Processing :: Linguistic
diff --git a/README.rst b/README.rst
new file mode 100644
index 0000000..5250054
--- /dev/null
+++ b/README.rst
@@ -0,0 +1,144 @@
+========================================
+django-hvad |package| |coverage| |build|
+========================================
+
+**Model translations made easy.**
+
+This project adds support for model translations in Django. It is designed to be
+unobtrusive, efficient and reliable. On the technical side, it uses an automatically
+created `Translations Model` to store translatable fields in arbitrary
+languages with a foreign key to the main model, enabling fast queries.
+
+Started in 2011, hvad has grown mature and is now used on large scale applications.
+
+Quick links:
+
+- `Documentation`_.
+- `Release notes`_.
+- `Issue tracker`_.
+
+Features
+--------
+
+* **Simple** - only 3 new queryset methods.
+* **Natural** - use Django ORM as usual, it just became language aware.
+* **Fast** - no additional queries for reads, just an inner join to an indexed key.
+* **Complete** - relationships, custom managers and querysets, proxy models, and abstract models.
+* **Batteries included** - translation-enabled forms and admin are provided.
+* **Reliable** - more than 300 test cases and counting. |coverage| |build|
+* **Compatible** with Django 1.8 to 1.11, running Python 2.7, 3.4, 3.5 or 3.6.
+
+Django-hvad also features support for `Django REST framework`_ 3.1 or newer, including
+translation-aware serializers.
+
+Example Uses
+------------
+
+Declaring a translatable ``Book`` model::
+
+    class Book(TranslatableModel):
+        author = models.ForeignKey(Author)
+        release = models.Date()
+
+        translations = TranslatedFields(
+            title = models.CharField(max_length=250)
+        )
+
+Thus, only the title will vary based on the language. Release date and
+author are shared among all languages. Let's now create a ``Book`` instance::
+
+    # The recommended way:
+    book = Book.objects.language('en').create(
+        author = Author.objects.get(name='Antoine de Saint Exupéry'),
+        release = datetime.date(1943, 4, 6),
+        title = "The Little Prince",
+    )
+
+    # Also works
+    book = Book(language_code='en')
+    book.author = Author.objects.get(name='Antoine de Saint Exupéry')
+    book.release = datetime.date(1943, 4, 6)
+    book.title = "The Little Prince"
+    book.save()
+
+Providing some translations::
+
+    book.translate('fr')
+    book.title = "Le Petit Prince"
+    book.save()
+    book.translate('de')
+    book.title = "Der kleine Prinz"
+    book.save()
+
+Every call to ``translate()`` creates a new translation from scratch and switches
+to that translation; ``save()`` only saves the latest translation. Let's now perform
+some language-aware queries::
+
+    Book.objects.all()
+
+Compatible by default: returns all objects, without any translated fields attached.
+Starting from v1.0, default behavior can be overriden to work like next query::
+
+    Book.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.::
+
+    Book.objects.language("en").all()
+
+Usual queryset methods work like they always did: let's get all books as translated instances,
+filtering on the ``title`` attribute, returning those that have
+``Petit Prince`` in their French title, ordered by publication date (in their
+French edition)::
+
+    Book.objects.language("fr").filter(title__contains='Petit Prince').order_by('release')
+
+Other random examples::
+
+    # last German book published in year 1948
+    Book.objects.language("de").filter(release__year=1948).latest()
+
+    # other books from the same author as mybook. Cache author as well.
+    Book.objects.language().select_related('author').filter(author__books=mybook)
+
+    # books that have "Django" in their title, regardless of the language
+    Book.objects.language('all').filter(title__icontains='Django')
+
+
+More examples in the `quickstart guide`_.
+
+Releases
+--------
+
+Django-hvad uses the same release pattern as Django. The following versions
+are thus available:
+
+* Stable branch 1.7, available through `PyPI`_ and git branch ``releases/1.7.x``.
+* Stable branch 1.8, available through `PyPI`_ and git branch ``releases/1.8.x``.
+* Development branch 1.9, available through git branch ``master``.
+
+Stable branches have minor bugfix releases as needed, with guaranteed compatibility.
+See the `installation guide`_ for details, or have a look at the `release notes`_.
+
+Thanks to
+---------
+
+Jonas Obrist (https://github.com/ojii) for making django-nani and for helping me with this project.
+
+Kristian Øllegaard (https://github.com/KristianOellegaard/) for django-hvad and trusting me
+to continue the development.
+
+.. |package| image:: https://badge.fury.io/py/django-hvad.svg
+                     :target: https://pypi.python.org/pypi/django-hvad
+.. |build| image:: https://secure.travis-ci.org/KristianOellegaard/django-hvad.svg?branch=master
+.. |coverage| image:: https://coveralls.io/repos/KristianOellegaard/django-hvad/badge.svg
+                      :target: https://coveralls.io/r/KristianOellegaard/django-hvad
+
+.. _documentation: http://django-hvad.readthedocs.org/
+.. _release notes: https://django-hvad.readthedocs.org/en/latest/public/release_notes.html
+.. _issue tracker: https://github.com/KristianOellegaard/django-hvad/issues
+.. _PyPI: https://pypi.python.org/pypi/django-hvad
+.. _Django REST framework: http://www.django-rest-framework.org/
+.. _installation guide: http://django-hvad.readthedocs.org/en/latest/public/installation.html
+.. _quickstart guide: http://django-hvad.readthedocs.org/en/latest/public/quickstart.html
+
diff --git a/django_hvad.egg-info/PKG-INFO b/django_hvad.egg-info/PKG-INFO
new file mode 100644
index 0000000..d372d2b
--- /dev/null
+++ b/django_hvad.egg-info/PKG-INFO
@@ -0,0 +1,166 @@
+Metadata-Version: 1.1
+Name: django-hvad
+Version: 1.8.0
+Summary: A content translation framework for django integrated automatically in the normal ORM. Removes the pain of having to think about translations in a django project.
+Home-page: https://github.com/KristianOellegaard/django-hvad
+Author: Kristian Ollegaard
+Author-email: kristian.ollegaard at divio.ch
+License: UNKNOWN
+Description: ========================================
+        django-hvad |package| |coverage| |build|
+        ========================================
+        
+        **Model translations made easy.**
+        
+        This project adds support for model translations in Django. It is designed to be
+        unobtrusive, efficient and reliable. On the technical side, it uses an automatically
+        created `Translations Model` to store translatable fields in arbitrary
+        languages with a foreign key to the main model, enabling fast queries.
+        
+        Started in 2011, hvad has grown mature and is now used on large scale applications.
+        
+        Quick links:
+        
+        - `Documentation`_.
+        - `Release notes`_.
+        - `Issue tracker`_.
+        
+        Features
+        --------
+        
+        * **Simple** - only 3 new queryset methods.
+        * **Natural** - use Django ORM as usual, it just became language aware.
+        * **Fast** - no additional queries for reads, just an inner join to an indexed key.
+        * **Complete** - relationships, custom managers and querysets, proxy models, and abstract models.
+        * **Batteries included** - translation-enabled forms and admin are provided.
+        * **Reliable** - more than 300 test cases and counting. |coverage| |build|
+        * **Compatible** with Django 1.8 to 1.11, running Python 2.7, 3.4, 3.5 or 3.6.
+        
+        Django-hvad also features support for `Django REST framework`_ 3.1 or newer, including
+        translation-aware serializers.
+        
+        Example Uses
+        ------------
+        
+        Declaring a translatable ``Book`` model::
+        
+            class Book(TranslatableModel):
+                author = models.ForeignKey(Author)
+                release = models.Date()
+        
+                translations = TranslatedFields(
+                    title = models.CharField(max_length=250)
+                )
+        
+        Thus, only the title will vary based on the language. Release date and
+        author are shared among all languages. Let's now create a ``Book`` instance::
+        
+            # The recommended way:
+            book = Book.objects.language('en').create(
+                author = Author.objects.get(name='Antoine de Saint Exupéry'),
+                release = datetime.date(1943, 4, 6),
+                title = "The Little Prince",
+            )
+        
+            # Also works
+            book = Book(language_code='en')
+            book.author = Author.objects.get(name='Antoine de Saint Exupéry')
+            book.release = datetime.date(1943, 4, 6)
+            book.title = "The Little Prince"
+            book.save()
+        
+        Providing some translations::
+        
+            book.translate('fr')
+            book.title = "Le Petit Prince"
+            book.save()
+            book.translate('de')
+            book.title = "Der kleine Prinz"
+            book.save()
+        
+        Every call to ``translate()`` creates a new translation from scratch and switches
+        to that translation; ``save()`` only saves the latest translation. Let's now perform
+        some language-aware queries::
+        
+            Book.objects.all()
+        
+        Compatible by default: returns all objects, without any translated fields attached.
+        Starting from v1.0, default behavior can be overriden to work like next query::
+        
+            Book.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.::
+        
+            Book.objects.language("en").all()
+        
+        Usual queryset methods work like they always did: let's get all books as translated instances,
+        filtering on the ``title`` attribute, returning those that have
+        ``Petit Prince`` in their French title, ordered by publication date (in their
+        French edition)::
+        
+            Book.objects.language("fr").filter(title__contains='Petit Prince').order_by('release')
+        
+        Other random examples::
+        
+            # last German book published in year 1948
+            Book.objects.language("de").filter(release__year=1948).latest()
+        
+            # other books from the same author as mybook. Cache author as well.
+            Book.objects.language().select_related('author').filter(author__books=mybook)
+        
+            # books that have "Django" in their title, regardless of the language
+            Book.objects.language('all').filter(title__icontains='Django')
+        
+        
+        More examples in the `quickstart guide`_.
+        
+        Releases
+        --------
+        
+        Django-hvad uses the same release pattern as Django. The following versions
+        are thus available:
+        
+        * Stable branch 1.7, available through `PyPI`_ and git branch ``releases/1.7.x``.
+        * Stable branch 1.8, available through `PyPI`_ and git branch ``releases/1.8.x``.
+        * Development branch 1.9, available through git branch ``master``.
+        
+        Stable branches have minor bugfix releases as needed, with guaranteed compatibility.
+        See the `installation guide`_ for details, or have a look at the `release notes`_.
+        
+        Thanks to
+        ---------
+        
+        Jonas Obrist (https://github.com/ojii) for making django-nani and for helping me with this project.
+        
+        Kristian Øllegaard (https://github.com/KristianOellegaard/) for django-hvad and trusting me
+        to continue the development.
+        
+        .. |package| image:: https://badge.fury.io/py/django-hvad.svg
+                             :target: https://pypi.python.org/pypi/django-hvad
+        .. |build| image:: https://secure.travis-ci.org/KristianOellegaard/django-hvad.svg?branch=master
+        .. |coverage| image:: https://coveralls.io/repos/KristianOellegaard/django-hvad/badge.svg
+                              :target: https://coveralls.io/r/KristianOellegaard/django-hvad
+        
+        .. _documentation: http://django-hvad.readthedocs.org/
+        .. _release notes: https://django-hvad.readthedocs.org/en/latest/public/release_notes.html
+        .. _issue tracker: https://github.com/KristianOellegaard/django-hvad/issues
+        .. _PyPI: https://pypi.python.org/pypi/django-hvad
+        .. _Django REST framework: http://www.django-rest-framework.org/
+        .. _installation guide: http://django-hvad.readthedocs.org/en/latest/public/installation.html
+        .. _quickstart guide: http://django-hvad.readthedocs.org/en/latest/public/quickstart.html
+        
+        
+Platform: UNKNOWN
+Classifier: Development Status :: 5 - Production/Stable
+Classifier: Framework :: Django
+Classifier: Intended Audience :: Developers
+Classifier: License :: OSI Approved :: BSD License
+Classifier: Operating System :: OS Independent
+Classifier: Programming Language :: Python :: 2.7
+Classifier: Programming Language :: Python :: 3.4
+Classifier: Programming Language :: Python :: 3.5
+Classifier: Programming Language :: Python :: 3.6
+Classifier: Topic :: Database
+Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
+Classifier: Topic :: Text Processing :: Linguistic
diff --git a/django_hvad.egg-info/SOURCES.txt b/django_hvad.egg-info/SOURCES.txt
new file mode 100644
index 0000000..f369b2e
--- /dev/null
+++ b/django_hvad.egg-info/SOURCES.txt
@@ -0,0 +1,89 @@
+AUTHORS
+LICENSE
+MANIFEST.in
+README.rst
+setup.py
+django_hvad.egg-info/PKG-INFO
+django_hvad.egg-info/SOURCES.txt
+django_hvad.egg-info/dependency_links.txt
+django_hvad.egg-info/not-zip-safe
+django_hvad.egg-info/requires.txt
+django_hvad.egg-info/top_level.txt
+docs/Makefile
+docs/conf.py
+docs/glossary.rst
+docs/index.rst
+docs/make.bat
+docs/_ext/djangodocs.py
+docs/_ext/github.py
+docs/_ext/__pycache__/djangodocs.cpython-35.pyc
+docs/_ext/__pycache__/github.cpython-35.pyc
+docs/_static/.gitignore
+docs/_static/stylesheet.css
+docs/internal/admin.rst
+docs/internal/descriptors.rst
+docs/internal/exceptions.rst
+docs/internal/fieldtranslator.rst
+docs/internal/forms.rst
+docs/internal/general.rst
+docs/internal/index.rst
+docs/internal/manager.rst
+docs/internal/models.rst
+docs/internal/query.rst
+docs/internal/utils.rst
+docs/public/admin.rst
+docs/public/contact.rst
+docs/public/contributing.rst
+docs/public/faq.rst
+docs/public/forms.rst
+docs/public/installation.rst
+docs/public/models.rst
+docs/public/queryset.rst
+docs/public/quickstart.rst
+docs/public/release_notes.rst
+docs/public/restframework.rst
+hvad/__init__.py
+hvad/admin.py
+hvad/compat.py
+hvad/descriptors.py
+hvad/exceptions.py
+hvad/forms.py
+hvad/manager.py
+hvad/models.py
+hvad/query.py
+hvad/settings.py
+hvad/utils.py
+hvad/views.py
+hvad/contrib/__init__.py
+hvad/contrib/restframework/__init__.py
+hvad/contrib/restframework/serializers.py
+hvad/contrib/restframework/utils.py
+hvad/locale/en/LC_MESSAGES/django.mo
+hvad/locale/en/LC_MESSAGES/django.po
+hvad/locale/fr/LC_MESSAGES/django.mo
+hvad/locale/fr/LC_MESSAGES/django.po
+hvad/locale/it/LC_MESSAGES/django.mo
+hvad/locale/it/LC_MESSAGES/django.po
+hvad/locale/lv/LC_MESSAGES/django.mo
+hvad/locale/lv/LC_MESSAGES/django.po
+hvad/locale/ru/LC_MESSAGES/django.mo
+hvad/locale/ru/LC_MESSAGES/django.po
+hvad/templates/admin/hvad/change_form.html
+hvad/templates/admin/hvad/deletion_not_allowed.html
+hvad/templates/admin/hvad/edit_inline/stacked.html
+hvad/templates/admin/hvad/edit_inline/tabular.html
+hvad/templates/admin/hvad/includes/translation_tabs.html
+hvad/test_utils/__init__.py
+hvad/test_utils/context_managers.py
+hvad/test_utils/data.py
+hvad/test_utils/fixtures.py
+hvad/test_utils/forms.py
+hvad/test_utils/testcase.py
+hvad/test_utils/project/__init__.py
+hvad/test_utils/project/manage.py
+hvad/test_utils/project/urls.py
+hvad/test_utils/project/app/__init__.py
+hvad/test_utils/project/app/admin.py
+hvad/test_utils/project/app/models.py
+hvad/tests/contrib/__init__.py
+hvad/tests/contrib/restframework.py
\ No newline at end of file
diff --git a/django_hvad.egg-info/dependency_links.txt b/django_hvad.egg-info/dependency_links.txt
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/django_hvad.egg-info/dependency_links.txt
@@ -0,0 +1 @@
+
diff --git a/django_hvad.egg-info/not-zip-safe b/django_hvad.egg-info/not-zip-safe
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/django_hvad.egg-info/not-zip-safe
@@ -0,0 +1 @@
+
diff --git a/django_hvad.egg-info/requires.txt b/django_hvad.egg-info/requires.txt
new file mode 100644
index 0000000..531dd9b
--- /dev/null
+++ b/django_hvad.egg-info/requires.txt
@@ -0,0 +1 @@
+Django>=1.8
diff --git a/django_hvad.egg-info/top_level.txt b/django_hvad.egg-info/top_level.txt
new file mode 100644
index 0000000..c646a6c
--- /dev/null
+++ b/django_hvad.egg-info/top_level.txt
@@ -0,0 +1 @@
+hvad
diff --git a/docs/Makefile b/docs/Makefile
new file mode 100644
index 0000000..aaadae7
--- /dev/null
+++ b/docs/Makefile
@@ -0,0 +1,130 @@
+# Makefile for Sphinx documentation
+#
+
+# You can set these variables from the command line.
+SPHINXOPTS    =
+SPHINXBUILD   = sphinx-build
+PAPER         =
+BUILDDIR      = _build
+
+# Internal variables.
+PAPEROPT_a4     = -D latex_paper_size=a4
+PAPEROPT_letter = -D latex_paper_size=letter
+ALLSPHINXOPTS   = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
+
+.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest
+
+help:
+	@echo "Please use \`make <target>' where <target> is one of"
+	@echo "  html       to make standalone HTML files"
+	@echo "  dirhtml    to make HTML files named index.html in directories"
+	@echo "  singlehtml to make a single large HTML file"
+	@echo "  pickle     to make pickle files"
+	@echo "  json       to make JSON files"
+	@echo "  htmlhelp   to make HTML files and a HTML help project"
+	@echo "  qthelp     to make HTML files and a qthelp project"
+	@echo "  devhelp    to make HTML files and a Devhelp project"
+	@echo "  epub       to make an epub"
+	@echo "  latex      to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
+	@echo "  latexpdf   to make LaTeX files and run them through pdflatex"
+	@echo "  text       to make text files"
+	@echo "  man        to make manual pages"
+	@echo "  changes    to make an overview of all changed/added/deprecated items"
+	@echo "  linkcheck  to check all external links for integrity"
+	@echo "  doctest    to run all doctests embedded in the documentation (if enabled)"
+
+clean:
+	-rm -rf $(BUILDDIR)/*
+
+html:
+	$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
+	@echo
+	@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
+
+dirhtml:
+	$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
+	@echo
+	@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
+
+singlehtml:
+	$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
+	@echo
+	@echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
+
+pickle:
+	$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
+	@echo
+	@echo "Build finished; now you can process the pickle files."
+
+json:
+	$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
+	@echo
+	@echo "Build finished; now you can process the JSON files."
+
+htmlhelp:
+	$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
+	@echo
+	@echo "Build finished; now you can run HTML Help Workshop with the" \
+	      ".hhp project file in $(BUILDDIR)/htmlhelp."
+
+qthelp:
+	$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
+	@echo
+	@echo "Build finished; now you can run "qcollectiongenerator" with the" \
+	      ".qhcp project file in $(BUILDDIR)/qthelp, like this:"
+	@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/Project.qhcp"
+	@echo "To view the help file:"
+	@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/Project.qhc"
+
+devhelp:
+	$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
+	@echo
+	@echo "Build finished."
+	@echo "To view the help file:"
+	@echo "# mkdir -p $$HOME/.local/share/devhelp/Project"
+	@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/Project"
+	@echo "# devhelp"
+
+epub:
+	$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
+	@echo
+	@echo "Build finished. The epub file is in $(BUILDDIR)/epub."
+
+latex:
+	$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
+	@echo
+	@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
+	@echo "Run \`make' in that directory to run these through (pdf)latex" \
+	      "(use \`make latexpdf' here to do that automatically)."
+
+latexpdf:
+	$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
+	@echo "Running LaTeX files through pdflatex..."
+	make -C $(BUILDDIR)/latex all-pdf
+	@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
+
+text:
+	$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
+	@echo
+	@echo "Build finished. The text files are in $(BUILDDIR)/text."
+
+man:
+	$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
+	@echo
+	@echo "Build finished. The manual pages are in $(BUILDDIR)/man."
+
+changes:
+	$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
+	@echo
+	@echo "The overview file is in $(BUILDDIR)/changes."
+
+linkcheck:
+	$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
+	@echo
+	@echo "Link check complete; look for any errors in the above output " \
+	      "or in $(BUILDDIR)/linkcheck/output.txt."
+
+doctest:
+	$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
+	@echo "Testing of doctests in the sources finished, look at the " \
+	      "results in $(BUILDDIR)/doctest/output.txt."
diff --git a/docs/_ext/__pycache__/djangodocs.cpython-35.pyc b/docs/_ext/__pycache__/djangodocs.cpython-35.pyc
new file mode 100644
index 0000000..6658a5c
Binary files /dev/null and b/docs/_ext/__pycache__/djangodocs.cpython-35.pyc differ
diff --git a/docs/_ext/__pycache__/github.cpython-35.pyc b/docs/_ext/__pycache__/github.cpython-35.pyc
new file mode 100644
index 0000000..23b299e
Binary files /dev/null and b/docs/_ext/__pycache__/github.cpython-35.pyc differ
diff --git a/docs/_ext/djangodocs.py b/docs/_ext/djangodocs.py
new file mode 100644
index 0000000..ad550dd
--- /dev/null
+++ b/docs/_ext/djangodocs.py
@@ -0,0 +1,28 @@
+# Sphinx helper for Django-specific references
+
+def setup(app):
+    app.add_crossref_type(
+        directivename = "label",
+        rolename = "djterm",
+        indextemplate = "pair: %s; label",
+    )
+    app.add_crossref_type(
+        directivename = "setting",
+        rolename = "setting",
+        indextemplate = "pair: %s; setting",
+    )
+    app.add_crossref_type(
+        directivename = "templatetag",
+        rolename = "ttag",
+        indextemplate = "pair: %s; template tag",
+    )
+    app.add_crossref_type(
+        directivename = "templatefilter",
+        rolename = "tfilter",
+        indextemplate = "pair: %s; template filter",
+    )
+    app.add_crossref_type(
+        directivename = "fieldlookup",
+        rolename = "lookup",
+        indextemplate = "pair: %s; field lookup type",
+    )
diff --git a/docs/_ext/github.py b/docs/_ext/github.py
new file mode 100644
index 0000000..d5fdb63
--- /dev/null
+++ b/docs/_ext/github.py
@@ -0,0 +1,31 @@
+# Sphinx helper for github issue references
+from docutils import nodes
+from docutils.parsers.rst.roles import set_classes
+
+ISSUE_URL = 'https://github.com/{owner}/{repo}/issues/{num}'
+
+def github_issue_role(role, rawtext, text, lineno, inliner, options={}, content=[]):
+    try:
+        issuenum = int(text)
+        if issuenum <= 0:
+            raise ValueError()
+    except ValueError:
+        msg = inliner.reporter.error(
+            'Issuse number must be a strictly positive integer. Number "%s" '
+            'is invalid.' % text, line=lineno)
+        prb = inliner.problematic(rawtext, rawtext, msg)
+        return [prb], [msg]
+
+    ref = ISSUE_URL.format(
+        owner = inliner.document.settings.env.config['github_owner'],
+        repo = inliner.document.settings.env.config['github_repo'],
+        num = issuenum,
+    )
+    set_classes(options)
+    node = nodes.reference(rawtext, '#%d' % issuenum, refuri=ref, **options)
+    return [node], []
+
+def setup(app):
+    app.add_config_value('github_owner', None, 'html')
+    app.add_config_value('github_repo', None, 'html')
+    app.add_role('issue', github_issue_role)
diff --git a/docs/_static/.gitignore b/docs/_static/.gitignore
new file mode 100644
index 0000000..e69de29
... 10174 lines suppressed ...

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/django-hvad.git



More information about the Python-modules-commits mailing list