Re: Use of TIME_INPUT_FORMATS in TimeField

2024-03-05 Thread David Sanders
Define TIME_INPUT_FORMATS in your local formats.py setup as per: https://docs.djangoproject.com/en/5.0/topics/i18n/formatting/#creating-custom-format-files On Tue, 5 Mar 2024 at 18:43, Arthur Pemberton wrote: > The documentation ( > https://docs.djangoproject.com/en/5.0/ref/forms/fields/#timefie

Re: Proposal for SyncChatRoom Integration in Django

2024-02-17 Thread David Ansa
share any further thoughts or ideas you may have. Best regards, David Ansa On Friday, February 16, 2024 at 5:52:53 PM UTC+1 Fawemimo Owolabi wrote: > I really support these motions, it really sound great but it will be best > to used as a third-party package, also for drf as wel

Proposal for SyncChatRoom Integration in Django

2024-02-13 Thread David Ansa
Hi Everyone, I'm excited to propose the integration of SyncChatRoom, a real-time chat functionality, into the Django framework. SyncChatRoom aims to provide native support for WebSocket communication, making it easier for developers to implement real-time chat features in their Django applicati

Re: Potential bug with how Value works with Django ORM queries

2023-10-26 Thread David Sanders
json_value()`. So this will work: `Study.objects.filter(study_data__protocol__general__program_name__in=(Value("Program1", output_field=JSONField()), ...))` Regards David On Thursday, 26 October 2023 at 03:39:08 UTC+11 Nitin Chaudhary wrote: > Hi > I recently came across a very interesting scena

Re: Proposing the removal of Oracle from the Django supported backend databases

2023-08-27 Thread David Sanders
I posted a thread a while back about the latest version of Oracle 23c which appears to add support for a few things that would fix some of the workarounds we have in the ORM (eg boolean expressions). I know dropping 19c is a long way off but at least the future is looking brighter 🌟 On Wed, 9 Aug

Re: Ticket #34646 Ordering a Django admin column based on multiple model fields

2023-06-18 Thread David Sanders
Sorry to clarify I intended to respond with "niche solution" not "nice solution" lol. I didn't realise the phone's autocomplete had done that. On Monday, 19 June 2023 at 11:05:41 UTC+10 David Sanders wrote: > Mariusz is a developer, so that's at least 1 dev

Re: Ticket #34646 Ordering a Django admin column based on multiple model fields

2023-06-18 Thread David Sanders
Mariusz is a developer, so that's at least 1 developer's opinion :) Unless anybody else pipes up to counter this I'd consider it to be a nice solution. On Monday, 19 June 2023 at 05:01:52 UTC+10 Mubarak Alrashidi wrote: > Can we at least know what the developers think about it? > > > On Sunday,

Re: A different approach for the auto-reloader

2023-04-28 Thread David Arredondo
Hola El vie, 28 de abr de 2023 12:02 p. m., natali...@gmail.com < nataliabid...@gmail.com> escribió: > Hello everyone! > > I'm conducting a PR cleanse crusade for the project, where I'll try move > forward those PRs that still make sense or close them when appropriate. > Were there other developm

Re: Oracle 23c released earlier this month

2023-04-21 Thread David Sanders
Looks like python-oracledb is making updates to be compatible with 23c: https://python-oracledb.readthedocs.io/en/latest/release_notes.html#oracledb-1-3-1-tbd 1.3.1 isn't released yet but the fact that updates are being made so soon is encouraging 🎉 On Monday, 17 April 2023 at 22:06:57 UTC+10

Re: Django's automatic admin interface.

2023-04-19 Thread David Sanders
Hi Dipankar, Not being rude but serious question: What's the latest front end technology? :) On Wed, 19 Apr 2023, 7:27 pm Dipankar, wrote: > Is there any plan to replace Django's automatic admin interface with the > latest front end technology? > There are several packages available but what if

Oracle 23c released earlier this month

2023-04-17 Thread David Sanders
ols if some version detection was put in place? There may be a few other interesting tidbits related to Django that I've missed. Here are the updates for application developers: https://docs.oracle.com/en/database/oracle/oracle-database/23/nfcoa/application-development.html Cheers, David

Re: Proposal: Check constraints at the model field level

2023-04-16 Thread David Sanders
Hi Adam, Mariusz & Simon, > The only thing I'm not a fan of in your proposal is repeating the field name within the check expression, like "price" in > ... 8< ... > Perhaps we could support only a special name instead, like “self” or the shorter “f”? I was thinking the same thing +1 I wanted to

Re: Django "makemigrations -- update" donot working

2023-04-09 Thread David Wobrock
kemigrations --update" again. I do not think it's a bug in Django. Cheers, David Le sam. 8 avr. 2023 à 16:50, Muhammad Juwaini Abdul Rahman < juwa...@gmail.com> a écrit : > Do you need that '--update' parameter? > > On Fri, 7 Apr 2023 at 05:57, Saifullah Sha

Proposal: Check constraints at the model field level

2023-04-05 Thread David Sanders
t;https://github.com/shangxiao/stupid-django-tricks/tree/master/column_check_constraints> for some experimentation with this idea. Cheers, David -- You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" grou

Re: Issue with get_FOO_display not working in Django admin

2023-04-05 Thread David Sanders
At this point I'll let others chime in with their opinion on whether this is something that needs to change because: 1. I rarely use admin 2. I've never really had the need to override a choice's display over those supplied via `choices` :) On Wed, 5 Apr 2023 at 19:05, 'Ibrahim Abou Ele

Re: Issue with get_FOO_display not working in Django admin

2023-04-04 Thread David Sanders
/instances/#django.db.models.Model.get_FOO_display Kind regards, David On Wed, 5 Apr 2023 at 09:10, 'Ibrahim Abou Elenein' via Django developers (Contributions to Django itself) wrote: > Dear All, > > I am writing to report an issue I encountered while working with Django > admin. I ha

Re: GSOC 2023 Discussion and Feedback: Database-level Cascades

2023-03-29 Thread David Sanders
> > Thank you for your suggestion and nice implementation example. I would try > to include that approach too. > No, that was just an example of a workaround without any of the benefits of Django's emulation – the presence of a workaround often goes into determining whether it's worth working on a

Re: GSOC 2023 Discussion and Feedback: Database-level Cascades

2023-03-27 Thread David Sanders
n (only tested on Postgres). Anyway, best of luck! David On Tue, 28 Mar 2023 at 00:57, Akash Sen wrote: > Hello everyone, > I’ve started this discussion to get feedback for my proposal for the > project: Database-level Cascades Functionality to Django ORM. I have never > contrib

Re: InlineAdmin unable to delete object with read only primary key

2022-11-21 Thread David Sanders
This is a separate issue. David On Tue, 22 Nov 2022 at 04:42, Gagan Deep wrote: > Hello everyone! > > In my project, I have created a model (Token) which uses a custom primary > key (i.e. it uses a field defined by the model for the primary key instead > of using "id").

Re: Switch to a dropdown widget for ListFilter on admin

2022-11-03 Thread David Sanders
Hi Vasanth, What advantages does a dropdown have over simply placing the options there though? Typically these sorts of things have horrendous accessibility and make the code more complex. -- David On Fri, 4 Nov 2022 at 02:17, Vasanth Mohan wrote: > Hello, > > When there are multipl

Re: Warning in documentation about filtering queryset in ClassBasedViews

2022-10-29 Thread David Sanders
a documentation PR with some suggestions but others may also doubt the value of adding a warning given that the very next section explains how to do dynamic filtering. Personally I think by the time you get to advanced Django such as this, Python experience is assumed :) Regards, David On Sun, 30

Re: Proposal: Add An in-memory data storage backend in Django

2022-10-20 Thread David Sanders
Hi, I may be missing some context here but is this something distinctly different from setting SQLite to use in-memory storage [1]? 🤔 [1] https://www.sqlite.org/inmemorydb.html David On Fri, 21 Oct 2022, 04:30 Paolo Melchiorre (paulox), wrote: > Hi all, > > there is a package tha

Re: Proposal to add a flatten() to django.utils

2022-10-18 Thread David Sanders
> > +1 for that, though this will need some careful design between perf optimizations and how much general purpose it should be. Perhaps before optimising we could start out with the basic readable version and tailor it moving forward. It's possible this could be irrelevant if it's only ever use

Proposal to add a flatten() to django.utils

2022-10-16 Thread David Sanders
ng performance - A generator based solution would be nice if it could finish walking early if used with any() - Opinions on maintainability (readability) vs performance would be great - Ideally I think it would be great if someone with some experience with performant Python could c

Re: Model-level validation

2022-10-01 Thread David Sanders
s? Use range types with exclusion constraints. - Only 1 column from a set of columns should be set? Use a check constraint with an xor not null test. - There are plenty more of these :) Only the database can protect the data. -- David On Fri, 30 Sept 2022 at 10:12, Aaron Smith wrote: >

Re: Proposal: Make it so when getting an image's dimensions, EXIF orientation is considered

2022-09-28 Thread David Sanders
/blob/0dd29209091280ccf34e07c9468746c396b7778e/django/core/files/images.py#L18-L24 Regards, David On Wed, 28 Sep 2022 at 07:13, 'Adam Johnson' via Django developers (Contributions to Django itself) wrote: > To have extra properties, we'd need to add extra database fields. It w

Re: Proposal: Make it so when getting an image's dimensions, EXIF orientation is considered

2022-09-26 Thread David Sanders
width and height as is read from the image with the rotation as separate meta-data. (Eg I did a cursory look with Gimp & Preview on mac) On Mon, 26 Sept 2022 at 19:20, David Sanders wrote: > Coincidence I was also just reading up image-orientation… I didn't realise > that it's t

Re: Proposal: Make it so when getting an image's dimensions, EXIF orientation is considered

2022-09-26 Thread David Sanders
ep 24, 2022 at 5:51 PM Adam Taylor wrote: > >> Following the advice of David Sanders and Mariusz Felisiak, I'm coming >> here with my proposal rather than continuing on with the ticket system (see >> ticket >> #34035 <https://code.djangoproject.com/ticket/3403

Solutions for ticket #31506

2022-09-24 Thread David Sanders
sql(compiler, connection) +return "{}::{}".format(sql, self.output_field.db_type(connection)), params + def __repr__(self): return "{}({})".format(self.__class__.__name__, self.expression) Any other ideas? Regards, David -- You received thi

Feature Request: Customisation of constraint error messages in forms

2022-09-19 Thread David Sanders
ting the code based on the *constraint name*. Single-field unique constraints already set the code "unique"; and this works for field errors because there's usually only one unique constraint defined for a field. Thoughts? Cheers, David -- You received this message because you ar

Re: UniqueConstraint validation error message conditional vs non-conditional

2022-09-12 Thread David Sanders
... AssertionError: {'__all__': ['Constraint “name_without_color_uniq” is violated.']} != {'name': ['Constraint “name_without_color_uniq” is violated.']} - {'__all__': ['Constraint “name_without_color_uniq” is violated.']} ? ^^ +

Re: UniqueConstraint validation error message conditional vs non-conditional

2022-09-11 Thread David Sanders
using the error_messages dict… but I'll leave that for another post :) Regards, David On Mon, 12 Sept 2022 at 11:53, charettes wrote: > Hello David, > > This is expected because Django doesn't have a way to express the > constraint in words to present to the user when a

UniqueConstraint validation error message conditional vs non-conditional

2022-09-11 Thread David Sanders
was wondering what the rationale for that was? Would it be possible to make the behaviour consistent? And if not - would a PR to clarify how ValidationErrors are raised for constraints in the docs be welcomed? Cheers, David -- You received this message because you are subscribed to the Google Groups &quo

Re: Django timing

2022-09-09 Thread David Sanders
Hi Pelumi, It's kind of you to offer code, however there is a similar functionality in contrib.humanize: https://docs.djangoproject.com/en/4.1/ref/contrib/humanize/#naturaltime Perhaps this does what you require? -- David On Fri, 9 Sept 2022 at 23:50, Bhuvnesh Sharma wrote: > Hi,

Re: add option to specify HELO name/identity in SMTP client

2022-09-09 Thread David Pinto
‪On Wed, 7 Sept 2022 at 15:37, ‫אורי‬‎ wrote:‬ > > Hi David, > > Does and should Django connect directly to a remote SMTP server? Isn't it > better to use the local mail server which will receive the email and then > send it to a remote SMTP server? In my opinion, it&

Check constraint validation with NULLs

2022-09-08 Thread David Sanders
about moving validation to WHERE to get around issues with using SELECT but couldn't find any other mention about how NULLs should be handled. I wanted to check with folks here first before raising an issue. I'm not sure what the fix should be but I'd recommend at least adding a

add option to specify HELO name/identity in SMTP client

2022-09-07 Thread David Miguel Susano Pinto
AME`: even more clear, `helo_name` is used in the postfix configuration. A workaround for this is to setup a SMTP server locally, such as Exim or Postfix, that simply forwards the emails from Django. Best wishes David -- You received this message because you are subscribed to the Google

