Re: About #8500 and #27728

2018-01-21 Thread Raffaele Salmaso
Hi Carlton,

On Sat, Jan 20, 2018 at 9:13 AM, Carlton Gibson 
wrote:

> Hi Raffaele,
>
> Thanks for both your effort and your patience.
>
> There are around 60 patches needing review (or just reviewed or being
> improved or...) at the moment, so it can take a while to get to.
>
> I will look at this issue on Monday.
>
Thanks!


> Please don't loose heart. 
>
Don't worry


> Kind Regards,
>
> Carlton
>
>
> On Friday, 19 January 2018 22:41:22 UTC+1, Raffaele Salmaso wrote:
>>
>> Hi all,
>> as these PR have merge conflicts that need to be resolved, and it takes
>> time to keep that ready to merge, I would be glad to know if continue to
>> work on them (and how to get them merged) or just drop them and carry on.
>>
>> Thanks
>>
>> On Tue, Sep 5, 2017 at 10:57 AM, Raffaele Salmaso 
>> wrote:
>>
>>> Hi all,
>>> I'm working to ticket #8500 and #27728 to improve a bit the admin, and
>>> being asked to ask to django-developers about some decision.
>>>
>>> In ticket #8500 I've used a LazyObject to defer the the real
>>> django.contrib.admin.sites.site instantiation, so admin.site is always
>>> the custom one.
>>> The first approach was simpler, with a setting. But as Tim pointed out
>>> it doesn't need to be a setting, so I rewrote to be a custom field for
>>> (Simple)AdminConfig (and django itself doesn't need to know it existence)
>>>
>>> Currently I'm monkey patching in my custom admin setup (
>>> https://bitbucket.org/rsalmaso/django-fluo is my own utility library)
>>>
>>> > class FluoAdminConfig(AdminConfig):
>>> > default_site = "fluo.admin.sites.AdminSite"
>>> >
>>> > def ready(self):
>>> > self.override_admin_site()
>>> > super().ready()
>>> >
>>> > def override_admin_site(self):
>>> > from django.contrib import admin as django_admin
>>> > from django.contrib.admin import sites as django_sites
>>> > from fluo import admin as fluo_admin
>>> > from fluo.admin.sites import DefaultAdminSite
>>> >
>>> > site = DefaultAdminSite()
>>>
>>> where the DefaultAdminSite is the same as in PR
>>> > class DefaultAdminSite(LazyObject):
>>> > def _setup(self):
>>> > AdminSiteClass = import_string(apps.get_app_con
>>> fig('admin').default_site)
>>> > self._wrapped = AdminSiteClass()
>>>
>>>
>>> I think it is a better approach than the Jannis' one (
>>> https://code.djangoproject.com/attachment/ticket/8500/8500.1.diff), as
>>> Adam claims it is simpler, because
>>> - it doesn't require to rewrite your admin.py to add an helper function
>>> in admin.py
>>> > def register(site):
>>> > site.register(...)
>>> - it works with all current third party modules (so don't have to add a
>>> custom adapter in my own project)
>>> - can use the @admin.register() decorator as is
>>>
>>> Currently all my projects use this approach, and I'm really happy
>>> because I find no problem with 3rd apps, they always use my custom
>>> instance, and don't have two different site.
>>>
>>> In ticket #27728 I've rewrite all include template tags (submit_row,
>>> pagination, admin_actions, search_form, date_hierarchy, result_list,
>>> prepopulated_fields_js, object_tools) to be overridable by the "standard"
>>> admin pattern (["admin/app_label/app_model/template_name",
>>> "admin/app_label/template_name", "admin/template_name"]).
>>> This patch solves even the tickets #11974, #12566, #18957, #19235,
>>> #26763.
>>> Choose to patch all include tags because:
>>> - I have a project where I override all of them (!)
>>> - they are all the same implementation, so easy to replicate
>>>
>>> The approach is to create a custom InclusionAdminNode, which handle all
>>> common task to split the include parameters, select the correct template
>>> and wrapping the original tag function (which are never changed).
>>>
>>> Hope this clears all intentions and have them in django 2.0 :)
>>>
>>> --
>>> | Raffaele Salmaso
>>> | https://salmaso.org
>>> | https://bitbucket.org/rsalmaso
>>> | https://github.com/rsalmaso
>>>
>>
>>
>>
>> --
>> | Raffaele Salmaso
>> | https://salmaso.org
>> | https://bitbucket.org/rsalmaso
>> | https://github.com/rsalmaso
>>
> --
> 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/ms
> gid/django-developers/9b5418c5-5828-40b0-8f3e-dac9d50fd26c%4
> 0googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 

Re: ManytoMany Field save_form_data has not support for through table

2018-01-21 Thread Andrew Standley
Hey Collin,
  I posted a new PR:  https://github.com/django/django/pull/9609
Let me know what your thoughts are.
I also updated the ticket.

Cheers,
Andrew

On Thursday, January 18, 2018 at 6:57:06 AM UTC-8, Collin Anderson wrote:
>
> Hi Andrew,
>
> Sure, do you want propose some tests? You could even open a new PR.
>
> Thanks,
> Collin
> 574-339-1060
>
>
> On Thu, Jan 18, 2018 at 12:40 AM, Andrew Standley  > wrote:
>
>> Hi Collin,
>>   The patch seems to work perfectly with intermediate models without 
>> required fields. 
>>
>> However looking over the pull request I noticed that there does not 
>> appears to be success tests for intermediate models with extra required 
>> fields.
>> Is this something I could help out with?
>>
>> Cheers,
>>   Andrew
>>
>>
>

