Re: Proposal to upgrade django.core.mail to Python's modern email API

2024-08-20 Thread Mike Edmunds
ago, and that probably needs to be resolved before we'd want to merge the second PR.) - Mike On Saturday, July 6, 2024 at 12:18:22 PM UTC-7 Mike Edmunds wrote: > Ticket created: https://code.djangoproject.com/ticket/35581 > > On Friday, July 5, 2024 at 5:27:28 PM UTC-7 Mike Edmunds

Re: Proposal to upgrade django.core.mail to Python's modern email API

2024-07-22 Thread Mike Edmunds
some of the people with opinions on django.core.mail are maybe here on django-developers but not the forum. There are also a couple of other interesting email-related threads active over there.) - Mike On Sunday, July 21, 2024 at 3:59:22 AM UTC-7 Adam Johnson wrote: > I wish this discussion w

Re: Proposal to upgrade django.core.mail to Python's modern email API

2024-07-06 Thread Mike Edmunds
On Saturday, July 6, 2024 at 11:17:35 AM UTC-7 Florian Apolloner wrote: On Saturday, July 6, 2024 at 12:30:32 AM UTC+2 Mike Edmunds wrote: Incidentally, I thought there was (used to be?) a policy that internal undocumented APIs were fair game for use by third-party libraries, subclassing

Re: Proposal to upgrade django.core.mail to Python's modern email API

2024-07-06 Thread Mike Edmunds
Ticket created: https://code.djangoproject.com/ticket/35581 On Friday, July 5, 2024 at 5:27:28 PM UTC-7 Mike Edmunds wrote: > Thanks to everyone for the feedback so far. > > It looks like all the responses to date are generally positive, and I > haven't seen any objections, so

Re: Proposal to upgrade django.core.mail to Python's modern email API

2024-07-05 Thread Mike Edmunds
Thanks to everyone for the feedback so far. It looks like all the responses to date are generally positive, and I haven't seen any objections, so I'm going to open a ticket. (Of course, additional feedback—positive or negative—and advice is very much appreciated.) Cheers, Mik

Re: Proposal to upgrade django.core.mail to Python's modern email API

2024-07-05 Thread Mike Edmunds
part. Most email clients aren't that picky, and display the inlines anyway (if they handle inline images at all), but it would be helpful to have a way to generate the correct message structure. Just… later. - Mike -- You received this message because you are subscribed to

Re: Proposal to upgrade django.core.mail to Python's modern email API

2024-07-05 Thread Mike Edmunds
s and obsolete branches, as well as forks of popular libraries. But they miss (undercount) some creative approaches <https://github.com/Tivix/django-common/blob/407d208121011a8425139e541629554114d96c18/django_common/email_backends.py#L29-L30> and any usage outside of a public repo hosted on

Re: Proposal to upgrade django.core.mail to Python's modern email API

2024-06-27 Thread Mike Edmunds
o follow. Sadly, MIMEBase attachments are a documented part of Django's EmailMessage API (and have been necessary for certain kinds of attachments), so they'll have to be dealt with one way or another. - Mike On Thursday, June 27, 2024 at 2:14:12 AM UTC-7 Tom Carrick wrote: > I'

Re: Proposal to upgrade django.core.mail to Python's modern email API

2024-06-26 Thread Mike Edmunds
Since the early feedback seems positive (though we're still waiting for more votes), here's some additional detail on the changes I think would be involved to update django.core.mail to use Python's modern email API. (See my earlier message

Re: Proposal to upgrade django.core.mail to Python's modern email API

2024-06-25 Thread Mike Edmunds
> After my comment in the steering council vote and in-person conversation with Jake, I believe the SMTP backend will not be implemented for DEP 14 Then I can improve my earlier response: I *am confident* this proposal will have *no impact* on background workers. :-) - Mike On Tuesday, J

Re: Proposal to upgrade django.core.mail to Python's modern email API

2024-06-25 Thread Mike Edmunds
EmailMessage. At the end of the day, though, all of these need to return a django.core.mail.EmailMessage that Django can hand off to an email backend for sending. - Mike _ * I suspect the EmailMultiAlternatives/EmailMessage distinction is no longer helpful. I'm fairly certain it&

Re: Proposal to upgrade django.core.mail to Python's modern email API

