Re: The problem of versioning a large project.

2023-04-08 Thread Christian González
e 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 view this discussion on the web visit https://groups.google.com/d/msgid/dj

Re: dynamically added INSTALLED_APPS

2023-02-26 Thread Christian González
y into settings.py, and step through dependency installation, etc. GDAPS tries to create a framework for that, at least for the backend (+  Django templates). No frontend supported any more (Vue.js was in exploration). Hope you can see what I want to achieve. Christian On Thursday, Februar

Re: dynamically added INSTALLED_APPS

2023-02-23 Thread Christian González
be sure everything is installed as intended, and just order INSTALLED_APPS like I want to. But it's not perfect, I know. So thanks Jörg for your helpful comment. I wasn't quite sure about if I did something stupid. And thanks for your all engaging in Django, it's really a g

Re: dynamically added INSTALLED_APPS

2023-02-23 Thread Christian González
Am 22.02.23 um 22:37 schrieb Jörg Breitbart: Am 21.02.23 um 22:05 schrieb Christian González: My original question was HOW would I implement this in a "good-practice" way, by not violating Django's conventions, and showing a way it could be done clean. I think thats not

Re: dynamically added INSTALLED_APPS

2023-02-21 Thread Christian González
c. Which gets bulky when using 20+ plugins, and maintaining 300 different appliances (for 300 customers) with different (and dynamically changing) plugins. So again, does anything stand against loading plugins' INSTALLED_APPS from a plugin's root module? Is there a better approach

Re: dynamically added INSTALLED_APPS

2023-02-20 Thread Christian González
rom the same vendor. There is no trust problem when installing your own packages. Christian -- Dr. Christian González https://nerdocs.at -- You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group. To unsubs

dynamically added INSTALLED_APPS

2023-02-20 Thread Christian González
even creepier to me. Eager to hear your opinion here. -- Dr. Christian González https://nerdocs.at -- 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 r

PermissionRequiredMixin not importable before apps ready?

2023-02-07 Thread Christian González
ut reduces the same loading time at startup. Which is neglegible IMHO. Please tell me if I'm completely wrong - or if this is worth a bug report/PR. Christian -- Dr. Christian González https://nerdocs.at -- You received this message because you are subscribed to the Google Groups "Djang

Re: django squashmigrations creating incorrect code?

2022-12-23 Thread Christian González
HM wouldn't it be better to add a stdout message after completing the squash? Because if the cmd doesn't say anything, the user assumes that everything went well. I wasn't aware of squash migrations being even that smart to recognise RunPython methods. So a stdout.write() with more or less this

Re: django squashmigrations creating incorrect code?

2022-12-22 Thread Christian González
AH, sorry. Just saw it: # Functions from the following migrations need manual copying. # Move them and any dependencies into this file, then update the # RunPython operations to refer to the local versions: # medux.core.migrations.0001_initial Am 22.12.22 um 22:12 schrieb Christian González

django squashmigrations creating incorrect code?

2022-12-22 Thread Christian González
edux.core.migrations.0001_initial.create_admin_user,    ^ SyntaxError: invalid decimal literal So I suppose that is not intended. Is this a django bug? Should I file this as issue? Cheers, Christian -- Dr. Christian González https://nerdocs.at -- You received this mes

rename internal SetPasswordForm.user into "instance" - or add it

2022-11-24 Thread Christian González
and add a second (optional) parameter named "instance"? The form could then just decide in __init__ if (user|instance) is present, and save the one that is present as self.user. This would ensure that the view could also call it with "instance", both would work. Anythi

ModelForm fields localization

2022-09-05 Thread Christian González
didn't understand why ModelForm does NOT localize fields in the first place per default. You may have a good reason for that. Christian -- Dr. Christian González https://nerdocs.at -- You received this message because you are subscribed to the Google Groups "Django developers (Cont

ModelForm field autofocus