Re: Feature Request (have sample implemenation): ALL subquery

2022-08-24 Thread David Sanders
Filter: (abalance = 0) Rows Removed by Filter: 8 Planning Time: 0.206 ms Execution Time: 951.263 ms (9 rows) On Thursday, 25 August 2022 at 00:41:43 UTC+10 charettes wrote: > Hello David, > > Do you know if ALL provides any performance benefits over NOT EXISTS? > Give

Feature Request (have sample implemenation): ALL subquery

2022-08-24 Thread David Sanders
;https://github.com/shangxiao/stupid-django-tricks/blob/master/all_subqueries/models.py#L119> I found this work well for my codebase and I'd love to explore contributing it back to Django. I'd suggest the subquery subclass as it results in more readable code – but there is the question a

Re: Integrating migrations with the check framework

2020-12-24 Thread David Wobrock
s some insights about the project and how it could help on this topic :) Cheers, David On 23/12/2020 19:02, Tom Forbes wrote: Thanks for all the input here! I didn’t know about django-migration-linter, and it does seem quite interesting. It works by looking at the complete set of SQL statements

Re: Primary Key AutoField -> UUID Field

2020-11-14 Thread David Nugent
> On 20201115, at 09:47, Tim Graham wrote: > > Hi Brian, There are existing threads about that (try searching the archives > for 'default pk' to find some of them). Here's a PR that adds the setting you > described: https://github.com/django/django/pull/13179. Perhaps you would > like to try

