[Yahoo-eng-team] [Bug 1957931] [NEW] OVS: except MappingNotFound instead of KeyError

2022-01-14 Thread James Pic
Public bug reported: LocalVlanManager.pop() swallows KeyError to raise MappingNotFound: https://github.com/openstack/neutron/blob/master/neutron/plugins/ml2/drivers/openvswitch/agent/vlanmanager.py#L110 OVSNeutronAgent.reclaim_local_vlan() excepts a KeyError: https://github.com/openstack/neutron/

[Yahoo-eng-team] [Bug 1956435] [NEW] OVS: support multiple segments per host

2022-01-05 Thread James Pic
Public bug reported: Currently, we can't add more segments to a host because of this hardcoded limitation: https://github.com/openstack/neutron/blob/master/neutron/objects/subnet.py#L346-L355 However, simply removing this limitation allows to add more segments (which means more ips) to a single h

[Desktop-packages] [Bug 1761382] Re: Unable to connect to ibus: Could not connect: Connection refused

2018-09-13 Thread James Pic
Breaks importing firefox data into brave browser. -- You received this bug notification because you are a member of Desktop Packages, which is subscribed to ibus in Ubuntu. https://bugs.launchpad.net/bugs/1761382 Title: Unable to connect to ibus: Could not connect: Connection refused Status i

[Touch-packages] [Bug 1761382] Re: Unable to connect to ibus: Could not connect: Connection refused

2018-09-13 Thread James Pic
Breaks importing firefox data into brave browser. -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to ibus in Ubuntu. https://bugs.launchpad.net/bugs/1761382 Title: Unable to connect to ibus: Could not connect: Connection refus

[Bug 1761382] Re: Unable to connect to ibus: Could not connect: Connection refused

2018-09-13 Thread James Pic
Breaks importing firefox data into brave browser. -- You received this bug notification because you are a member of Ubuntu Desktop Bugs, which is subscribed to gnome-shell in Ubuntu. https://bugs.launchpad.net/bugs/1761382 Title: Unable to connect to ibus: Could not connect: Connection refused

[Bug 1761382] Re: Unable to connect to ibus: Could not connect: Connection refused

2018-09-13 Thread James Pic
Breaks importing firefox data into brave browser. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1761382 Title: Unable to connect to ibus: Could not connect: Connection refused To manage notificatio

Re: DJANGO_SETTINGS_FILE

2017-04-09 Thread James Pic
Thanks friends, of course Daniele for the backup, and also James for the advice of course now that my first emotional reaction is over - thanks for your tolerance. Thanks for reading pretty much everything I have on this subject, looking forward to read feedback from all django-dev contributors of

Re: DJANGO_SETTINGS_FILE

2017-04-08 Thread James Pic
tl;dr I'm not debating deployment here: my automated deployments are fine the way it is today: I love linux and env vars, shells and subshells and so on. I'm /reporting/ that users have been fighting the lack for DJANGO_SETTINGS_FILE for as long as I can remember. In many case, they loose the fi

Re: DJANGO_SETTINGS_FILE

2017-04-08 Thread James Pic
Tobias, Adam, I have "imagined" you this dialogue where you're helping people deploy an open source citizen lobbying tool in Django in an NGO was not to make you look bad of course, the intention was rather the inverse of that. This situation, and exact dialogue, I have actually had, see the source

Re: DJANGO_SETTINGS_FILE

2017-04-08 Thread James Pic
Le 7 avr. 2017 10:43 PM, "James Bennett" a écrit : > On Thu, Apr 6, 2017 at 5:22 PM, James Pic wrote: > >> Do I need this to deploy my projects ? No of course, because I use the >> prettiest way hhihihi ;) I'm more than happy to win a debate >> > > Ple

Re: assertRaises vs. assertRaisesMessage

2017-04-07 Thread James Pic
Without diving into implementation details, I recon I've been taught the same as Shai. An exception type should have only one purpose, thus testing the type /should/ be sufficient imho. That said, if you want to TDD the message, you're going to code a test for it, is there really another way ? ;)

Re: DJANGO_SETTINGS_FILE