2022-08-26 Thread Christian González
"" autofocus = None def get_form(self, form_class=None):form = super().get_form(form_class) if self.autofocus in form.fields: form.fields[self.autofocus].widget.attrs.update({"autofocus": True}) return form Is this worth including in Django core? Christian -- Dr. Chr

AppConfig subclass-subclass ignored

2022-02-05 Thread Christian González
AppConfigs only as proxy with a pointer to that model... I kindly ask for your opinion here. Christian -- Dr. Christian González https://nerdocs.at -- You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group

Re: Idea

2021-10-21 Thread Christian González
om <https://groups.google.com/d/msgid/django-developers/CAMjc0xUSKYUgJrrUOTscr0%2BT8xLABqwF%3DK9BmDANyLVTuNS%2BKQ%40mail.gmail.com?utm_medium=email&utm_source=footer>. -- Dr. Christian González https://nerdocs.at -- You received this message because you are subscribed to the Google Groups "

Re: Developing an SPA version of Django admin

2021-10-16 Thread Christian González
s/c29b745c-21d5-46c8-ab51-312b1a73114dn%40googlegroups.com?utm_medium=email&utm_source=footer>. -- Dr. Christian González https://nerdocs.at -- You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.

optionally show all models in admin per default in DEBUG

2021-09-28 Thread Christian González
.site.register(model)     except admin.sites.AlreadyRegistered:     pass It would help getting started with Django more quickly. -- Dr. Christian González https://nerdocs.at -- You received this message because you are subscribed to the Google Groups "Django developers (Contributions to

deconstruct returns 3-tuple?

2021-09-18 Thread Christian González
eturn (self.name, path, [], keywords) This is a 4-tuple, and even the clone() method written after it calls it with name, path, args, kwargs =self.deconstruct() So, is 3.2 documentation here on a <1.9 status? Am I understanding something not correctly? Thanks, Christian -- Dr. Christian

Re: TemplateCommand

2021-06-29 Thread Christian González
Am 28.06.21 um 10:44 schrieb 'Adam Johnson' via Django developers (Contributions to Django itself): > Plus, it's not *that* much code to "take inspiration from" in your own > project, test, and change as you see fit. That's true... ;-) -- Dr. Christian

TemplateCommand

2021-06-28 Thread Christian González
eplace Django's TemplateCommand with it and inherit from it, I could bring it into shape. Please drop me a line. Best regards, Christian -- Dr. Christian González https://nerdocs.at -- You received this message because you are subscribed to the Google Groups "Django developers (Contr

Re: deep frontend integration

2021-01-21 Thread Christian González
ctory. Which is kind of nonsense - BUT, like I asked, could it be a possibility to automate this process, to enable HMR for development? Christian Am 22.01.21 um 08:43 schrieb Christian González: Hello Django community, caution: long post, TL;DR at the bottom. in the past months, I

deep frontend integration

2021-01-21 Thread Christian González
-compressor with a plugin for that. Sorry, no HMR here during development including e.g. Vue or Alpine dynamically comes close to my ideal, but I think a Js compile step is needed. Do you have any thoughts here, hints about how to do that? Mission impossible? Best regards, Christian --

Re: Feature request: Possibility to declare transactions as read only

2020-07-01 Thread Christian González
Am 01.07.20 um 20:28 schrieb charettes: Do you think that allowing a readonly boolean flag[0] to be specified in OPTIONS per connection like we do for isolation level[1] could work for your use case? From my experience this particular problem is usually dealt with by using database routers

Re: Proposal: django project name

2020-05-15 Thread Christian González
O, see possible dynamic nature like https://code.djangoproject.com/ticket/31527). So I thought that Django providing a project name (which IS the import path of the main application) would be a good idea. Anyway, my own project will require a PROJECT_NAME variable, because of this template overr

Proposal: django project name