2024-06-24 Thread Mike Edmunds
n Python's smtplib. If any of it is still needed for SMTP, I'd probably want to move that code into the SMTP EmailBackend(s). - Mike On Sunday, June 23, 2024 at 10:22:03 PM UTC-7 Arthur Pemberton wrote: > Would this be designed to be compatible with "Proposal 14: Background >

Proposal to upgrade django.core.mail to Python's modern email API

2024-06-23 Thread Mike Edmunds
I want to propose updating django.core.mail to replace use of Python's legacy email.message.Message (and other legacy email APIs) with email.message.EmailMessage (and other modern APIs). If there's interest, I can put together a more detailed proposal and/or ticket, but was hoping to get some

Re: How to do a counter in DB cache class?

2021-06-01 Thread &#x27;Mike Lissner' via Django developers (Contributions to Django itself)
Wow, that's pretty great! Did you consider merging this functionality into django itself? I hadn't seen anything related before now. On Tue, Jun 1, 2021 at 11:38 AM 'Adam Johnson' via Django developers (Contributions to Django itself) wrote: > Hi Mike! > > Probabil

How to do a counter in DB cache class?

2021-06-01 Thread &#x27;Mike Lissner' via Django developers (Contributions to Django itself)
be to keep a counter in the DB and just increment it as needed, but it'd be nice to do something in memory even if it's a little less accurate, since this counter doesn't have to be exact. Anybody have thoughts on this? Thanks, Mike -- You received this message because yo

Re: Should there be a default lockfile location for SerializeMixin?

2021-05-21 Thread &#x27;Mike Lissner' via Django developers (Contributions to Django itself)
as > incorrectly configured. > > Instead, we can shift the check for the lockfile attribute to import time. > Then you don't need to go through a whole test run to find misconfigured > tests. I've made a PR for that here: > https://github.com/django/django/pull/14427 &g

Should there be a default lockfile location for SerializeMixin?

2021-05-20 Thread &#x27;Mike Lissner' via Django developers (Contributions to Django itself)
ld just mean using the `--parallel` flag, identifying tests that failed, and mixing in the SerializeMixin into each of those tests. It'd be much easier. Currently if the property is missing, you get a ValueError. Thoughts? Mike -- You received this message because you are subscribed

Re: Do people actually squash migrations?

2021-05-17 Thread &#x27;Mike Lissner' via Django developers (Contributions to Django itself)
Thanks for those links. I went ahead and filed a PR that describes a new "Migration Trimming" process. I'd love comments and suggestions if folks are interested and able: https://github.com/django/django/pull/14408 Mike On Mon, May 17, 2021 at 8:27 AM René Fleschenberg wrot

Re: Do people actually squash migrations?

2021-05-12 Thread &#x27;Mike Lissner' via Django developers (Contributions to Django itself)
Oh, I guess there's also a step in the manual process to reset the migrations table in the DB, but I don't know how to do that. Tricky stuff! On Wednesday, May 12, 2021 at 9:37:53 AM UTC-7 Mike Lissner wrote: > So sort of sounds like an update to the squash migration docs is need

Re: Do people actually squash migrations?

2021-05-12 Thread &#x27;Mike Lissner' via Django developers (Contributions to Django itself)
tions code. I don't know how married we are to it, but it seems like there's not much energy for making it better and that lots of people have already demoted it in their minds and workflows. Thanks, Mike -- You received this message because you are subscribed to the Google Gr

Do people actually squash migrations?

2021-05-11 Thread &#x27;Mike Lissner' via Django developers (Contributions to Django itself)
ng it or fixing the bug, or updating the docs to loudly say it largely doesn't work? I'm surprised the issue above has so little movement since it was created seven years ago. Maybe it's just me? If not, it'd be nice to do something to help future people with ambitions of a

Re: Docs improvement? - MEDIA_URL in templates

2021-01-30 Thread Mike Nicholson
how to do this? On Sat, 30 Jan 2021, 17:16 Tim Graham, wrote: > Hi Mike, > > I think you want to use {{ user.avatar.url }}. > > > https://docs.djangoproject.com/en/dev/ref/models/fields/#django.db.models.fields.files.FieldFile.url > > For future reference, since this i

contrib.auth.Group comment

2020-06-17 Thread Mike Dewhirst
ows ... comment = models.TextField(_("comment"), default="", blank=True) I see this as a security improvement because human error in assigning group permissions can make security holes. Cheers Mike -- You received this message because you are subscribed to the Google Gr

Translation templatetag aliases