2017-04-06 Thread James Pic
There are indeed a nice handful of apps out there that help doing this in different manners. While we're at it, my own way is to make every project a python package with a setup.py. So the settings can always be imported. Then I let docker swarm or kubernetes handle environment variables which are

DJANGO_SETTINGS_FILE

2017-04-06 Thread James Pic
Hi all! Life with DJANGO_SETTINGS_MODULE has been great. However, it requires the settings to be an importable module. In most cases, this is a straight forward "simple" python script. Sometimes it looks like it could make sense to add an environment variable that could use a file that is not imp

Re: Django versioning and breaking changes policy

2017-04-05 Thread James Pic
I think people are always going to run into such kind of issues until they decide to add django-master to their test matrix​, so that each dependency and project should always have the chance to be ready for the next version of Django "0day". But perhaps I'm missing something. Best James -- You

Re: Will asgi become a PEP like wsgi is ?

2017-03-13 Thread James Pic
On Mon, Mar 13, 2017 at 12:58 PM, Etienne Robillard wrote: > > As far I know Django channels is a Django framework enforcing a specific > messaging protocol in mind. Honnestly I thought the messaging protocol was just msgpack. > I don't see how implementing ASGI could help to build more scalabl

Re: Will asgi become a PEP like wsgi is ?

2017-03-13 Thread James Pic
On Mon, Mar 13, 2017 at 12:26 PM, Etienne Robillard wrote: > ASGI is for building platform-oriented web applications in Django. Could you elaborate on this ? The only mention of Django I found in the spec linked by the OT is "Django Channels ships with a no-op consumer attached by default; we rec

Re: Will asgi become a PEP like wsgi is ?

2017-03-13 Thread James Pic
I do not see myself using Django without Channels anymore, it's become a basic Django feature for me and I just love it. Despite my perhaps lack of knowledge about the protocol internals, such features seem like it would certainly benefit the Python community and anyway I'd say it's worth a try jus

Re: Database connection retry

2017-03-07 Thread James Pic
It seems like we have 2 kind of issues: - code broke runserver, - network broke runserver. In the first case, runserver waits for a code reload event which is perfect ;) In the second case, runserver also waits for a code reload event, which is not very intuitive after fixing a network error. So

Re: Database connection retry

2017-03-07 Thread James Pic
It works on SyntaxErrors because updating the code triggers a reload, but if the check fails for something that's not related to code (db conn, redis conn...) then it's stuck and we have to manually interrupt runserver to start it again, unless we touch some code just to trigger the reload as you m

Re: Decoupling forms from models

2017-03-07 Thread James Pic
Sure, this probably involves allowing Form instance definition by composition with a new object (ie. FormConfiguration, ModelFormConfiguration ...) rather than by subclassing Form or ModelForm. I'll make a complete writeup about it ala Diderot then haha -- You received this message because you a

Re: Database connection retry

2017-03-07 Thread James Pic
Thanks for sharing some of your insight Aymeric, if I'm not mistaken then the auto-reload feature/case invalidates Shai's suggestion: would you recommend that the runserver process exits with non-zero when a check fails rather than being stuck waiting for another code change to trigger a reload, so

Re: Feature idea: forms signals

2017-03-07 Thread James Pic
Seems similar to this discussion: https://groups.google.com/forum/#!searchin/django-developers/forms%7Csort:relevance/django-developers/zG-JvS_opi4/wS-4PBfPBwAJ Yes, signal/slot is a pattern that allows quick and easy decoupling of components that have to work on the same payload, and I've been us

Re: Database connection retry

2017-03-05 Thread James Pic
until manage check; do sleep 1; done; manage runserver would work for me then, thanks Shai ! However, I'm still a bit puzzled by having a process that's just stuck when checks fail (if I understand correctly) is there any particular reason why it is this way ? If not, perhaps a retry or exit could

Re: Database connection retry

2017-03-05 Thread James Pic
Thanks for your feedback, the use case i was talking about is not quite valid anymore, since docker-stack and docker-compose v3 ​do handle dependencies. However, perhaps runserver could just exit if checks don't pass, which makes sense I think, allowing the optional use of a shell loop. I'd prefer