Re: Auto-installation of 3rd party packges

2020-07-24 Thread David Rashty
s permissions.IsAuthenticated in settings.py. On Fri, Jul 24, 2020 at 1:11 PM '1337 Shadow Hacker' via Django developers (Contributions to Django itself) wrote: > > > > Sent with ProtonMail <https://protonmail.com> Secure Email. > > ‐‐‐ Original Message ‐‐‐

Re: Auto-installation of 3rd party packges

2020-07-24 Thread David Rashty
Nice! And thanks for sharing! I like this idea too. Why did you include "if settings.DEBUG" by the way? I still think injecting code explicitly has certain advantages: * I believe AppConfig approach could be implemented in apps.py by the package author. If they chose not to write their package

Re: HttpResponse headers interface

2020-07-15 Thread David Smith
The recent change to `url()` was a good example of this; even though it was in a DEP and the docs for a long time it still caused a lot of noise when the deprecation path was finally started. The projects (ok, small sample) I've looked at are only now making this change. Folks will only change

Re: Management of static assets

2020-07-05 Thread David Smith
s rather than a full solution. The key thing here in the short term is the name change. If there are no objections to this I am happy to look at an implementation. Could then come back to the mailing list before it's merged, especially as it will be a breaking change? Kind Regards David

Re: calling self.errors in a form in a formset breaks deletion