2019-07-26 Thread &#x27;Mike Hansen' via Django developers (Contributions to Django itself)
and pull request to Django at https://code.djangoproject.com/ticket/30585 . The ticket was closed as "wontfix", and it was mentioned that I should bring it to django-developers if I wanted to make further progress on the ticket. Thanks, --Mike -- You received this message because you are subsc

Re: Signals - Need a signal after annotations are added

2019-02-23 Thread Mike Brown
> > I think this is a request for a signal that fires after those attributes > have been added to the model instances. > Yes. On Saturday, February 23, 2019 at 12:08:43 PM UTC-8, Mike Brown wrote: > > I have a situation where I need a signal for when a model object is ful

Signals - Need a signal after annotations are added

2019-02-23 Thread Mike Brown
I have a situation where I need a signal for when a model object is fully instantiated. Currently, there are signals for pre_init and post_init. However, when post_init is fired, the object is not fully 'initialized' in the sense that annotations have not yet been added to the object. In dja

Not Found "/lobby/" django-channels routing error

2018-04-04 Thread Mike Johnson Jr
*routing.py* *from channels import include, route* *from chat import consumers* *from . import game_consumers* *channel_routing = [* * #game routing* * route('websocket.connect', game_consumers.ws_connect_lobby, path=r"^/lobby/$"),* *route('websocket.receive', gam

Re: Support for `Q` objects in `get_or_create` and `update_or_create`

2018-02-21 Thread &#x27;Mike Lissner' via Django developers (Contributions to Django itself)
OK, I created a ticket, but I fear I'm not the best person to get the docs ironed out. I took a stab at it, but it was terrible and I got the sense it'd get rejected for not explaining things properly/well. Perhaps somebody else can pick this up: https://code.djangoproject.com/ticket/2

Re: Support for `Q` objects in `get_or_create` and `update_or_create`

2018-02-20 Thread &#x27;Mike Lissner' via Django developers (Contributions to Django itself)
thread a while back to write some code, but when I came upon the code today, it baffled me. I went to the docs, but there was no mention of this technique there, and so, here I am again at this thread. Thanks, Mike On Tuesday, August 16, 2016 at 12:27:30 PM UTC-7, Flavio Curella wrote: > &g

Websocket, django-channels - an existing connection was forcibly closed by the remote host

2017-06-25 Thread Mike Johnson Jr
So I'm getting the error as described in the title of this post. I'm following this tutorial: https://gearheart.io/blog/creating-a-chat-with-django-channels/ Here's the full traceback: In [1]: import websocket In [2]: ws = websocket.WebSocket() In [3]: ws.connect("ws://localhost:8000")--

Re: Should ugettext_lazy return instanceof unicode? Or are reusable apps responsible for calling force_text a lot?

2016-10-24 Thread Mike Edmunds
code." Per Moritz's comments, it sounds like really the only practical resolution is adding a note to the docs. I'll open a ticket/PR to update the ugettext_lazy docs, clarifying that the result is not necessarily usable "wherever" you can use unicode. Cheers, Mike P

Should ugettext_lazy return instanceof unicode? Or are reusable apps responsible for calling force_text a lot?

2016-10-21 Thread Mike Edmunds
a sequence of individual character params. [Above is all Python 2.7, but also applies to python3; substitute "str" wherever I wrote "unicode". Django 1.8--1.10, and probably others.] Thanks for any advice. Happy to take a shot at proposing doc changes, if that's the

Re: Making Django more PaaS-friendly

2016-04-19 Thread Mike Bryant
s, to aid in our deployments into AWS we went with pulling in environment variables named DJANGO_{setting_name} and coercing them into valid settings. I mention this here as it seems to be of relevance to the audience, and I'd welcome any feedback. Apologies if this is just noise. Mike

Re: Enhancement to the call_command function to allow the use of modules as arguments

2015-08-18 Thread Mike Lissner
On Tuesday, August 18, 2015 at 12:00:30 PM UTC-4, Carl Meyer wrote: > > (Doc patches to better reflect that principle in the management command > docs are welcome, IMO.) > > Yeah, it's sounding like this is the change that's needed here. Probably the place to do that is here: https://docs.djan

Re: Enhancement to the call_command function to allow the use of modules as arguments

2015-08-18 Thread Mike Lissner
I see. Could this concern be addressed by adding it to the checks framework, so that it throws a warning if there are ever two commands with the same name? On Mon, Aug 17, 2015 at 11:16 AM Aymeric Augustin < aymeric.augus...@polytechnique.org> wrote: > 2015-08-17 16:54 GMT+02:00 Mik

Re: Enhancement to the call_command function to allow the use of modules as arguments

2015-08-17 Thread Mike Lissner
Thanks for the response, Aymeric. Comments inline. Mike On Sunday, August 16, 2015 at 1:41:19 PM UTC-4, Aymeric Augustin wrote: In general I would suggest to factor your business logic into a function > that you can call independently from the management command. This is better > for t

Enhancement to the call_command function to allow the use of modules as arguments

2015-08-16 Thread Mike Lissner
I recently filed a bug about this and was redirected here for discussion. While using call_command (which simplifies calling management commands), it occurred to me that the API is a little strange. It currently is designed to work like this: c

Re: A.objects.getdefault

2013-01-26 Thread Mike Fogel
+1 to replacing earliest() and latest() with order_by('field').first() and .last(), respectively. I'm not a fan of the implied semantics of 'earliest' and 'latest' - as if they only worked with time-based fields. Mike On Tuesday, January 22, 2013 3:03:22

Re: Class based views: A standard hook for http-method-independent code

2012-11-20 Thread Mike Fogel
+1, this allows me what I want - to have http method-independent code that uses self.args, self.kwargs and self.request. On Sunday, November 18, 2012 1:52:07 PM UTC-8, Jordan Hagan wrote: > > +1, this looks like a better solution than the hook method. > > On Sat, Nov 17, 2012 at 7:52 AM, Jeremy D

Re: Class based views: A standard hook for http-method-independent code

2012-11-07 Thread Mike Fogel
I prefer django-rest-framework's flow through dispatch(). You can override self.initial() to safely execute method-agnostic logic, but unlike your example, it doesn't have to return a response object. The response object is returned by the appropriate self.() as usual. https://github.com/tomchr

Re: Add a "split" field to a model causes problems

2012-11-04 Thread Mike Johnson
Ahh, got it now. Thanks! On Sunday, November 4, 2012 1:10:48 PM UTC-8, Andrew Ingram wrote: > > Hi Mike, > > It looks like I missed part of the problem, namely that abstract models > are involved. These model definitions should trigger the error: > > from django.db import m

Re: Add a "split" field to a model causes problems

2012-11-04 Thread Mike Johnson
Hi Andrew, I'm trying to come up with a test case for this and am struggling to reproduce the problem in test. Can you post some code to help us reproduce it? Thanks, Mike On Tuesday, October 23, 2012 3:52:10 AM UTC-7, Andrew Ingram wrote: > > Hi all, > > This one stung me

Re: Problems with date-based generic views when USE_TZ=True

2012-04-27 Thread Mike Yumatov
zone (which can be changed for request on some projects), so you can't share this URLs with others and be sure, that they will work for others. -- Mike Yumatov -- You received this message because you are subscribed to the Google Groups "Django developers" group. To post to

Problems with date-based generic views when USE_TZ=True

2012-04-27 Thread Mike Yumatov
This issue affects trunk and 1.4 versions of Django. -- Mike Yumatov -- You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com. To unsubscribe from this group, s

Re: Implementation of Object Permissions

2012-04-13 Thread Mike Axiak
How does it compare to the solutions that already exist listed here? http://djangopackages.com/grids/g/perms/ -Mike On Fri, Apr 13, 2012 at 7:56 PM, Moritz S. wrote: > Hi all, > > I have been using django for a while and became happy by the time I > discovered the auth module t

Re: Django should not use `force_unicode(..., errors='replace')` when parsing POST data.

2012-03-29 Thread Mike Axiak
gy is taken. -Mike On Thu, Mar 29, 2012 at 2:31 PM, Alex Ogier wrote: > On Mar 29, 2012 5:43 AM, "Tai Lee" wrote: >> >> I've just created an essay *cough* I mean ticket about the way Django >> silently mangles POST data that is incorrectly encoded, and how thi

Re: Class based views: A standard hook for http-method-independent code

2012-03-16 Thread Mike Fogel
number of times, including today. If one of the core devs will nod approval on this, I'll open a ticket and attach this gist to it. Cheers, Mike On Mar 4, 9:45 am, Tino de Bruijn wrote: > I don't really see what difference another function makes. > Sayhttps://gist.github.com/195

Re: incorrect check email with 'email_re' in 'django.core.validators'

2011-12-19 Thread Mike Axiak
l.com.". I would be extremely surprised if a combination of email client/server does not deliver that to you. Regards, Mike -- You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email t

Re: Django NoSQL support status?

2011-08-12 Thread Mike Malone
I've been away from these efforts for a while, but someone interested in bridging SQL/NoSQL in Django might find these links interesting: http://msdn.microsoft.com/library/bb308959.aspx http://cacm.acm.org/magazines/2011/4/106584-a-co-relational-model-of-data-for-large-shared-data-banks/fulltext h

Re: Contextual autoescaping for Django templates

2011-06-23 Thread Mike Samuel
Ok. I'll hold off for now and maybe reopen this thread after there's a better sense of how custom processing passes plug in. On Jun 23, 4:51 pm, Alex Gaynor wrote: > No, there is at this.point no concrete proposal. > > Alex > On Jun 23, 2011 4:04 PM, "Mike Samuel&

Re: Contextual autoescaping for Django templates

2011-06-23 Thread Mike Samuel
On Jun 23, 11:36 am, Alex Gaynor wrote: > FWIW it's likely that Armin and I will be proposing a new, higher level, > template tag API in the coming weeks/months, as the current API is > fundamentally incompatible with good template compilation. > > Alex Good to know. Is there a draft of that t

Re: Contextual autoescaping for Django templates

2011-06-23 Thread Mike Samuel
On Jun 21, 3:55 pm, Luke Plant wrote: > On 21/06/11 20:07, Mike Samuel wrote: > > I'd like to add contextual autoescaping to django templates. > > > Briefly, it would automatically pick filters for each {{variable}} by > > looking at the context in which it appears.  So inside a

Contextual autoescaping for Django templates

2011-06-21 Thread Mike Samuel
I'd like to add contextual autoescaping to django templates. Briefly, it would automatically pick filters for each {{variable}} by looking at the context in which it appears. So inside a

Re: Composite primary keys

2011-03-17 Thread Mike Axiak
b = models.ForeignKey(B) pair = models.CompositeField(('a', 'b'), primary_key=True) (Note the quotes around the field names.) Not that it matters too much, but I think any discussion of syntax should have valid python. Cheers, Mike -- You received this message be

Re: Feature request: Abstract ManyToManyField

2011-02-04 Thread Mike Lindsey
f course). I'm doing pretty well in the schedule for this project, so I'll see if I can't get a workable patch done to submit back. If not, then I'll go file the feature request. -- Mike Lindsey -- You received this message because you are subscribed to the Google Grou