Re: Database connection retry

2017-03-01 Thread James Pic
Sometimes it's not started because some modern orchestration tools such as ansible-container and docker-compose (perhaps more) start everything at once, and django might be faster than the db, or I have to fix something with the db orchestration tool. I noted we might have the same issue with redi

Database connection retry

2017-03-01 Thread James Pic
Hi all, It seems like runserver won't retry to connect to the database after a failing connection. Once the db server is up, it looks like I have to restart runserver manually. If this is correct, may I suggest that we make runserver retry connecting to the database if it fails ? Thanks -- You

Re: Model translation and meta options

2017-02-15 Thread James Pic
On Wed, Feb 15, 2017 at 12:21 AM, Adam Johnson wrote: > Sorry for the terrible pun here, but I'd like to suggest the > meta-feature... allowing 3rd party apps to add their own options to Meta > classes. If there was a sensible API for this (or if Django just copied all > attributes defined in Met

Re: Presenting DCP, a compatibility layer for Django (feedback welcome)

2017-01-16 Thread James Pic
If you've been maintaining several django apps for several versions of Django (ie. stable, oldstable, lts) then it's pretty easy to imagine how useful this can be. The deprecation policy removes the need of a compatibility layer for code that should support only one version of Django, but does not

[FRnOG] [MISC] SaveTheLink

2017-01-13 Thread James Pic
Bonjour à toutes et à tous, Pensez-vous que le frnog devrait rejoindre le mouvement SaveTheLink: https://act1.openmedia.org/SaveTheLink Plus d'infos en FR: https://www.laquadrature.net/fr/save-the-link Merci pour votre attention Bonne journée James --- Liste de diffusio

Re: Decoupling forms from models

2016-12-24 Thread James Pic
There is a history of problems related to the coupling between forms and models. For example, when a user suggested to pass a field instance to the model field to make it default [0], or when I suggested to improve formfield [1]: it was rejected because it would increase the coupling between forms

Decoupling forms from models

2016-12-24 Thread James Pic
Hi all, Currently, the model fields define which form fields should be used for them by default. That's why we have to specify form stuff such as "blank" when declaring our model fields, and pretty much everybody would like to see a fix appear. Would it be possible to add a new option for users t

Re: #26369: default formfield callback override

2016-12-23 Thread James Pic
Thanks for your reply Adam ! To make it general purpose, perhaps we could make such a patch in Django and replace should_fixup by a signal ? -- You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group. To unsubscribe fr

Re: #26369: default formfield callback override

2016-12-23 Thread James Pic
Thanks a lot for your time and quick answer Adam ! The ModelFormMetaclass usage you suggest is not supported by Django at this point. Suggesting that doing it is easy and supported seems incorrect in my experience, starting with the fact that there is no documentation. There are a lot of problems

Re: #26369: default formfield callback override

2016-12-22 Thread James Pic
Absolutely ! If we don't want to monkey patch, we can use the other step: 4. get control on the flatpage form in the admin: https://gist.github.com/Kub-AT/3676137 Then, there's the fatpages use case. Fatpage is an imaginary fork of flatpages that adds create and edit views. In this case, we also n

Re: #26369: default formfield callback override

2016-12-22 Thread James Pic
Thanks for your suggestion Adam ! However, I have a feeling that to apply that technique on the flatpages use case we'd also have to: 4. Monkey patch django.contrib.models.FlatPage.content, 5. Override and deal with flatpages migrations from now on. The proposal removes the cost of steps 1., 3.,

Re: #26369: default formfield callback override

2016-12-22 Thread James Pic
Wow, nice memory Tim ! Yes it's a problem I've been trying to find a solution for during the last years. We've had a solution in DAL v2 by providing a custom model form which would make relation fields to a model that has an autocomplete registered use an autocomplete field by default. This soluti

#26369: default formfield callback override

2016-12-22 Thread James Pic
Hi all, I'm looking for a way to override the default form field widget for some fields of some model classes, at the project level. Currently, we have to override all the model classes for that. That's considerable as a hack, because we don't exactly want to "override the default in every form c

[ansible-devel] Re: Unable to use test-module to develop modules under Arch Linux