-- 
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/f772338a-9871-43cc-a990-a7b27c47adc6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: django-sekizai, django-classy-tags unmaintained

2018-01-21 Thread Iacopo Spalletti
On 21/01/2018 02:47, Jonas Obrist wrote:
> Hi everyone,
> 
> Two dependencies of django
> CMS, https://github.com/ojii/django-classy-tags
> and https://github.com/ojii/django-sekizai (both mine) are unmaintained,
> because I no longer do Django work. Both are "done" from my point of
> view and "only" require maintenance when a new Django/Python version is
> out. Someone should take over these projects and it would make sense if
> that someone was either Divio or at least a django CMS core dev. Please
> let me know if there's someone willing to pick up this task, I'll need
> to know your PyPI user name and Github user name. To transfer the Github
> project, there must not be an existing fork of the project yet.

Hi jonas,

I was just reviewing the status of both and preparing the necessary
changes for 2.0
If the others core-dev are ok with it, 'I guess that moving to the divio
org and give pypi ownerships to the active django CMS core maintainers
would be a good strategy to keep them up-to-date

Thanks for your notice and enjoy our current endeavour!

Iacopo

> 
> Jonas
> 
> -- 
> Message URL:
> https://groups.google.com/d/msg/django-cms-developers/topic-id/message-id
> Unsubscribe: send a message to
> django-cms-developers+unsubscr...@googlegroups.com
> ---
> You received this message because you are subscribed to the Google
> Groups "django CMS developers" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to django-cms-developers+unsubscr...@googlegroups.com
> .
> To view this discussion on the web, visit
> https://groups.google.com/d/msgid/django-cms-developers/9ec1d71b-d878-446b-b196-0e306eea2d5c%40googlegroups.com
> .
> For more options, visit https://groups.google.com/d/optout.


-- 
Iacopo Spalletti

Nephila s.a.s. - Firenze
Telefono: +39 055 5357189
Assistenza Tecnica: +39 055 3985730
https://nephila.digital

-- 
Message URL: 
https://groups.google.com/d/msg/django-cms-developers/topic-id/message-id
Unsubscribe: send a message to 
django-cms-developers+unsubscr...@googlegroups.com
--- 
You received this message because you are subscribed to the Google Groups 
"django CMS developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-cms-developers+unsubscr...@googlegroups.com.
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/django-cms-developers/0a409b36-657b-eba2-421b-a90b0b1b0929%40nephila.it.
For more options, visit https://groups.google.com/d/optout.


signature.asc
Description: OpenPGP digital signature


Re: Ticket #29015

2018-01-21 Thread Adam Johnson
Please keep the conversation just on the pull request, and don't bug for
review after a day. There are many patches to review, and half the work is
done by volunteers in their spare time (I am one). Beware that there are 11,195
people subscribed to this mailing list.

On 21 January 2018 at 07:56,  wrote:

> Hello !
>
> I have updated the PR as per Adam's review. However, I have not changed
> L155 in backends/postgresql/base.py from
>
> if settings_dict['NAME'] is not None
>
> to
>
> if 'NAME' in settings_dict
>
>
> *None may be used to connect to the default 'postgres' db. *
>
> *However, "if 'NAME' in settings_dict" prevents KeyError, but would still
> return True if 'NAME' is assigned a 'NoneType'. *
>
> (Referred test_default_name method in tests/backends/base/test_
> creation.py)
>
> I tried testing Adam's suggestion on this, but it results in the following
> error:
>
> TypeError: object of type 'NoneType' has no len()
>
> The PR is still open and needs review.
>
> Thanks and regards !
>
> --
> 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/a494f2b1-3923-405b-8eed-
> 55f75497a239%40googlegroups.com
> 
> .
>
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Adam

-- 
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/CAMyDDM2MnmR72kRjF%3DB0tdrcdOU8Xv5QZ48Vz5JJV1r4gCD_LA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Ticket #29015

2018-01-21 Thread Florian Apolloner
You could use
```
if settings_dict.get('NAME') and len(settings_dict['NAME'])
```
if you wanted to prevent a KeyError too.

On Sunday, January 21, 2018 at 8:56:40 AM UTC+1, askpr...@gmail.com wrote:
>
> Hello !
>
> I have updated the PR as per Adam's review. However, I have not changed 
> L155 in backends/postgresql/base.py from 
>
> if settings_dict['NAME'] is not None
>
> to
>
> if 'NAME' in settings_dict
>
>
> *None may be used to connect to the default 'postgres' db. *
>
> *However, "if 'NAME' in settings_dict" prevents KeyError, but would still 
> return True if 'NAME' is assigned a 'NoneType'. *
>
> (Referred test_default_name method in tests/backends/base/test_creation.py)
>
> I tried testing Adam's suggestion on this, but it results in the following 
> error:
>
> TypeError: object of type 'NoneType' has no len()
>
> The PR is still open and needs review.
>
> Thanks and regards !
>

-- 
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/734ece8e-d543-47c0-b9d9-8dd2215df53e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.