Re: injecting settings

2019-05-07 Thread Dan Davis
Christian, I do this in my internal and private module that depends on django-cas-ng. django-cas-ng provides default settings in an __init__.py file that predates app.py and ready. My strategy is that if you wish to depend on another app in this way, it is best to shadow it entirely. For exam

Re: injecting settings

2019-05-07 Thread Tom Forbes
I think what you are describing is a hard problem(tm) with no clear and generic way to solve it. Django doesn’t have the concept of a dependency tree in apps, and while this is annoying in some cases there isn’t much we can do to solve it. If I understand your proposition, it would inevitably in

Re: injecting settings

2019-05-07 Thread Christian González
Sorry about writing, and not testing myself before: > 2. Set a default value at import time: > > # apps.py > > from django.apps import AppConfig > from django.conf import settings > > class MyAppConfig(AppConfig): >     name = 'my_app' >     verbose_name = "..." > >     def ready(self): >        

Re: injecting settings

2019-05-07 Thread Christian González
> 1. Like Adam suggested, access settings like this: getattr(settings, > 'MY_SETTING', 'my_default'). > > This works well when you access settings just once, probably at import > time, and cache their value. > > Here's an > example:  > https://github.com/aaugustin/django-sesame/blob/070cdb3fcdfa6c

Re: injecting settings

2019-05-07 Thread Aymeric Augustin
> On 7 May 2019, at 17:49, Christian González > wrote: > Apps should have the possibility to add DEFAULT settings to the Django global > settings. As already mentioned in my plugin system question, I don't see a > problem with app/settings loading order. The loading order is done in > INSTALLE

Re: GSoC Proposal (FormSet Improvement)

2019-05-07 Thread PARTH PATIL
Thank you, Asif. And yes surely I would like to take forward your work, and it will surely help me in my project. On Tue, May 7, 2019 at 6:58 PM Asif Saif Uddin wrote: > Congrats Parth. It would be great If your contributions could be accepted > in the next versions of django, I have some od wo

Re: Summer Internships

2019-05-07 Thread Asif Saif Uddin
This not the list you are looking for. This list is for development of django itself. django-users is the list you are looking for. ./auvipy On Tuesday, May 7, 2019 at 7:57:57 PM UTC+6, Akshit Jain wrote: > > Hi all! > I am Akshit Jain 2nd year cse undergraduate, I am an open source > contribut

Re: injecting settings

2019-05-07 Thread Christian González
Hi Americ, thanks for answering THAT elaborative (I first thought that it#s a typical newbie question). > > When you say this is not possible, I assume you are referring to my > work on app-loading in Django 1.7. Here's what comes to mind. Yes. > [...] > > Finally, this would mean that pluggable

Re: injecting settings

2019-05-07 Thread Aymeric Augustin
Hello Christian, I'm not aware of any plans in this area. When you say this is not possible, I assume you are referring to my work on app-loading in Django 1.7. Here's what comes to mind. There's a chicken'n'egg problems if an app modifies INSTALLED_APPS during app loading. This is a common idea

Re: injecting settings

2019-05-07 Thread Adam Johnson
If your django apps have default settings, they can use getattr(settings, 'MY_VALUE', default) For third party apps I've often used an object with a bit of logic to encapsulate these defaults, especially useful in the face of app changes. For example: https://github.com/adamchainz/nexus/blob/maste

Re: injecting settings

2019-05-07 Thread Carlton Gibson
Also see the django-appconf app: https://github.com/django-compressor/django-appconf This is used by django-compressor (hence it's home) and others to add (and allow overriding) per-app settings. -- You received this message because you are subscribed to the Google Groups "Django developers

Re: injecting settings

2019-05-07 Thread Christian González
I myself am using an implementation like DRF does it: https://github.com/encode/django-rest-framework/blob/e16273a6584f9657c1e5c388558e9c5c92e7ba38/rest_framework/settings.py They create a class "APISettings", and mimic the Django behaviour. Dand graphene-django has adapted it already and change

Re: injecting settings

2019-05-07 Thread J. Pic
Great idea Christian, actually some frameworks have this kind of feature, such as CakePHP, in which apps can also inject urls and middlewares for example. This would be a huge step forward for the ecosystem (and when apps can share node modules you're done haha !). -- You received this message b

injecting settings

2019-05-07 Thread Christian González
Hi, I know this is a bit of a question half development, half usage of django. I'd like to create an django app which has sub apps which inject automatic code into settings. This is not possible, as the docs say. Are there plans in development to enable that? It's not necessary to "change" setti

Re: GSoC Proposal: Add Cross-DB JSONField, ArrayField, and HStoreField

2019-05-07 Thread Carlton Gibson
Hey Sage, Hey Parth. First-off welcome on board! 🙂 The goal for the next couple of weeks is to get more deeply involved, whilst I guess you start thinking about your projects too. You can follow here, the dashboard and the timeline

Summer Internships

2019-05-07 Thread Akshit Jain
Hi all! I am Akshit Jain 2nd year cse undergraduate, I am an open source contributor and works in django. I build 2-3 projects in django and now I am in search of summer internship as per my skills, also I am ready to learn new skills as per requirements I am ready to work remotely as well , so

Re: GSoC Proposal (FormSet Improvement)

2019-05-07 Thread Asif Saif Uddin
Congrats Parth. It would be great If your contributions could be accepted in the next versions of django, I have some od works related to declarative formsets. I will clean them up and bring to you so that you can move that forward with mentors/communities help. Best of luck. On Tuesday, May 7,

Re: GSoC Proposal (FormSet Improvement)

2019-05-07 Thread PARTH PATIL
Hello everyone, I would like to thank everyone here and everyone who helped me to improve my project idea. This project has been accepted and I will try my best to completewhatvI have promised. I was wondering what is the next step? Are there any kind of formalities to be completed? Best Regards

Re: GSoC Proposal: Add Cross-DB JSONField, ArrayField, and HStoreField

2019-05-07 Thread parthvin
I had the same doubt in my mind, what is the best medium to contact mentors? -- 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

Re: GSoC Proposal: Add Cross-DB JSONField, ArrayField, and HStoreField

2019-05-07 Thread Sage M.A.
Hello everyone, I would like to thank everyone in here and everyone involved in Django's GSoC participation. This project has been accepted and I will try my best to deliver. On a side note, do we have any communication channel other than this mailing list and IRC? I don't mind using them, but