2016-12-16 Thread James Pic
On Friday, December 16, 2016 at 3:31:29 PM UTC+1, James Pic wrote: > > > Did you try something like b'ANSIBALLZ_WRAPPER = True' ? > > PS: this is just to try, then for the fix that will support both python 2 & 3 you'll have to use something like six, ie: https

[ansible-devel] Re: Unable to use test-module to develop modules under Arch Linux

2016-12-16 Thread James Pic
Hi Andrew, Did you try something like b'ANSIBALLZ_WRAPPER = True' ? Perhaps you can find more hints here: http://www.diveintopython3.net/strings.html#byte-arrays -- You received this message because you are subscribed to the Google Groups "Ansible Development" group. To unsubscribe from this

Re: Provide a simpler way to default runserver IP/port to 0.0.0.0:8000

2016-11-28 Thread James Pic
I recon i use a single settings module that feeds from env vars for any project i touch myself, but I suggested adding a setting because that would leave the choice up to the user like it's currently the case in django projects (some people still rely on local_settings import or use several setting

Re: Provide a simpler way to default runserver IP/port to 0.0.0.0:8000

2016-11-28 Thread James Pic
Perhaps we could override this default with a setting ? -- 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+

Re: [Python-ideas] Distribution agnostic Python project packaging

2016-11-25 Thread James Pic
PS: FTR, pyinstaller seems widely use by a part of our community, but wasn't represented in this thread, perhaps this can give some good thinking to our devops community too :) http://www.pyinstaller.org/​ ___ Python-ideas mailing list Python-ideas@pytho

Re: [Python-ideas] Distribution agnostic Python project packaging

2016-11-25 Thread James Pic
Hi all, Please let me thank you for sharing some of your insight and passion, and for your tolerance, I'm sorry I thought it would be the best mailing list to go ahead and bluntly propose to have something like jars in python core. It's really great to see such a variety of solutions, and I've be

[Python-ideas] Distribution agnostic Python project packaging

2016-10-27 Thread James Pic
Hi all ! Ive heard some people saying it was rude to post on a mailing list without introducing yourself so here goes something: my name is James Pic and I've been developing and deploying a wide variety fof Python projects Python for the last 8 years, I love to learn and share and wr

Re: [FRnOG] [JOBS] Startup cherche devops expérimenté(e)

2016-10-12 Thread James Pic
Bonjour, Je ne pense pas que vous ayez la définition correcte du terme Devops. DevOps c'est quand un dev et un ops travaillent ensemble vers un même objectif. Cf n'importe quel livre sur le sujet. Bonne journée James --- Liste de diffusion du FRnOG http://www.frnog.org

Re: Autocomplete in Django 1.11: Widget in Forms Library?

2016-10-11 Thread James Pic
On Tue, Oct 11, 2016 at 2:20 PM, Johannes Hoppe wrote: > > At the current point I don't see how we could add a more generic widget to > Django outside of the admin. This would require ether a manual registration > of models as autocomplete light does it, or another approach that doesn't > rely on

Re: Form.Media: render inline css/js

2016-10-07 Thread James Pic
Nice one Matthias ! We might have something similar, in dal, discussion is undergoing: https://github.com/yourlabs/django-autocomplete-light/issues/756#issuecomment-252368089 Currently ddf also renders json in a script tag in the middle of the form, i think I might take the same direction as you

[mezzanine-users] Redirect administration: filter by site

2016-10-03 Thread James Pic
Hi all ! I'm just trying out Mezzanine, it's really cool ! It's my first time with mezzanine and I have a "bug or feature" type of question. In the Pages administration, staff may only work on pages of the current site. However, in the Redirects administration, staff may see redirects of other

Re: Built-in router link generator in Django

2016-10-03 Thread James Pic
True, this is a feature that's been invented a countless number of times. Perhaps one implementation could be supported by the organization ? -- You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group. To unsubscribe f

Re: Form.Media: render inline css/js

2016-09-29 Thread James Pic
Thanks for the heads up, a similar ticket has been closed as wontfix, because it isn't compatible with CSP: https://code.djangoproject.com/ticket/13978 While I'm all against inline scripts, I have a use case which seems be legitimate: https://github.com/yourlabs/django-autocomplete-light/pull/733/