2020-05-13 Thread Christian González
mplicit, so why not a) create a setting (which is created by django-admin createproject along with the other parsed templates) named PROJECT_NAME o DJANGO_PROJECT_NAME or b) (because settings are not used in wsgi.py, manage.py etc.) create it earlier in the process - or does it have to be wri

Re: GDAPS

2020-01-13 Thread Christian González
Oh, sorry, I just saw that this is discussed (andanswered) in the PR. Am 13.01.20 um 23:03 schrieb Christian González: > > Eh, sorry if I misunderstand - but adding a "default = true" line to > an AppConfig is the same as addign default_app_config = > "foo.apps.FooCon

Re: GDAPS

2020-01-13 Thread Christian González
love to get some feedback on the design before I polish the patch. > > Best regards, > > --  > Aymeric. > > > >> On 10 Jan 2020, at 14:18, Christian González >> > <mailto:christian.gonza...@nerdocs.at>> wrote: >> >> >> Am 08.01.2

Re: GDAPS

2020-01-10 Thread Christian González
e app name only - is ok. I would bet that the vast majority of apps don't have two AppConfigs. And to urge all devs to use the more elaborative AppConfig line in INSTALLED_APPS, just to make such special cases (and THESE are the special cases!) are possible, is wrong IMHO. Let it be

Re: GDAPS

2020-01-05 Thread Christian González
/h in 50 speed limit on the street, when everyone else drives 55. Even Google allows it's self driving cars to drive faster than the limit by 10% in some cases ;-) What I mean is: Why don't you drop that recommendation - when noone is using it - more than one AppConfigs still *are* possi

Re: declarative settings

2020-01-05 Thread Christian González
o forget overriding settings, there only remains the easy settings access via one object, which would be great. Christian -- Dr. Christian González https://nerdocs.at -- You received this message because you are subscribed to the Google Groups "Django developers (Contributions t

Re: declarative settings

2020-01-05 Thread Christian González
ve config, installed apps would be defined already - and their paths should be possible to determine by then. So *their* declarative settings could be found and merged as well. Christian -- Dr. Christian González https://nerdocs.at -- You received this message because you are subscribed to the

Re: declarative settings

2019-12-31 Thread Christian González
Hi all, thanks for your fast response - it seems that this is not a "ah, forget it, boooring." theme. I'll try to answer all (for me) relevant things at once here - sorry to write such a huge mail. *@Adam Johnson:* > * A class to read django.conf.settings and add defaults/other logic > through pr

declarative settings

2019-12-30 Thread Christian González
m * load settings.py which allows to override them again (using some special code tricks like dynamic loading, environments etc.) Please tell me what you think about that. Christian -- Dr. Christian González https://nerdocs.at -- You received this message because you are subscribed to the

Re: app_get_config(app_label).path as only way to get an app's path

2019-11-11 Thread Christian González
>  if there are more than one packages with the same label? > > Two apps cannot have the same label. One of them must be relabeled as > described > in  > https://docs.djangoproject.com/en/2.2/ref/applications/#django.apps.AppConfig.label. OMG. Are in great advantage - those who can read. > > If a

app_get_config(app_label).path as only way to get an app's path

2019-11-10 Thread Christian González
Hi all, I recently found a problem - maybe I didn't get everything, but the docs say that, if you want to get an app's path, you should use get_app_config(app_label).path. Now, passing the app_label is handy if you have few packages installed, but it comes to name clashes if there are multiple pa

Re: django-admin startproject settings.py has some security holes

2019-10-11 Thread Christian González
web visit > https://groups.google.com/d/msgid/django-developers/CA%2BB1BD6kxbSR_fOwAWxY%3DtjRA30YPcYVt87%2BHguOKyZBOnHnuQ%40mail.gmail.com > <https://groups.google.com/d/msgid/django-developers/CA%2BB1BD6kxbSR_fOwAWxY%3DtjRA30YPcYVt87%2BHguOKyZBOnHnuQ%40mail.gmail.com?utm_medium=email&u

Logging in management commands