2020-06-19 Thread David Smith
Hi Carles, Hope you are well. You mentioned you are using crispy-forms. :-) Have you seen this part of the docs, it allows you to update forms 'on the go'. I've not really played with this but it sounds similar to what you need? https://django-crispy-forms.readthedocs.io/en/latest/dynamic_layo

Management of static assets

2020-04-21 Thread David Smith
Hi All, I hope you are all well. I've been thinking about static assets over the past week or so following my email on widget media. I collated the past 6 year's worth of discussions into a single source, with relevant extracts and links to sources. I've also set out some options and given m

Re: Widget Media Class

2020-04-10 Thread David Smith
Hi Carlton, Thank you for the response. I really appreciate your continued support / guidance. Sorry, for asking the question in that way, eventually I'll learn 'how things are done round here' :-) I'll go and investigate in more detail. David -- You received this mes

Widget Media Class

2020-04-09 Thread David Smith
at are the current opinions on this ticket? Looking forward to hearing your views. David -- 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 emai

GSoC Mentors

2020-03-26 Thread David Smith
Hi Carlton, I'm happy to help out with 1), if you think I would be helpful. I will not be of much help with 2) :-) David -- You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group. To unsubscribe

Allow overriding smtplib local_hostname

2019-12-20 Thread David Nolan
Hey all. In cloud environments, when using django.core.mail.backends.smtp.EmailBackend, socket.getfqdn() is called to resolve the 'reported hostname' for smtplib. This often resolves to an internal DNS name, not the intended name. It would be convenient to provide a kwarg to allow overriding th