Re: Feature request: Abstract ManyToManyField

2011-02-04 Thread Mike Lindsey
ToManyField is the name of the attribute placed on the other model for the reverse reference. -- -- Mike Lindsey -- You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups

Re: Feature request: Abstract ManyToManyField

2011-02-04 Thread Mike Lindsey
tionship of '%(class)s_hostgroup' like: HostGroups<-> Hosts Or is a tree-like structure like: ...<-> HostGroups1<-> Hosts1<-> HostGroups2<-> Hosts2<-> Where HostGroup2 has a relationship to Hosts1 and a separate relationship to Hosts2

Re: Feature request: Abstract ManyToManyField

2011-02-04 Thread Mike Lindsey
db_table='config_host_hostgroups') I'm manipulating the data via standard admin forms, with fieldsets and filter_horizontal. All the other options I've come across for this kind of data model don't work with fieldsets OR filter_horizonta

Feature request: Abstract ManyToManyField

2011-02-03 Thread Mike Lindsey
syncdb; repeating until syncdb finishes successfully. What would make this exceptionally easy, is if there was the option to set 'abstract=True' on second iteration of each of the ManyToManyFields, telling syncdb to not attempt to create it. Thoughts? -- Mike Lindsey -- You received thi

Re: Purpose of constant_time_compare?