2019-09-28 Thread Christian González
Hi, i just stumbled upon logging in management commands I saw that there is an own system of logging. When creating custom mgmt cmds, you have to write logging output to     if options["verbosity"] >= 2:         sys.stdout.write(message) this is a little inconvenient, and much less DRY as e.g.

Re: docs request: signals documentation warning

2019-09-22 Thread Christian González
Am 22.09.19 um 20:53 schrieb Cesar Canassa: > > Dispatching a signal to a handler is an implicit function call. > > I think that's a good one to include as well, some people get the > impression that the signals are an async Celery-like process. definitely. That's completely new to me e.g. I thoug

Re: Oracle DB table prefix missing

2019-09-17 Thread Christian González
are named. What you really want is a db_schema_name or something. I think this long, old ticket is related https://code.djangoproject.com/ticket/6148On Tue, Sep 17, 2019 at 10:27 AM Christian González <christian.gonzalez@nerdocs.at> wrote:Hi, I don't know if this is a missing feature

Oracle DB table prefix missing

2019-09-17 Thread Christian González
something completely wrong and it's just my missing configuration? thanks, Christian -- Dr. Christian González https://nerdocs.at -- You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group. To unsubscr

Re: Redis cache support in core

2019-09-05 Thread Christian González
s group and stop receiving emails from it, send > an email to django-developers+unsubscr...@googlegroups.com > <mailto:django-developers+unsubscr...@googlegroups.com>. > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-developers/10675445-9101-4F5A

Re: Discussing improvements of django.setup()

2019-07-02 Thread Christian González
Am 01.07.19 um 23:24 schrieb Pkl: > > Regarding django.setup() tweakability, the generic need is simply to > have a hook, somewhere for users to put early init code, regardless of > the way django is launched. Code that needs to execute this early are > mostly (if not all) monkey-patching the envi

Re: GDAPS

2019-06-19 Thread Christian González
I'd like to ask another question concerning plugin apps, and hoping your deeper knowledge about Django internals helps here... I'm implementing the plugin Metadata for GDAPS plugins ATM, and am a bit concerned wether to implement a construct like the Pretix system or not. Pretix uses AppConfig cl

Re: GDAPS

2019-06-18 Thread Christian González
>> But here it is too late. settings.py continues, and *afterwords* all the >> apps are scanned for their settings. you can't override them again in >> settings.py after that. > I'm a little unclear here. > > Is it too late because you want to be able to exclude settings from > packages that are in

Re: GDAPS

2019-06-17 Thread Christian González
> I've given some thought to this over the years, and what I think we've > somehow missed in settings until now is ... Namespaces! I can second this from my POV, having "evaluated" a few plugin systems now. > Any plugin or app ought be able to declare its own settings and their > defaults. And

Re: GDAPS

2019-06-16 Thread Christian González
Am 16.06.19 um 10:06 schrieb Adam Johnson: > * Your “homepage” link on PyPI is example.com . > The usual thing to do here is link to your source host or docs. Set > this as url in your setup.py. Sure. Forgot this when switching from setup.py to setup.cfg. Corrected, thanks. > *

GDAPS

2019-06-15 Thread Christian González
Hi all, sorry, I never managed to introduce myself properly to this mailing list. Christian Gonzalez, more or less hobby programmer, MD as day job. I maybe never will add something substantial to Django core itself, but ATM "scratching my own itch" here: Just wanted to say that I finished "Alpha

Re: injecting settings

2019-05-09 Thread Christian González
e.g. urlpatterns - apps should be able to inject them too. I found a way that works in GDAPS, using my (adapted from pyutilib) plugin system. The main settings/urls.py file could/should always be the master - this is different in every application. Think of ordering urls. Christian -- Dr. Chris

Re: injecting settings

2019-05-07 Thread Christian González
} } ) And the app webpack_loader is located *after* this app in INSTALLED apps. Within webpack-loader, the settings dict WEBPACK_LOADER inclusive "foobar" is available. So this is kind of "solved" for me - but - it's a bit of a hack. I'd r

