Giter VIP home page Giter VIP logo

django-stachoutils's People

Contributors

starou avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

django-stachoutils's Issues

fix dumpdata_related

File "..../venv_publish/lib/python3.6/site-packages/django_stachoutils/management/commands/dumpdata_related.py", line 116, in handle
    if len(app_list) != 1 or len(list(app_list.values())[0]) != 1:
TypeError: 'odict_values' object does not support indexing

Passer à des tests type Django App

  • Supprimer le projet de test dans tests/projects ?
    • Remplacer par des tests selenium
  • à quoi sert le tests/settings.py ? tests/regressiontests/templatetags.py
  • Modifier la tests/Makefile
    • PYTHONPATH
    • Coverage
  • Coverage
  • tests/__init__.py ne sert pas actuellement. test_lowerize() référence une fonction qui n'existe plus et test_files_are_equal() ne peut pas marcher car les fichiers de test n'existent pas.

Duplicate GET parameter in generic list filter

When a filter is selected, the last item of a filter (the one that unfilter the current filter) contains 2 GET parameters for the same key :

<div>
 <h3><a></a><input type="hidden" name="filter_key" value="last driver" />By last driver</h3>
   <ul>
        <li><a href="?">All</a></li>
        <li><a href="?last_driver__exact=%d">Stanislas Guerra</a></li>
        <li class="selected"><a href="?last_driver__exact=%d">Michael Schumacher</a></li>
        <li><a href="?last_driver__exact=%d&last_driver__isnull=True">Aucun</a></li>
    </ul>
</div>""" % (self.p1.pk, self.p2.pk, self.p2.pk)

Test in test_fk_filters_filtered_generic_list()

Remove dead code in generic.py

In discover_field :

            try:
                # As of Django 1.9, Field.rel has been replaced with remote_field.
                # This may not works (not encountered yet).
                mod = mod._meta.get_field(rel_model).remote_field.model
            except:
                if DJ_VERSION >= (1, 9):
                    mod = getattr(mod, '%s_set' % rel_model).rel.related_model
                elif DJ_VERSION >= (1, 8):
                    mod = getattr(mod, '%s_set' % rel_model).related.related_model
                else:
                    mod = getattr(mod, '%s_set' % rel_model).related.model

        field = mod._meta.get_field(attr)

Exception is never raised.

TODO

AdminExtra / dump

  • manage m2m (and infinite recursion)
  • handle object order
  • virer lowerize() qui était utilisé dans Publish dans import Cadrimmo pour le nom court des programmes. Checker avant que plus utilisé.
  • supprimer le shortcuts.json_response() car built-in depuis Django-1.7.
  • views/generic.py#100 : Faire le ménage dans get_filters car les filtres fermés sont gérés en js.

Fix ModelForm.save() override in nested.py

    def save(self, commit=True):
        self.nested_instance = None
        if self.nested_form.has_changed():
            self.nested_instance = self.nested_form.save()
        self.instance = super(NestedModelForm, self).save(commit=commit)
        if self.nested_instance:
            setattr(self.instance, self._nested.fk, self.nested_instance)
            self.instance.save()
        return self.instance

Python 2/3 compatibility

Futurize

  • __init__.py
  • csv_utf8.py
  • forms/
  • log.py
  • management/
  • middlewares.py
  • models.py
  • options.py
  • profiler.py
  • shortcuts.py
  • sql.py
  • static/ ?
  • storage.py

Replace ugettext() with gettext() and force_text() with force_str()

django_stachoutils/views/generic.py:426: RemovedInDjango40Warning: django.utils.translation.ugettext() is deprecated in favor of django.utils.translation.gettext().

django_stachoutils/templatetags/stachoutils_extras.py:177: RemovedInDjango40Warning: django.utils.translation.ugettext() is deprecated in favor of django.utils.translation.gettext().

django_stachoutils/options.py:15: RemovedInDjango40Warning: force_text() is deprecated in favor of force_str().

django_stachoutils/options.py:25: RemovedInDjango40Warning: force_text() is deprecated in favor of force_str().

Travis

  • Badges dans le README

Add max_length to OverwriteStorage backend

django/db/models/fields/files.py:93: RemovedInDjango110Warning: Backwards compatibility for storage backends without support for the max_length argument in Storage.get_available_name() will be removed in Django 1.10.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.