Re: Feature idea: bulk_associate: Add ManyToMany relationships in bulk

2019-10-26 Thread David Foster
Put them on the umbrella Trac ticket: https://code.djangoproject.com/ticket/30828 Cheers, David Foster | Seattle, WA, USA On Sunday, October 13, 2019 at 3:39:12 PM UTC-7, David Foster wrote: > > Here's the link to the PR for review: > https://github.com/django/django/pull/11899

Re: Feature idea: bulk_associate: Add ManyToMany relationships in bulk

2019-10-13 Thread David Foster
Here's the link to the PR for review: https://github.com/django/django/pull/11899 (Apologies for the double-post) - David On Sunday, October 13, 2019 at 3:37:07 PM UTC-7, David Foster wrote: > > I've created a PR which is waiting for review, if someone has time. > > Accor

Re: Feature idea: bulk_associate: Add ManyToMany relationships in bulk

2019-10-13 Thread David Foster
s/#patch-review-checklist> and either mark the ticket as "Ready for checkin" if everything looks good, or leave comments for improvement and mark the ticket as "Patch needs improvement". Thanks for any help. - David On Tuesday, October 1, 2019 at 11:06:15 PM UTC-7, Davi

Re: Feature idea: bulk_associate: Add ManyToMany relationships in bulk

2019-10-01 Thread David Foster
Trac ticket created: https://code.djangoproject.com/ticket/30828 On Tuesday, October 1, 2019 at 3:02:38 AM UTC-7, Tom Forbes wrote: > > Hey David, > I like this idea, while I don’t think the use case is common there have > been a few times where I’ve needed this and got around it by

Re: Feature idea: bulk_associate: Add ManyToMany relationships in bulk

2019-09-29 Thread David Foster
special function import. For bulk_disassociate() the analogous API would be: M1.m2_set.remove_pairs(*[(m1, m2), ...]) # --- OR --- M1.m2_set.remove_pair_ids(*[(m1_id, m2_id), ...]) - David On Thursday, September 26, 2019 at 10:45:45 AM UTC-7, David Foster wrote: > > Given the following e

Stalled tickets