Re: injecting settings

2019-05-07 Thread Christian González
is MY_SETTING is not available globally then? E.g. by apps that are ordered below the app in INSTALLED APPS that declared MY_SETTING? > Here we're talking about something slightly different: formalizing how > an application can declare default values for its own settings — > essentiall

Re: injecting settings

2019-05-07 Thread Christian González
value (Sorry for this maybe shitty code hack) Which then loads everything from installed apps - and later lines would override these "defaults"...? I don't even know if this is possible. Christian -- Dr. Christian González https://nerdocs.at -- You received this message becaus

Re: injecting settings

2019-05-07 Thread Christian González
ail.com > <https://groups.google.com/d/msgid/django-developers/CAC6Op1-31f1bimWFsWG9PA8oqu1rRErurkUFnXr6%3D8FyrWfEYg%40mail.gmail.com?utm_medium=email&utm_source=footer>. > For more options, visit https://groups.google.com/d/optout. -- Dr. Christian González https://nerdocs.at -- You re

injecting settings

2019-05-07 Thread Christian González
o load settings from apps too, e.g. with a hook like having .settings.py? which are merged into the main settings? Is this considered as security risk? Thanks, Christian -- Dr. Christian González https://nerdocs.at -- You received this message because you are subscribed to the Google Group

Re: Proposal to format Django using black

2019-04-30 Thread Christian González
.org/git/20190410162409.117264-1-b...@google.com/ So on the long run, no need for git-hyper-blame. Christian -- Dr. Christian González https://nerdocs.at -- You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" gr

Re: Proposal to format Django using black

2019-04-16 Thread Christian González
y enough for "git with blake skip support" too. And, as it's only for development, It would be fully backwards compatible for git users that don't have support for that feature - they could always use black/git and skip blame the "old" way. That said, I hope black will

Re: Proposal to format Django using black

2019-04-14 Thread Christian González
ying that I'm completely insane, or git already has this feature, or Ii forgot something, I could try and add a git feature request for that. Even if implemented in 2 years, It could be made sure later that git blame worked correctly backwards then. TL;DR: Use black with Django without compromi

Re: Potential suspension of Channels development

2019-01-23 Thread Christian González
;. 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/b357add7-cd44-4c12-b29b-0d28150417a2%40googlegroups.com <https://groups.google.com/d/msgid/django-developers/b357add7-cd44-4c12-b29b-0d281

Reactive frontend using Django templates?

2018-11-25 Thread Christian González
Vue.JS could be a candidate to create that. I am currently experimenting in adding a plugin system to Django in form of an app "GDAPS" - Generic Django App Plugin System, find it on PyPi/Gitlab. It's in a very, very rude state at the beginning, and I am not an experienced developer. But I'd like t

Re: Dynamic app loading

2018-08-01 Thread Christian González
Hello Raphael, Thanks for your very, very helpful explanations. Just another 2 questions: I saw that you did two things: 1.: you created a "class ReportsApp(AppConfig):" in /plugins/reports/__init__.py - according to the Django docs[1] this should go into /plugins/reports/apps.py Why in the root

Re: Dynamic app loading

2018-07-31 Thread Christian González
Hi Raphael, > we are doing such a thing for quite a while in our open source project > pretix[1]. Whow, I'm quite impressed. Never stumbled upon that. I'll recommend that for some collegues (to use it...) But about the internals: Nice, this was the first way I implemented that as well, and maybe I

Dynamic app loading

2018-07-29 Thread Christian González
Hello DjangoDevs, I'm new here to this group, and to be honest, just a "fake" developer. Doing that is not my main job. So please be patient with my maybe BadIdea(tm). Another warning: much text. Hint: there is a TL;DR at the end. I stumbled upon a "missing feature" in Django, which I call "dyna