2010-12-09 Thread Mike Malone
smart people who put up with the same sort of silly wankery from me sometimes. So whatever. <3, Mike -- You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-develop...@googlegroups.com.

Re: Purpose of constant_time_compare?

2010-12-08 Thread Mike Malone
g place when you get that many bad requests for one account. Mike On Wed, Dec 8, 2010 at 12:10 PM, Alex Gaynor wrote: > > > On Wed, Dec 8, 2010 at 3:08 PM, Jonas H. wrote: > >> Hello out there, >> >> what is the point of `django.utils.crypto.constant_time_compare`?

Re: Feature request - set variables in template

2010-08-26 Thread Mike Axiak
]. personally think Django templates are great for large sites where the forced discipline matters a bit more, and I use Jinja for smaller sites where I don't plan on scaling too far. Cheers, Mike 1: http://jinja.pocoo.org/ On Thu, Aug 26, 2010 at 9:22 PM, Yo-Yo Ma wrote: > I see what you&#

An opportunity for Django community

2010-06-23 Thread Mike Scott
I've watched the video of the keynote speech, and the following struck me as an "opportunity for django". Ala the speech given. http://www.google.com/buzz/ianbicking/BRWDjsMCGWQ/I-like-the-original-proposal-move-PyPI-stuff-into#127681396096 Thoughts? -- You received this message because y