Form.Media: render inline css/js

2016-09-29 Thread James Pic
Hello list \o/ Currently, we can attach scripts and css by declaring their urls in Media. It then renders the script and link tags, allowing users to have that outside the form tag in the template, ie. in the HTML head. A good way to pass a widget's configuration from python to js is to pass them

Re: Extend support for long surnames in Django Auth

2016-08-02 Thread James Pic
Thanks for your reply Aymeric. If I understand correctly the best way to approach this, besides increasing the current limits - which I've had to do myself a few times - is to create a separate app providing a custom model with an ArrayField for name (sorting) and a migration script, and let time t

Re: Extend support for long surnames in Django Auth

2016-08-01 Thread James Pic
Aymeric, it doesn't matter if tens of milions of names fit into your model, it only takes one to have a issue that's going to require the project developers to invest time in it. So I'm a bit lost about what's the most practical approach here. -- You received this message because you are subscrib

Re: Extend support for long surnames in Django Auth

2016-07-31 Thread James Pic
On Sat, Jul 30, 2016 at 8:08 AM, Josh Smeaton wrote: > > I think having a single name field is reasonable for the vast majority of > cases, but it fails where projects really do need to identify two names for > things like sorting or categorising. I'd be willing to believe that a project requires

Re: Extend support for long surnames in Django Auth

2016-07-29 Thread James Pic
Indeed first and last name dont make sense en various culture. In the Memopol project for exampe where wé have a table of European Parliament representative we have all sorts of names including (The Earl Of) name suffix which is part of the reasons our first / last name system was completely checkm

[ansible-devel] Improving default output