2019-09-26 Thread David Vaz
Hi, I am playing around at the DjangoCon US 2019 Sprints and while trying to do my share one thing stands out in the open tickets is: Some are very old and others have not been touched in a while. I did a simple analysis of accepted and open tickets based on last modified time (kind of a live

Re: Feature idea: bulk_associate: Add ManyToMany relationships in bulk

2019-09-26 Thread David Foster
Errata: The proposed default value for assert_no_collisions is False rather than True, for safety. On Thursday, September 26, 2019 at 10:45:45 AM UTC-7, David Foster wrote: > > Given the following example model: > > class M1(models.Model): > m2_set = models.ManyToManyField(

Feature idea: bulk_associate: Add ManyToMany relationships in bulk

2019-09-26 Thread David Foster
Given the following example model: class M1(models.Model): m2_set = models.ManyToManyField('M2') It is already possible to associate *one* M1 with *many* M2s with a single DB query: m1.m2_set.add(*m2s) However it's more difficult to associate *many* M1s with *many* M2s, particularly if yo

Proposal: make ForwardManyToOneDescriptor.get_object raise self.RelatedObjectDoesNotExist

2019-04-16 Thread David Beitey
(eg staff member is now employed) so in my context, both a value of NULL or a non-existent foreign key are conceptually the same, meaning there's no person object present. Regards, David -- You received this message because you are subscribed to the Google Groups "Django developers (

PROBLEM

2018-12-05 Thread David Figueroa
In creating my first django project- I'm trying to create my first application (polls) through a view as shown below. I'm finding the error shown in the image in the Annex. can anybody help me? I'm following the step-by-step suggested in ( https://docs.djangoproject.com/pt-br/1.11/intro/tutorial01

Improving usefulness of management command help output via reordering options

2018-04-05 Thread David Foster
". --traceback Raise on CommandError exceptions --no-color Don't colorize the command output. Thoughts? -- David Foster | Seattle, WA, USA -- You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Djan

Adding a tutorial for Channels

2018-02-05 Thread David Foster
Sockets while also touching on the important Channels concepts and linking to reference documentation where appropriate. So I'd like to offer to write such a tutorial. Would this be a welcome contribution? - David -- You received this message because you are subscribed to the Google Gro

Re: More eyes on Check Constraints

2017-08-13 Thread David Sanders
n keys. I don't suppose that this would be a possibility as a future extension of your pull request? Cheers, David On Friday, August 11, 2017 at 4:15:26 AM UTC+10, Ian Foote wrote: > > Hi all, > > I've been working on https://code.djangoproject.com/ticket/11964 to add &g

Re: #26369: default formfield callback override

2017-04-17 Thread David Seddon
n the forms signals feature thread? David On Sunday, 16 April 2017 23:18:13 UTC+1, Jamesie Pic wrote: > > Ooops yes this is correct, it doesn't work in the advised file, apps.py > > Thank you so much for your feedback, I need to ditch this patch just > find a way to make Django

Re: Feature idea: forms signals

2017-04-17 Thread David Seddon
nterested to hear if anyone thinks it's worth me making a pull request for this. David On Sunday, 16 April 2017 23:59:31 UTC+1, jp...@yourlabs.org wrote: > > Hello David, > > Is it possible to try to use it as part of the Django fork you mention, > instead of the app ? > > I

Re: delegating our static file serving

2017-04-04 Thread David Evans
Hi Aleksej, Thanks for your work on this, and sorry I haven't replied sooner -- just been busy with lots of other things ;) My plan for integrating WhiteNoise was actually to merge it in as part of contrib.staticfiles and basically stop development on it as an independent project. When I first

Re: SQLAlchemy integration - More details

2017-03-15 Thread David Kiarie
On Monday, March 13, 2017 at 3:26:48 AM UTC+3, stamati...@gmail.com wrote: > > Hello. > > I would like to request a bit more information about the SQLAlchemy > integration project listed on the GSoC ideas: > https://code.djangoproject.com/wiki/SummerOfCode2017#SQLAlchemyNoSQLintegration > > Eve

Re: Opportunity to contribute in Django

2017-03-14 Thread David Seddon
Hi Jainesh, Have a look at this page which should give you an idea about where to start: https://docs.djangoproject.com/en/1.10/intro/contributing/#finding-your-first-real-ticket On Monday, 13 March 2017 13:52:34 UTC, Jainesh Patel wrote: > > Hello, > > I am a final year CSE student from PICT,

Re: Feature idea: forms signals

2017-03-14 Thread David Seddon
lude them for completeness. Would value any comments! On Monday, 6 March 2017 19:08:29 UTC, David Seddon wrote: > > Hi all, > > One thing I've always found challenging with Django is to adjust the > functionality of forms from other apps. An example might be to add an &g

Re: Feature idea: forms signals

2017-03-10 Thread David Seddon
I've created a ticket for this here: https://code.djangoproject.com/ticket/27923#ticket What are the next steps? Shall I create a pull request, or does this need more consensus first? David On Wednesday, 8 March 2017 17:46:12 UTC, Melvyn Sopacua wrote: > > On Wednesday 08 March 20

Re: Feature idea: forms signals

2017-03-07 Thread David Seddon
d of hook would make it a lot easier for Django developers to architect their projects as small, pluggable apps - something that is pretty difficult to make work with forms. David On Monday, 6 March 2017 21:43:47 UTC, contact wrote: > > Hi ! > I'd prefer to that a standardized way

Feature idea: forms signals

2017-03-06 Thread David Seddon
Or, worse, monkey patching the form class. A much nicer way to do this would be to add a few well chosen signals to forms. Potential ones could be: - post_init - post_clean - post_save (for ModelForms) I'd be happy to do a pull request for this, but just wondered what people think. Davi

Re: delegating our static file serving

2016-12-20 Thread David Evans
I've been intending to work on this for a while (as the original author of WhiteNoise it would make the most sense for me to do the integration work) but as ever the problem has been finding the time. I've been hoping to make some progress on this over the Christmas period, but we'll see what ha

Minor concerns about auth.models.User default settings

2016-10-27 Thread David Tan
In 1.10 auth.models.User.username changed from max_length 30 to 150 and defaults to UnicodeValidator. 1. max_length=150 pushes the username string from 1-byte overhead to 4-bytes overhead in Postgres. 2. (Opinionated) AS

Re: Unicode normalization for username field

2016-05-19 Thread David Tan
> > - I'm afraid this change may result in boilerplate as most custom user > models will revert to Django's historical (and in my opinion sensible) > username validation rules. > That's a tough question to estimate. This might be true for most English monolingual web sites, but not necessaril

need not_equal and not_in query lookup types for a natural use case that can't easily be implemented with existing queries

2016-05-19 Thread David Xiao
Hi folks, Django is missing a not_equal lookup type for database queries. I know this has been requested before and that the usual response is to use exclude or ~Q. While that works for a lot of use cases, I have a natural use case that I haven't seen discussed and that seems to escape easy i

Admin Themes in 1.10

2016-05-08 Thread David Sanders
hts? I'd like to restore this ability to easily provide different options to these admin jQuery plugins before 1.10 is finalized as it will be harder to put the cat back in the bag if it ships without the ability. - David [1] https://github.com/django/django/pull/5567 [2] http://pastebin.com/wcCk8T

Help Text Per Model Field Choice

2016-05-08 Thread David Sanders
class ChoiceTuple nicely minimizes the amount of changes needed to plumb the change all the way from the model field to the widget. I'm not married to the approach, I'm just looking for a clean way to allow help texts per choice. Proof of concept patch (based on current master): http:

Re: Revisiting lazy middleware initialization

2016-03-25 Thread David Evans
16 10:08 a.m., "Florian Apolloner" wrote: > +1 -- Patches welcome :D > > On Friday, March 25, 2016 at 11:02:26 AM UTC+1, Aymeric Augustin wrote: >> >> On 24 Mar 2016, at 17:39, David Evans wrote: >> >> >> Currently, middleware is initialized

Revisiting lazy middleware initialization

2016-03-24 Thread David Evans
Hi all, Currently, middleware is initialized lazily on serving the first request, rather than on application start. There may well have been good reasons for this historically, but I don't think they apply any longer. Lazy initialization is unhelpful if a middleware class throws an error (e.g t

Re: Feedback on Django Channels

2016-03-21 Thread David Evans
On the static files question, I'm about to release v3 of WhiteNoise (http://whitenoise.evans.io/en/latest/changelog.html) which provides the option to integrate via Django middlware, rather than wsgi middleware. (It uses the FileResponse class, which didn't exist when I first wrote WhiteNoise.)

Re: delegating our static file serving

2016-01-08 Thread David Evans
wsgi.py! This approach will be marginally less efficient than handling things at the WSGI layer, but the integration is much cleaner. On Tuesday, 29 December 2015 17:31:02 UTC, David Evans wrote: > > I'd be very happy to help with this. Two things to mention: > > 1. When I first w

Re: delegating our static file serving

2015-12-29 Thread David Evans
> * django/contrib/staticfiles/views.py > * django/contrib/staticfiles/management/commands/runserver.py > * django/contrib/staticfiles/handlers.py > * django/views/static.py > > Any objections to doing further investigation in this area? > > On Saturday, June 20, 2015 at 8

An issue with Django 1.8.6 support for south migrations

2015-11-04 Thread David Filipovic
I have initially created the ticket https://code.djangoproject.com/ticket/25618 which addressed the bug that would occur if south migrations somehow ended up being still present in the migrations module. According to a report in: https://code.djangoproject.com/ticket/25618#comment:7, this seem

Re: should manage.py test run system checks?

2015-10-19 Thread David Filipovic
flag to their settings file and still use their old workflows. On Tuesday, October 20, 2015 at 1:02:12 AM UTC-4, David Filipovic wrote: > > How about making them opt-out instead of opt-in (for instance with a > --skip-checks flag)? That way anybody who is aware of the fact that chec

Re: Contributing to a module that does not seem to be covered by tests extensively (djanog.db.models.expressions)

2015-10-19 Thread David Filipovic
cases? e.g (DateField - DateField) > --> DurationField) > > If you can find an appropriate place for this logic to live then I'm all > for it. ExpressionWrapper is cumbersome, but it's also necessary for user > based combinations where the base F/Combinable/Expressi