Re: django template revision (for 1.4?)

2010-05-26 Thread Mike Axiak
Hello, Also keep in mind that the triple brackets introduce their own set of issues. For example, in LaTeX templates I've seen:: \title{{{ publication.title }}} Which works perfectly fine right now. Would this work under your proposal? Cheers, Mike On Wed, May 26, 2010 at 6:28 PM, D

Re: logging?

2010-05-05 Thread Mike Axiak
tter suited for an external app to bake. I'd say that the main issue here isn't with lack of logging, but with lack of a good one-stop Django app repository (DjangoZen [2] is a start, but missing a lot of functionality). Unfortunately I don't have time to maintain something lik

Re: Upgrading Trac

2010-04-30 Thread Mike Axiak
effort by the commiters, but it is something to keep in mind. Cheers, Mike -- You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-develop...@googlegroups.com. To unsubscribe from this group

Re: Process discussion: reboot

2010-04-19 Thread Mike
views are not exactly match yours. 2. Just ignore such discussions, they are inevitable, unless you'll make this list moderated. Regards, Mike [1] Number of commits and changed lines per developer for the tr...@13001: # #Comm %Cum% #Lines %Cum% developer

Re: High Level Discussion about the Future of Django

2010-04-18 Thread Mike Scott
I agree almost whole-heartedly with the perception that David portrays. His feelings almost mirror mine. Albeit I haven't submitted contributions to the django development process I've been involved with a number of issues and come away with similar feelings viewing the process. I love what those

Re: High Level Discussion about the Future of Django

2010-04-16 Thread Mike
d it as "If you do not like our policy then stability, maturity, and longevity aren't your priorities". With all due respect it is not fair. Regards, Mike -- You received this message because you are subscribed to the Google Groups "Django developers" group.

Re: Application to update the Test Suite

2010-04-09 Thread Mike Malone
t ones that don't. Of course fast tests that do the right thing would be ideal. Mike -- You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-develop...@googlegroups.com. To unsubscr

Re: Deprecating cmemcache, adding pylibmc

2010-02-22 Thread Mike Malone
ort the memcache client in __init__ or something. Not the end of the world, but kind of messy. > Mike's http://github.com/mmalone/django-caching has some good examples of > fixing 2/3 FWIW, the "more correct" way to do this is to create your own custom cache backend like thi

Re: phone2numeric doesn't convert "Q" or "Z"

2010-01-15 Thread Mike Axiak
global _phone_chars_compiled if _phone_chars_compiled is None: _phone_chars_compiled = {} for i in range(256): a = chr(i) b = a.upper() _phone_chars_compiled[a] = _phone_chars.get(a, a) _phone_chars_

Re: phone2numeric doesn't convert "Q" or "Z"

2010-01-15 Thread Mike Axiak
x27;: '9', } _phone_chars_compiled = None def phone2number(szinput): global _phone_chars_compiled if _phone_chars_compiled is None: _phone_chars_compiled = {} for i in range(256): a = chr(i) _phone

Re: preventing brute forcing passwords

2009-12-17 Thread Mike Axiak
most well informed post.) Cheers, Mike On Thu, Dec 17, 2009 at 5:31 PM, tie wrote: > And here is another stab at it: > http://code.google.com/p/django-brutebuster/ > > On Dec 17, 9:30 pm, Tom wrote: >> Hello Everyone, >> >> I noticed that Django's cont

Re: What do people think about the get_absolute_url proposal?