2016-07-26 Thread James Pic
Hi all ! When supporting openshift-ansible, users share pastes like (ie. on IRC):: TASK: [openshift_serviceaccounts | Grant the user access to the privileged scc] *** changed: [li1491-86.members.linode.com] => (item=['router', {'cmd': ['oc', 'get', 'scc', 'privileged', '-o', 'yaml'], 'end': '2

Re: Translatable Site.name

2016-07-20 Thread James Pic
Thanks, I'm really looking for a way to use the models as this is for the django CMS light project which makes dynamic multi site a central requirement. Perhaps we could make this model swappable ? For now I'm just going to rely on the translatable site level yaml metadata we already have in plac

Translatable Site.name

2016-07-19 Thread James Pic
Hi all, Are there any plans to make Site.name translatable ? Would that be something we want to offer as a feature ? Thanks -- You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group. To unsubscribe from this group

Re: Rewriting admin internals

2016-05-26 Thread James Pic
On Thu, May 26, 2016 at 4:37 PM, Tim Graham wrote: > I'm skeptical of moving anything JavaScript related from admin into core as > this makes a stronger endorsement of and coupling to jQuery. Makes sense, would there be any intermediary solution at least ? -- You received this message because y

Re: Rewriting admin internals

2016-05-26 Thread James Pic
There are a lot of interresting things to do, perhaps we could extract code from the admin into the core ? An example of this is the django-addanother app, which replicates the pattern used by the admin add another widget in an app for usage outside the admin. Would moving that kind of things from

Re: Testing pre-release Django

2016-05-25 Thread James Pic
I've found testing your own projects on django master to be tremendously useful. Then, I don't have any surprise when I test on django alpha, everything passes and I have nothing to do. Not to mention the tremendous amount of things I learn on the way, at a slower, more regular pace. Compare this t

Re: Rewriting admin internals

2016-05-25 Thread James Pic
Shouldn't the forms refactor happen first ? -- 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...@

Re: Testing pre-release Django

2016-05-20 Thread James Pic
Please test your projects against django master too. On May 21, 2016 1:31 AM, "Ed Morley" wrote: > Another idea might be to encourage more packages to test on Travis against > Django master (with that sub-job marked as allowed to fail, so it doesn't > fail the whole run) - so any incompatibilitie

[lxc-devel] pylxd sprint

2016-05-19 Thread James Pic
Hi all \o/ There's been a lot of discussion around pylxd since a PR has been opened on Ansible to include an lxd_container module. It's really long so I'll try to brief you about it in this email, but FTR here it is: https://github.com/ansible/ansible-modules-extras/pull/2208 Basically we're a pr

[ansible-project] Re: Ansible 2.1.0 RC2 is ready for testing

2016-05-17 Thread James Pic
On Tuesday, May 17, 2016 at 3:27:00 PM UTC+2, James Pic wrote: > > pip install > https://github.com/ansible/ansible/archive/v2.1.0.0-0.1.rc1.tar.gz > # Or install in editable mode (best): > pip install -e git+https://github.com/ansible/ansible.git@ > v2.1.0.0

[ansible-project] Re: Ansible 2.1.0 RC2 is ready for testing

2016-05-17 Thread James Pic
On Tuesday, May 17, 2016 at 4:01:08 AM UTC+2, Lakshmi Balu wrote: > > Great news! When Ansible 2.1 will be available in pip install? > There are several ways to install it with pip before it's released on PyPi, ie.: pip install https://github.com/ansible/ansible/archive/v2.1.0.0-0.1.rc1.tar

Re: [ansible-devel] LXD module development

2016-05-17 Thread James Pic
Just awesome, thanks a heap ! -- You received this message because you are subscribed to the Google Groups "Ansible Development" group. To unsubscribe from this group and stop receiving emails from it, send an email to ansible-devel+unsubscr...@googlegroups.com. For more options, visit https:/

[ansible-devel] LXD module development

2016-05-17 Thread James Pic
Hi all \o/ Basically, lxd is like the lxc module, with a bit more feature ie. the ability to manage container images like docker. Has anyone started any development on the LXD module ? Is there any recommendation you'd like to make ? Would you be interrested in a PR ? Thanks ! -- You receiv

[ansible-devel] Re: Ansible 2.1.0 RC2 is ready for testing

2016-05-17 Thread James Pic
On Tuesday, May 17, 2016 at 3:27:00 PM UTC+2, James Pic wrote: > > pip install > https://github.com/ansible/ansible/archive/v2.1.0.0-0.1.rc1.tar.gz > # Or install in editable mode (best): > pip install -e git+https://github.com/ansible/ansible.git@ > v2.1.0.0

[ansible-devel] Re: Ansible 2.1.0 RC2 is ready for testing

2016-05-17 Thread James Pic
On Tuesday, May 17, 2016 at 4:01:08 AM UTC+2, Lakshmi Balu wrote: > > Great news! When Ansible 2.1 will be available in pip install? > There are several ways to install it with pip before it's released on PyPi, ie.: pip install https://github.com/ansible/ansible/archive/v2.1.0.0-0.1.rc1.tar

Re: Decoupling Permission-Check from Calling the View

2016-04-27 Thread James Pic
Hi all, I agree with Thomas here, we shouldn't give any detail to the user blocked because of permission configuration. We should however log that somewhere like django-rules-light for the admin. BTW This proposal looks great, keep up the good work B) James -- You received this message because

[Yahoo-eng-team] [Bug 1571555] [NEW] [doc] Typo in sysctl command example

2016-04-18 Thread James Pic
local_reserved_ports = 35357 ** Affects: keystone Importance: Undecided Assignee: James Pic (jamespic) Status: New ** Changed in: keystone Assignee: (unassigned) => James Pic (jamespic) -- You received this bug notification because you are a member of Yahoo! Eng

Re: [FRnOG] Re: [TECH] Proxy cache https (vraiment) transparent ?

2016-04-12 Thread James Pic
As-tu essayé mitmproxy ? Je pense que de telles solutions ont leur utilité si on ne met pas d'utilisateur humain derrière, et qu'on s'en sert par exemple pour router une infra de test éphémère. --- Liste de diffusion du FRnOG http://www.frnog.org/

Re: [arch-mirrors] Fwd: AARNet HTTPS mirror

2016-04-10 Thread James Pic
Is HTTPS useful ? I thought the packages were checked against gpg signatures anyway ?

Re: Vendoring multipledispatch

2016-04-05 Thread James Pic
Adding dependencies would definitely be a huge step forward. I think Django doesn't have them because pip wasn't as awesome as it is today back in the early days, but nowadays it would definitely make sense. That would mean a bit more work for distribution package maintainers but if we can start co

Re: Override the default form field for a model field

2016-04-02 Thread James Pic
On Sat, Apr 2, 2016 at 10:44 AM, Florian Apolloner wrote: > Yeah, I am also mostly worried about this. formfield for me is a quick > shortcut, if you want to customize it, do it at the form level imo. Does this mean we can close #26369 ? -- You received this message because you are subscribed t

Re: [GSoC 2016] Please Critique (Condition API - Related to Auth)

2016-03-24 Thread James Pic
Hi Connor, Overall I find it pretty cool that work on this has been started. There are a few questions I'd like to ask on this proposal. In this example: class ReadingDelete(UserPassesTestMixin, DeleteView): model = Reading def test_func(self): user = self.reques

Re: Override the default form field for a model field

2016-03-20 Thread James Pic
Yes, overriding the model field to change the definition of formfield() works. It is indeed possible to define two model field classes which have different formfield() methods, for example: ManyToManyCheckboxField() ForeignKeyRadioField() Should Django provide such fields ? formfield_callback is

Re: Bringing some popular must have django tools/packages under django org umbrella

2016-03-19 Thread James Pic
On Wed, Mar 16, 2016 at 3:22 PM, Matías Iturburu wrote: > Even if I submit a patch I wouldn't be able to: > - Merge it into mainline. > - Upload the patched version to pypi. > > So it's a no-starter, > I can't rely on my fork, not for production, as I > should guarantee that the package it's, at l

Re: Documentation for deployment on OpenShift Origin

2016-03-19 Thread James Pic
Hi all! Perhaps the wiki is the best place for this kind of things? Thanks for your feedback Best James On Mar 16, 2016 12:59 AM, "James Pic" wrote: > I'd like to illustrate why I think having official documentation about > deployment on PaaS would be great. > &g

Re: Feedback on Django Channels

2016-03-19 Thread James Pic
Perhaps it is a bit early for this but Is there anywhere origin is checked against ALLOWED_HOSTS ? Middleware support would be nice to but I guess you'll come to that when implementing user authentication. Keep up the great work ! -- You received this message because you are subscribed to the G

Re: Override the default form field for a model field

2016-03-19 Thread James Pic
If we prefer to remove form related stuff from models, then we should be able to register new default model forms: models.py: class YourModel(models.Model): your_field = models.BooleanField() forms.py: class YourModelDefaultForm(django.?.ModelFormConfiguration): class Meta: help

Re: Override the default form field for a model field

2016-03-19 Thread James Pic
On Thu, Mar 17, 2016 at 2:17 PM, Tim Graham wrote: > It seems useful, but I'm not sure if it increases the coupling between model > and forms in an undesirable way? The coupling is already there because model fields sit right in-between the db and form fields, so I don't know if it would actually

Re: Bringing some popular must have django tools/packages under django org umbrella

2016-03-19 Thread James Pic
FTR, there's also Djangonauts which have been there for a while: https://github.com/djangonauts Sorry, I tried not to look uncivil - and yet I fail to see where I was, but definitely re-reading and thinking about it (I'm not an english native speaker). Please anyone feel free to PM me and point me

Re: Bringing some popular must have django tools/packages under django org umbrella

2016-03-16 Thread James Pic
What do you mean stuck? Aren't you supposed to port the packages and submit a patch in that case? How are you stuck ? I know the first portings are hard but once you've ported a dozen it becomes piece of cake so don't be afraid of trying ! And please contribute to the apps !! I know some people wh

Re: Bringing some popular must have django tools/packages under django org umbrella

2016-03-16 Thread James Pic
Sorry for to quoting:/ -- 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

Re: Documentation for deployment on OpenShift Origin

2016-03-15 Thread James Pic
I'd like to illustrate why I think having official documentation about deployment on PaaS would be great. What I mean by "there is confusion", is that IMHO on a PaaS SECRET_KEY should be managed by settings.py in an automatically created file in a private and persistent directory. For example: h

Re: Documentation for deployment on OpenShift Origin

2016-03-15 Thread James Pic
Pretty nice docs they have nowadays I recon ! Perhaps we don't need documentation for all open source PaaS out there (ie. DEIS, the open source heroku-ish PaaS for CoreOs). Having at least one could help though. The only documentation about deploying django apps is in their blog and it's not very

Re: Documentation for deployment on OpenShift Origin

2016-03-15 Thread James Pic
Perhaps, should we also start moving mod_python / uwsgi docs upstream ? -- 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 dj

Documentation for deployment on OpenShift Origin

2016-03-15 Thread James Pic
Hi, OpenShift Origin is an Open Source PaaS system based on cool stuff like kubernetes, docker, ansible, golang ... developed mostly by RedHat. It's probably comparable to Heroku, but more flexible and completely Open Source (thanks RedHat !!). I use OpenShift every day, including for a few open

Re: thinking about the admin's scope and its description in the docs

2016-03-14 Thread James Pic
On Tue, Mar 15, 2016 at 1:59 AM, Ramez Ashraf wrote: > > 1. Inlines (FormView is like a teenager playing in the park next to Spartan > Hero) There are inlinemodelformsets you can use outside the admin. > 2. Entry Log change message django-activity-stream or even django-reversion > 3. Various

Re: Translate permission Django

2016-03-14 Thread James Pic
Perhaps django-modeltranslation could help too: http://django-modeltranslation.readthedocs.org/en/latest/registration.html (I really like this app BTW) -- You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group. To uns

Re: Django startproject template enhancement proposal

2016-03-14 Thread James Pic
That sounds pretty fair, particularly since the new default settings provide a great ootb experience. Thanks for your feedback, keep up the great work ! -- You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group. To u

Django startproject template enhancement proposal

2016-03-12 Thread James Pic
Hi all, There's a pattern I like to use in my projects which I'd like to suggest for django startproject. It looks like: project_name/ setup.py src/ myapp1/ myapp2/ project_name/ settings.py urls.py manage.py wsgi.py My settings.py here uses environment v

Re: Override the default form field for a model field

2016-03-09 Thread James Pic
I just meant that currently, if a user wants to make Select2 the default widget for a model field, it is necessary to subclass the modelfield class and override the model field's formfield() method just to change the default widget it uses, sorry if it wasn't clear ! -- You received this message

Re: Override the default form field for a model field

2016-03-09 Thread James Pic
On Wed, Mar 9, 2016 at 3:09 PM, Johannes Hoppe wrote: > We'll you can change the `default` form Field using > `django.db.models.Field.formfield`. Do you mean that, for example, an app like django-select2 could provide the following model fields ? - Select2WidgetForeignKey, - Select2WidgetOneToOn

Re: Override the default form field for a model field

2016-03-09 Thread James Pic
Hi ! Currently, by default, django's ModelForm uses form fields which are known to be compatible for the modelfield. By "compatible", I mean that it works when the ModelForm calls: - ModelField.value_from_object() to get the initial formfield value for the model's field, via model_to_dict: https

Re: Override the default form field for a model field

2016-03-07 Thread James Pic
Thanks Tim. Something like that would work, perhaps the first step would be to make modelfield.formfield a bit more configurable ? Currently, the default form field class for a model field is hardcoded in the model field's formfield() method, ie: https://github.com/django/django/blob/master/django

Override the default form field for a model field

2016-03-01 Thread James Pic
Hi all, Currently, the model field defines the default form field that's used by the modelform metaclass. It would be nice if an external app could overwrite this. For example, a user installs an app which provides a more elaborated relation select field. They configure the app to be able provide

Re: Logged out sessions are resurrected by concurrent requests (ticket 21608)

2016-02-02 Thread James Pic
Just click "Details" and then "Console output". You'll find this: + flake8 ./django/contrib/sessions/backends/db.py:91:30: E901 SyntaxError: invalid syntax ERROR: /home/jenkins/workspace/isort/django/contrib/sessions/backends/db.py Imports are incorrectly sorted. --- /home/jenkins/workspace/isort

  1   2   3   4   5   >