Re: Default custom reverse manager
Did you check if the manager changes in Django 1.10 could help? (By the way, usage questions should be asked on the django-users list). https://docs.djangoproject.com/en/stable/releases/1.10/#manager-use-for-related-fields-and-inheritance-changes On Wednesday, January 25, 2017 at 10:36:58 AM UTC-5, Omer Korner wrote: > > Hi all, > > I have a use case where I need to use a custom reverse manager (Or Related > Manager?). Docs can be found here: > > https://docs.djangoproject.com/en/1.10/topics/db/queries/#using-custom-reverse-manager > > I was wondering if a default custom reverse manager exists. So instead of > having to explicitly define a manager for every usage: > > b.entry_set(manager='entries').all() > > You could set the manager when defining the relationship: > > class Entry(models.Model): > #... > blog = models.ForeignKey(Blog, manager=EntryManager()) > > > If this behavior doesn't exist, I'd be happy to look into implementing it. > > Omer > -- You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-developers+unsubscr...@googlegroups.com. To post to this group, send email to django-developers@googlegroups.com. Visit this group at https://groups.google.com/group/django-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/863c29f5-1605-4740-ba2f-2c65a101293f%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Fellow Report - January 28, 2017
There were more cleanups for the removal of Python 2 this week: https://code.djangoproject.com/ticket/23919. I think it’s mostly done now. Triaged --- https://code.djangoproject.com/ticket/27765 - Migration to delete child model (multi-table inheritance) results in an error when using SQLite (duplicate) https://code.djangoproject.com/ticket/27757 - The link of the "view_on_site" button is not formed according to the returning result of the "get_absolute_url" method. (invalid) https://code.djangoproject.com/ticket/27772 - Multiple Database without Default (needsinfo) https://code.djangoproject.com/ticket/27764 - Running migration that deletes child model (in multi-table inheritance) backwards results in an error (duplicate) https://code.djangoproject.com/ticket/27774 - django admin with many objects count is very slow (invalid) https://github.com/jazzband/django-debug-toolbar/issues/910 - Poor performance in Django 1.11 after template-based widget rendering (created) https://code.djangoproject.com/ticket/27781 - simplify_regex() doesn't remove ? characters (fixed) https://code.djangoproject.com/ticket/27785 - Log request.body (or part of it) in the 500 debug content (accepted) Authored -- https://github.com/django/django/pull/7960 - Fixed #27722 -- Reallowed using backend-specific templates in {% include %}. https://github.com/django/django/pull/7971 - Fixed #27788 -- Dropped support for Oracle < 12.1. https://github.com/django/django/pull/7972 - Refs #27790 -- Reverted "Removed available_apps on TestCase subclasses." https://github.com/django/django/pull/7978 - Fixed #27683 -- Made MySQL default to the read committed isolation level. https://github.com/django/djangoproject.com/pull/733 - Allowed archiving inactive corporate members. Reviewed/committed -- https://github.com/django/django/pull/7926 - Fixed #27761 -- Fixed quote location in multiple_input.html forms templates. https://github.com/django/django/pull/7925 - Fixed #27759 -- Prevented forms attrs.html template from rendering False attrs. https://github.com/django/django/pull/7813 - Fixed #27678 - Documented that template system isn't safe against untrusted authors. https://github.com/django/django/pull/7858 - Fixed #27748 -- Switched HTTP error handlers to reference callables instead of strings. https://github.com/django/django/pull/7949 - Fixed #27769 -- Documented option naming differences between django-admin and call_command(). https://github.com/django/django/pull/7923 - Fixed #26993 -- Increased User.last_name max_length to 150 characters. https://github.com/django/django/pull/7963 - Fixed #26708 -- Updated the contributing tutorial to use a GitHub workflow. -- You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-developers+unsubscr...@googlegroups.com. To post to this group, send email to django-developers@googlegroups.com. Visit this group at https://groups.google.com/group/django-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/2c2334ef-56b2-4799-a710-549ce911ad71%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Django shell on django admin site
Hi everyone. I created small application which can execute python code in django project environment. Maybe someone will be interested and has any suggestions. django-admin-shell: https://github.com/djk2/django-admin-shell -- You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-developers+unsubscr...@googlegroups.com. To post to this group, send email to django-developers@googlegroups.com. Visit this group at https://groups.google.com/group/django-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/a0911918-68e3-43a1-925f-d2b699d0a3f6%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Django 1.11 indexes
Hi Everyone, Do I understand this correctly - now there are 2 ways to make a single field indexed in database: - FieldClass(db_index=True) - Model.Meta.indexes will it stay like this for future release or 1st approach will be deprecated/removed later ? -- You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-developers+unsubscr...@googlegroups.com. To post to this group, send email to django-developers@googlegroups.com. Visit this group at https://groups.google.com/group/django-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/58719258-8ba3-4f9d-9042-b2003786ec2a%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re-open ticket 25192
Hello, Ticket #25192[1] is about a problem that only affects Python 2 users: If you write a migration with a `RunPython` operation, and you use the documented `RunPython.noop` as the reverse action (or forward action, but that is much less likely...), then all looks well, until you try to squash that migration; then, things blow up. Since master no longer supports Python 2, the ticket was closed "wontfix" by core. However, I think that if we can easily fix the problem in 1.11, then we should; that version is still supporting Python 2 and will do so for several years. 1.11 is now feature frozen, but this is a bugfix, not a new feature; and the fix is 6 lines[2] (in production code) that won't make you cringe too much. I suggest that we re-open this ticket and solve it in the 1.11.x branch. Thanks, Shai. [1] https://code.djangoproject.com/ticket/25192 [2] https://github.com/django/django/compare/stable/1.11.x...shaib:ticket_25192?expand=1