2009-12-16 Thread Mike Malone
On Wed, Dec 16, 2009 at 11:10 AM, Alex Gaynor wrote: > On Wed, Dec 16, 2009 at 2:02 PM, Mike Malone wrote: >>> The way i see it (which may be wrong), this is not a proposal to make >>> the request object global or replace/refactor the contrib.site app. In >>&g

Re: What do people think about the get_absolute_url proposal?

2009-12-16 Thread Mike Malone
rom the currently active request. Thoughts? Mike -- You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-develop...@googlegroups.com. To unsubscribe from this group, send email to django-deve

Re: What do people think about the get_absolute_url proposal?

2009-12-14 Thread Mike Malone
On Sat, Dec 12, 2009 at 3:58 PM, Ivan Sagalaev wrote: > Mike Malone wrote: >> On Tue, Dec 8, 2009 at 7:52 PM, Russell Keith-Magee >> wrote: >>>  4. I share Mike's concern about using settings.SITE_ID to determine >>> the current host, but I'm not sure

Re: What do people think about the get_absolute_url proposal?

2009-12-09 Thread Mike Malone
On Tue, Dec 8, 2009 at 7:52 PM, Russell Keith-Magee wrote: >  4. I share Mike's concern about using settings.SITE_ID to determine > the current host, but I'm not sure I have any suggestions on how we > could practically use request, short of encouraging the use of a > template tag like {% obj_url

Re: What do people think about the get_absolute_url proposal?

2009-12-08 Thread Mike Malone
usable by models without introduction global state. Mike On Mon, Dec 7, 2009 at 2:43 PM, Simon Willison wrote: > This made it to the 1.2 feature list: > > http://code.djangoproject.com/wiki/ReplacingGetAbsoluteUrl > > If we want this in 1.2, it could be as simple as merging the get_url

Re: Template Caching - Ticket #6262

2009-11-16 Thread Mike Malone
K, I just uploaded another patch to ticket #6262. Comments inline. On Mon, Nov 16, 2009 at 5:58 AM, Russell Keith-Magee wrote: > On Thu, Nov 12, 2009 at 9:15 AM, Mike Malone wrote: >> Sup, >> >> I've been working on template caching (ticket #6262) with a mister &g

Template Caching - Ticket #6262

2009-11-11 Thread Mike Malone
ternative-template-language Thanks, Mike -- You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-develop...@googlegroups.com. To unsubscribe from this group, send email to django-developers+u

Re: Integrating Django with Tornado's web server

2009-09-14 Thread Mike Malone
s where it could be improved). Armin Ronacher was talking about updating the WSGI PEP at DjangoCon and was soliciting ideas, so you may want to get in touch with him and offer some suggestions for making WSGI work with high performance containers like Tornado. Mike --~--~-~--~~--

Re: App Engine support

2009-08-29 Thread Mike Malone
e so useful is because they force you to rethink your data and store it in a way that makes it efficient to retrieve. You lose this benefit if you hide the efficient interface exposed by the datastore behind a layer that does a bunch of inefficient stuff. Mike --~--~-~--~~~-

Re: App Engine support

2009-08-28 Thread Mike Malone
rface. Might want to check that out too. http://github.com/sixapart/remoteobjects/tree/master Mike --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to djan

Re: Template Caching

2009-08-06 Thread Mike Malone
extends changes. I spent a lot of time deciphering that code and I'm fairly confident that the patch duplicates the existing functionality, but it was rather complicated code and it's important we don't mess something up that's used by pretty much every Django app in the wild ;). Mi

Template Caching

2009-08-05 Thread Mike Malone
mplementation assumes you're passing in a string containing the module path. 3. Implement a caching version of each existing template loader. I've implemented option 2, and I think it's probably the best alternative. Looking forward to hearing your comments, suggestions, ridicu

Re: [GSOC] Multi-DB Update

2009-05-01 Thread Mike Panchenko
I would agree with you on the dict issue, given that some of the backends have custom settings etc. I also agree that this is not really something that matters now - DSNs will need to be parsed into dicts anyway, so you might as well implement the dicts first and then see what the demand is for DS

Re: Use RequestContext if possible in default 500 error view

2009-04-30 Thread Mike Panchenko
howing the user something cryptic because of an obscure error in the error template. Mike. On Thu, Apr 30, 2009 at 3:31 PM, Igor Sobreira wrote: > > > On Thu, Apr 30, 2009 at 10:43 AM, Karen Tracey wrote: > >> >> With the try/except, if in fact there's trouble creat