Re: should manage.py test run system checks?

2015-10-19 Thread David Filipovic
How about making them opt-out instead of opt-in (for instance with a --skip-checks flag)? That way anybody who is aware of the fact that checks are being run every time tests are run and is seeking an increase in performance can choose to opt-out, whereas anybody not aware (or at least not full

Re: Contributing to a module that does not seem to be covered by tests extensively (djanog.db.models.expressions)

2015-10-16 Thread David Filipovic
utput_field type (at least in some cases? e.g (DateField - DateField) --> DurationField) , as opposed to having to use an ExpressionWrapper, which makes the interface slightly more complicated? What do you think, Josh? Best regards, David Filipovic On Thursday, October 15, 2015 at 11:

Contributing to a module that does not seem to be covered by tests extensively (djanog.db.models.expressions)

2015-10-15 Thread David Filipovic
new classes/methods/functions? I couldn't find anything on this. Thank you so much. I hope I can contribute and help make django better! Best regards, David Filipovic -- You received this message because you are subscribed to the Google Groups "Django developers (Contribution

Re: delegating our static file serving

2015-06-20 Thread David Evans
On Friday, 5 December 2014 19:14:29 UTC, Carl Meyer wrote: > > On 12/04/2014 10:33 PM, Collin Anderson wrote: > > Hi All, > > > > I'm pretty interested in getting secure and _somewhat_ efficient static > > file serving in Django. > > > > Quick history: > > 2005 - Jacob commits #428: a "stati

Re: Improving Test Speed for Projects that use django.contrib.postgres

2015-05-04 Thread David Muller
or the section I'm working on well I > then rely on the CI to deliver my final answers > I feel the same way and constantly target particular subsets of my tests, but it's always tempting to see if everything can run a little quicker! Thanks again for the response and advice. -

Improving Test Speed for Projects that use django.contrib.postgres

2015-05-04 Thread David Muller
Hi everybody, Recently I've begun to use the PostgreSQL specific fields introduced in Django 1.8. My codebase actually uses the special fields (HStoreField and ArrayField mostly) frequently enough such that I cannot run my test suite on an in memory SQLite database -- I have to run on a Postgr

Re: Django documentation doesn't show correctly in any browser

2015-01-13 Thread David Graves
Doesn't look that way to me in Fedora or Chrome on Linux On Tue, Jan 13, 2015 at 1:48 PM, patrick91 wrote: > On Tuesday, January 13, 2015 at 8:15:40 PM UTC+1, Some Developer wrote: >> >> I know this isn't strictly speaking a Django dev topic but since the >> developers are the ones who changed t

Re: delegating our static file serving

2014-12-05 Thread David Evans
+1 to this: I'm all in favour of supporting production-adequate static file handling in core. A couple of small points: We already have the views, api, and logic around for finding and serving > the correct files. One question that needs to be thought through is the role of `collectstatic` and

Re: delegating our static file serving

2014-12-01 Thread David Evans
It's worth flagging up that part of what makes WhiteNoise good for serving static files in production also makes it not quite as good for using in development. Most file servers work by taking the requested URL, constructing a local path from it, and then checking whether a file exists at that

Re: ORM Optimization for filtering by related existence

2014-08-07 Thread David Butler
ISTS (...) and if that table is very large then it is pretty slow Perhaps the answer is just to modify what __isnull does instead of making a new lookup > On Thursday, August 7, 2014 7:43:07 PM UTC-4, David Butler wrote: >> >> It would be nice if there was some database level opti

Re: Proposal to add a secure JSON encoding template tag

2014-06-10 Thread David Evans
note, it's good practice for JS templates to live within > script blocks too. I have {% scriptblock %}{% endscriptblock %} that is > sits next to {% jsonblock %} in my custom library since it uses the same > escaping methods. > > > > On Tuesday, May 13, 2014 10:03:43 PM UTC+12, David

Re: Proposal to add a secure JSON encoding template tag

2014-05-15 Thread David Evans
handle some common cases. > > -- > Michael Mior > > On Tuesday, May 13, 2014 6:03:43 AM UTC-4, David Evans wrote: >> >> There was some discussion previously (see >> https://code.djangoproject.com/ticket/17419) of adding a JSON encoding >> filter to Django. Thi

Proposal to add a secure JSON encoding template tag

2014-05-13 Thread David Evans
There was some discussion previously (see https://code.djangoproject.com/ticket/17419) of adding a JSON encoding filter to Django. This was rejected as being impossible (or very difficult) to do securely. However the requirement to embed JSON in an HTML page is quite a common one, and it's easy

  1   2   3   4   5   6   7   8   9   >