Re: module to run django under mod_fcgid

2009-02-03 Thread Mike
> I understand that it's possible this handler may offer some alternative > options that in some situation is better or different from any existing > option. Such as, mod_fcgid is already installed for running perl, ruby, php. Some hosts still do not support django, so there may well be interest

Re: module to run django under mod_fcgid

2009-02-02 Thread Mike
Thank you for your reply - I'll try the places you listed. Logging in to the ticket system didn't get me past the spam filter though. On Feb 2, 9:44 am, Waylan Limberg wrote: > On Mon, Feb 2, 2009 at 8:57 AM, Mike wrote: > > > I tried to post this to the django ticket s

module to run django under mod_fcgid

2009-02-02 Thread Mike
With a modified version of Robin Dunn's fcgi.py module that adapts fcgi to wsgi, I've set up Django to run under mod_fcgid. One good thing about mod_fcgid is that it does all process management for you, which makes this setup quite straightforward. Also, since Robin's module works both in a cgi a

Re: Controlling form/widgets output

2009-01-21 Thread Mike Amy
The FormRenderer idea is a good one. But how about generalised Renderer objects that take or inherit a template list, build a context and then can be passed around to fill in the details. Update-able at construction, processing or rendering, and able to be passed straight into another context for

Re: Perl port of the django template system.

2008-12-16 Thread Mike Axiak
but being strict--- especially w.r.t. naming ---is not one of them. Cheers, Mike --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-develo

Re: Additional Fields in Core

2008-12-15 Thread Mike Axiak
th. (And I think if they subclass TextField they are reasonably easy to do without too much backend awareness.) My $0.02, Mike On Mon, Dec 15, 2008 at 5:07 PM, David Cramer wrote: > > I'd like to propose the addition of some useful (and common) fields in > the django core. Things li

Re: BitmaskField

2008-12-05 Thread Mike Axiak
f there do seem to be hurdles in creating your own BitMaskField (perhaps in syncdb?), then that seems like a limitation in the ORM. Though, everything else I've tried with the ORM recently has shown it to be very flexible and I wouldn't expect this to be any different. -Mike On Fri, Dec

Re: Dropping Python 2.3 compatibility for Django 1.1

2008-11-26 Thread Mike Scott
I'm +1 for the reasons of lack of upstream support. On Wed, Nov 26, 2008 at 10:42 PM, mrts <[EMAIL PROTECTED]> wrote: > > On Nov 26, 3:20 am, Julien Phalip <[EMAIL PROTECTED]> wrote: > > On Nov 26, 11:43 am, "Russell Keith-Magee" <[EMAIL PROTECTED]> > > wrote: > > > > > > > On Wed, Nov 26, 2008 a

Re: RequestContext rarely used (branched from Feature reviews for 1.1)

2008-11-17 Thread Mike Scott
For all three of our projects in django, we've gone through and used our own exended version of render_to_response, which uses RequestContext by default. Its such a blessing. On Tue, Nov 18, 2008 at 7:42 PM, James Bennett <[EMAIL PROTECTED]>wrote: > > On Tue, Nov 18, 2008 at 12:04 AM, Yuri Baburo

Re: Django documentation index redesigned

2008-11-17 Thread Mike Scott
+1! Just one suggestion - if the final "bateries included" could be split into contrib apps, and core library that'd be nicer. On Tue, Nov 18, 2008 at 8:44 PM, Adrian Holovaty <[EMAIL PROTECTED]> wrote: > > After months of being frustrated (and hearing other people being > frustrated) with our n

Re: Proposal: Optional {% default %} clause for the {% for %} template tag

2008-10-30 Thread Mike Panchenko
+1 for {% empty %} I also think this would be very useful On Thu, Oct 30, 2008 at 6:55 AM, dc <[EMAIL PROTECTED]> wrote: > > How about > > {% for item in items %} > {% otherwise %} > {% endfor %} > > form? > > And -1 for the {% else %}. > > > > --~--~-~--~~~---~--~--

Re: auto_now_add and auto_now

2008-10-13 Thread Mike Scott
o. Cheers, Mike. On Mon, Oct 13, 2008 at 10:07 PM, Thierry Stiegler < [EMAIL PROTECTED]> wrote: > > Hi, > > I have a lot of models using this type of fields : > >creation = models.DateTimeField(auto_now_add=True) >update = models.DateTimeField(auto_now=True) >

  1   2   >