Re: A shortcut for django.core.urlresolvers.reverse

2007-04-18 Thread Matt
ntext(request)) to: return HttpResponse(loader.render_to_string(template_name, context, RequestContext(request))) M. -- Matt Riggott (mailto:[EMAIL PROTECTED]). Dictated but not read. --~--~-~--~~~---~--~~ You received this message because you are subscribed

Re: "selected" for ForeignKey field?

2005-10-05 Thread Matt
following just before "if data is None": if data is None: data = self.data.get('%s_id' % field.field_name, None) Ugly, but does the right thing. Can someone shed light on why this is needed? Thanks. - matt Pedro Furtado wrote: > I am ha

timesince filter and months

2005-10-05 Thread Matt
. I guess this is just supposed to be a fuzzy representation, but does anyone have ideas on a change to take actual months into account? Thanks. - matt

Make DATABASES[x]['TEST']['USER'], etc available for non-Oracle DBs

2015-09-20 Thread matt
Currently, the TEST database settings like USER and PASSWORD are only used by the Oracle backend. See: https://docs.djangoproject.com/en/dev/ref/settings/#std:setting-TEST_USER I just hit a case where it would be nice to use a different database user during testing -- and I don't use Oracle.

Re: DjangoCon

2008-07-20 Thread Matt
On Jul 18, 1:21 pm, "James Bennett" <[EMAIL PROTECTED]> wrote: > When the time comes there will be a large and loud public announcement > that you will not be able to miss. Somehow when those large and loud public announcements happen I seem to get them about 10 minutes after everyone else. --

Re: DEPs: Django Enhancement Proposals

2014-04-28 Thread Matt
And DEP20 for Django philosophy :} https://docs.djangoproject.com/en/dev/misc/design-philosophies/ -- You received this message because you are subscribed to the Google Groups "Django developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-d

Re: Support byte range requests in django.views.static.serve

2014-06-30 Thread matt
Here is the commit for adding HTTP range support. I tested it in late versions of Chrome, Firefox, Opera and IE. https://github.com/satchamo/django/commit/2ce75c5c4bee2a858c0214d136bfcd351fcde11d The RangedFileReader class may be superfluous but I'm not aware of anything in Django or the Python

Races in sessions

2021-02-07 Thread Matt
The "post_comment" example of sessions appears to be incorrect: https://docs.djangoproject.com/en/3.1/topics/http/sessions/#examples Imagine two HTTP requests coming in at the same time, both seeing that "has_commented" is False, and then both create a comment and set the session variable to Tr

Re: Races in sessions

2021-02-07 Thread Matt
Adam Johnson wrote: > Stephen - you're right that a constraint is the best way to enforce > consistency in the DB. That doesn't fit every use case for sessions though > - people use Django's built-ins with many different kinds of data stores > that don't support l

Stop QuerySet repr from executing queries

2019-10-10 Thread Matt
repr(some_queryset) will execute the query and display some results from the query. This is done because it's (somewhat) helpful for debugging. https://github.com/django/django/blob/2a6f45e08e8cb8c7e5157915c378b453109424d2/django/db/models/query.py#L248 This has caused at least two people to sc

Re: Stop QuerySet repr from executing queries

2019-10-11 Thread Matt
like such a minor thing. And I don't know of any precedent for changing the behavior of Django in an interactive shell (and you can tell I'm not a fan of inconsistent behaviors). I'm going to re-open the ticket and hope other Django devs chime in. On Thursday, October 10,

Re: Stop QuerySet repr from executing queries

2019-10-14 Thread Matt
T ... FROM HugeTable ORDER BY NonIndexedColumn LIMIT 21 (locking it up) 8. Bonus: Trigger all of the above on all your wsgi processes In short, just call repr(BigTable.objects.all()) (where BigTable has an ordering on an non-indexed column and lots of rows) On Thursday, October

Re: Stop QuerySet repr from executing queries

2019-10-20 Thread Matt
Perhaps we ought to just keep the current behavior when DEBUG is True (it seems so obvious now, I can't believe it wasn't the first thing I suggested)? Django does lots of helpful things in DEBUG mode at the expense of performance. I think this would be an innocuous change for most people. It

Using auth stuff without installing the auth app

2016-03-22 Thread Matt
I like to use the authentication machinery in Django, without explicitly putting 'django.contrib.auth' in INSTALLED_APPS. This prevents a bunch of unused tables from being creating in the database. This was possible in earlier version of Django. In 1.8, a spurious warning was generated, but tha

Re: Using auth stuff without installing the auth app

2016-03-23 Thread Matt
r any > model imports. Since the usage of any of the backends requires models, the > import there seems fine -- I'd import RemoteUserBackend in > RemoteUserMiddleware.__init__ -- A patch would be very welcome. > > Cheers, > Florian > > On Wednesday, March 23, 2016

Re: Using auth stuff without installing the auth app

2016-03-23 Thread Matt
Apolloner wrote: > > > > On Wednesday, March 23, 2016 at 8:36:39 PM UTC+1, Matt wrote: >> >> I created https://code.djangoproject.com/ticket/26401 >> <https://www.google.com/url?q=https%3A%2F%2Fcode.djangoproject.com%2Fticket%2F26401&sa=D&sntz=1&usg=AFQjCNG7tek6

Re: Using auth stuff without installing the auth app

2016-03-23 Thread Matt
> > > On Thursday, March 24, 2016 at 12:07:14 AM UTC+1, Matt wrote: >> >> > the ModelBackend uses the Permission model, so why would that ever >> work without beeing in INSTALLED_APPS? >> >> ModelBackend.authenticate() doesn't use the permissions mod

Re: Let's schedule a Django sprint

2007-09-13 Thread Matt
flat so if anyone in the area wants to join us, email me for the address. Cheers, M. -- Matt Riggott (mailto:[EMAIL PROTECTED]). Dictated but not read. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django

Django on iPhone

2007-10-01 Thread Matt
Found a nice tutorial on how to install Django on your iPhone: http://flickr.com/photos/skatterbean/1173984622/ Enjoy, Matt Sterger --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers"

Check Constraints for databases that support them

2009-09-26 Thread Matt Schinckel
I'm very interested in the idea of expanding the database level constraints that can be supplied to a database schema, and also automatically apply the same constraints to the model/view in django. The various backends that support them, I believe already apply such constraints for PositiveIntege

Re: Check Constraints for databases that support them

2009-09-26 Thread Matt Schinckel
, which I have just started using for migrations. It doesn't have anything in there that is that useful, other than raw SQL. Which can do those type of things, but it is nicer to move into the declaration. Matt. --~--~-~--~~~---~--~~ You received this me

Re: Adding signing (and signed cookies) to Django core

2009-10-05 Thread Matt Brubeck
On Sep 24, 10:18 am, Simon Willison wrote: > This offers two APIs: sign/unsign and dumps/loads. sign and unsign > generate and append signatures to bytestrings and confirm that they > have not been tampered with. dumps and loads can be used to create > signed pickles of arbitrary Python objects.

Re: Adding signing (and signed cookies) to Django core

2009-10-06 Thread Matt Brubeck
On Oct 5, 1:44 pm, Simon Willison wrote: > Other than dates being a bit more annoying to pass around, I really > don't think that telling people they can only dumps/loads JSON- > encodable data would be a huge burden. You could use YAML instead if you want date support... although JSON does seem

Re: Feature Request: Reinteract

2009-11-27 Thread Matt Schinckel
On Nov 27, 10:07 pm, noel wrote: > I really love this application Reinteract. Its an enhancement to > Python Interactive Shell. And it would be lovely if I can use > Reinteract with manage.py shell. Have a look at bpython. I have a command set up where I can run ./manage.py bshell And I get a

Re: why last_login in django.contrib.auth.models.User cannot be null?

2009-12-15 Thread Matt Schinckel
en logs in. This could occur if a person creates password reset requests for a user that is not themself. Matt. -- 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: why last_login in django.contrib.auth.models.User cannot be null?

2009-12-15 Thread Matt Schinckel
> on this field not being null? > What isn't clear is that this value must be after 1900: I had used a value of datetime(1,1,1,0,0) as "never logged in", but this fails with password reset. Matt. -- You received this message because you are subscribed to the Google Groups &q

Re: dbsettings, and user configurable app settings

2010-03-10 Thread Matt Boersma
On Wed, Mar 10, 2010 at 7:51 AM, Brian Rosner wrote: > > On Mar 10, 2010, at 7:16 AM, Joan Miller wrote: > >> It's a disaster from the maintenance view point. If it were not so, >> then people would not be proposing to refactor the settings as has >> been made in Pinax, or from multiple posts so m

Progressing #8901 "last_insert_id() for postgres fails when the autoincrement sequence name is too long"

2010-05-25 Thread Matt Hoskins
've noted on the issue, although maybe I should flag it thus). Regards, Matt -- 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 gro

Re: Progressing #8901 "last_insert_id() for postgres fails when the autoincrement sequence name is too long"

2010-06-03 Thread Matt Hoskins
get the ticket moved along (and whether my tests are sufficient and in a good enough place in the test suite). Regards, Matt On May 25, 12:00 pm, Matt Hoskins wrote: > I think (from squinting at the code) that in Django 1.2 m2m field > updates now use the object save code to add relati

Re: Progressing #8901 "last_insert_id() for postgres fails when the autoincrement sequence name is too long"

2010-06-03 Thread Matt Hoskins
it - I was just wanting to make sure my updated patch was on someone's radar to get looked at eventually so it's great to hear you've picked it up (it's not urgent at all for me - just thought I'd check before it slipped my mind :). Hope you're having some luck getti

Re: Decision required: PostgreSQL minimum versions

2010-06-09 Thread Matt Hoskins
out it being a known issue just because the change in m2m saves means that users (like me) who have a combination of a longish model name and a longish m2m field name will find things break on upgrading from 1.1 to 1.2 so you'd want to warn them off doing so! Matt -- You received thi

Re: Decision required: PostgreSQL minimum versions

2010-06-09 Thread Matt Hoskins
> If we'd thought of it, dropping 7.4 support in 1.2 would have been the > right thing to do. However, retroactively doing so now would be abuse > of the time machine privileges and I'd like to avoid being grounded. > #1's not worth the effort, so that just leaves #2, which sounds about > right to

Make "required=True" on forms.fields.NullBooleanField do something useful?

2010-06-17 Thread Matt Hoskins
change would be in to_python in the latter to check in the case where it would return None if self.required is true and raise the validation error if that's the case (i.e. similar to what BooleanField.to_python does for values of False). Matt -- You received this message because you are subscr

Re: Make "required=True" on forms.fields.NullBooleanField do something useful?

2010-06-17 Thread Matt Hoskins
For the reasons I gave in my explanation above - which bit isn't clear? > If you require a "Yes" or "No" choice, why do you use a > NullBooleanField in the first place and not a BooleanField ? > > George -- You received this message because you are subscribed to the Google Groups "Django develo

Re: Make "required=True" on forms.fields.NullBooleanField do something useful?

2010-06-17 Thread Matt Hoskins
the default and thus the default value would be valid so the user could just hit submit without interacting with the field, whereas if the selection list includes "Unknown" and defaults to that, the user has to interact with the field and change it to "Yes" or "No" to pa

Re: Make "required=True" on forms.fields.NullBooleanField do something useful?

2010-06-17 Thread Matt Hoskins
is set to True doesn't mean that False now is not of the correct data type for BooleanField) so to_python shouldn't be doing this check. I think it's probably an oversight as the code that's now in "to_python" on BooleanField in 1.2 is what was in "clean" in 1.

Re: Django, The Web Framework for perfectionists and innovative with rechargeable batteries.

2010-07-30 Thread Matt Boersma
On Fri, Jul 30, 2010 at 2:57 PM, Jerome Leclanche wrote: > [2] People who do have ideas and do write code, but still get rejected > because their ideas don't conform to whatever the core devs need in > their websites. I don't think that's a fair criticism at all. > ... > Nice job scaring that po

Re: Solving the POST-data-lost-after-redirect problem

2006-06-07 Thread Matt McDonald
You could also use Tidy, there's a couple python wrappers for it: TidyLib wrapper: http://utidylib.berlios.de/ Classic Tidy: http://www.egenix.com/files/python/mxTidy.html Which should work on all platforms and can even be used to correct the page before outputting it. On 08/06/2006, at 1:00

Re: Proposal: default escaping (and branch request)

2006-06-21 Thread Matt McDonald
If you don't ever want to display the html then it shouldn't be stored in the first place. The escaping/removing should be done when processing the input. What's better: 1. escaping/removing when the data is saved (one time occasion) or 2. escaping/removing each time the data is used (infinit

Re: simonslaw/matt the destroyer

2006-07-27 Thread Matt Carter
Unfortunately, "Matt the Destroyer" (me) is a completely different person than "simonslaw." I'd appreciate being removed from the ban list. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

Re: Consider releasing a .95 beta

2006-07-27 Thread Matt Howell
Regardless of the merits of the issue, it certainly doesn't help things to get personal. If you want to influence the process, stay cool and keep the emotional attacks off the table. --~--~-~--~~~---~--~~ You received this message because you are subscribed to th

Re: Oracle: call for testing

2006-12-18 Thread Matt Boersma
Here is the current status of Oracle support: - Some of the backend files are already in subversion trunk, but not enough to make it functional. Don't bother testing (or patching) Oracle support in the trunk--the branch is where the action is. - Some Colorado developers, along with Jacob Kaplan-

Re: Error ORA-00918 (column ambiguously defined)

2007-01-03 Thread Matt Boersma
This is now fixed in the current boulder-oracle-sprint branch, as of changeset [4277]. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-develope

Re: Oracle: call for testing

2007-01-03 Thread Matt Boersma
Andreas, I finally got around to applying and testing your patch. Thanks very much--it makes the Oracle test environment much more flexible. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers" group

Re: Oracle indexes and tablespaces

2007-01-04 Thread Matt Boersma
At the Django-Oracle sprint a couple months ago, we discussed having an optional "tablespace" parameter when defining models, but not a separate one for the index tablespace. We didn't get around to implementing it. In Oracle-land, your requirement is actually common, not unique. I think it's

Re: SQL generated from oracle-boulder-sprint doesn't work with Oracle9i

2007-03-19 Thread Matt Boersma
Frank, I've been doing as much maintenance and bug fixing as I can on the boulder-oracle-sprint branch. I test against 9i as well as 10g XE. If you could do as James suggests and post a detailed bug report at http://code.djangoproject.com/, I'll take a look and get it fixed. thanks,

Re: GeoDjango query with foreign keys

2007-04-17 Thread Matt Bartolome
odels/query.py", line > 970, in lookup_inner > joins2, where2, params2 = lookup_inner(path, lookup_type, value, > new_opts, new_table, join_column) > File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ > python2.5/site-packages/django_gis/django/db/models/query.py&qu

A shortcut for django.core.urlresolvers.reverse

2007-04-18 Thread Matt Riggott
nice side-effect would be that it could be used in place of the few hard-coded URLs that are still hanging around in Django — in django.contrib.auth for instance: LOGIN_URL = absolute_url('django.contrib.auth.views.login') Is it worth me submittin

Oracle patch is ready

2007-04-19 Thread Matt Boersma
The "boulder-oracle-sprint" branch is ready to come home. We made a wiki page describing the goals and status of the code (quick summary: Oracle works and we think it's done, unless you tell us otherwise). Attached to that page is a patch against rev 5036 of the trunk. See here: http://code.dja

Re: Oracle patch is ready

2007-04-20 Thread Matt Boersma
. Matt On Apr 19, 10:08 pm, Jim Baker <[EMAIL PROTECTED]> wrote: > Jacob, > > As we discussed at PyCon, we can make an even stronger commitment, > since this continues to be an official project for the Front Range > Pythoneers in Boulder. But people ultimately get this work d

Re: Oracle patch is ready

2007-04-20 Thread Matt Boersma
available now: http://code.djangoproject.com/attachment/wiki/OracleBranch/django-oracle-rev5046.diff We'll try not to do this again so people can focus on the content of the patch for a bit, but these two things needed to be fixed ASAP. If you're testing the boulder-oracle-sprint branch directly, please u

Re: Oracle patch is ready

2007-04-23 Thread Matt Boersma
as-is, realizing it helps somewhat - Drop the "db_tablespace" and index tablespace keywords altogether to avoid this confusion - Add a mechanism for a default global tablespace and global index tablespace that apply unless overridden in a specific model or column Thoughts? Matt On Apr 22, 10:

Re: Oracle patch is ready

2007-04-26 Thread Matt Boersma
general feedback on the patch, and if there's any way we can facilitate it getting incorporated. Not a complaint! [ducks head] thanks, Matt On Apr 23, 7:21 pm, benk <[EMAIL PROTECTED]> wrote: > Hi Matt, > > I can see where you are going regarding the manual "massaging

Re: Question for Oracle Boulder sprinters

2007-05-11 Thread Matt Boersma
nd the opposite when loading. We'll try to implement your suggestion above ASAP unless someone has major objections. Matt --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post

Re: New mailing list: django-updates

2005-09-04 Thread Matt Croydon
Adrian, Rock on! I think it would also be helpful to have a cia bot sending updates to #django (I think we mentioned this awhile back but wanted to highlight its usefulness again). The URL is http://cia.navi.cx/ and I'm pretty sure that it's pretty easy to set up. --Matt On 9/1/

Re: Schema evolution

2006-02-27 Thread Matt Croydon
ot;real" data to worry about should use to_version_X.out to ensure integrity, making it optional is key for keeping it simple for the newbs. --Matt --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developer

Re: Template tag magic that hasn't been removed

2006-04-26 Thread Matt Croydon
uitous convention of"register = Library()" could be changed to something more conceptuallyappropriate?[1] http://code.djangoproject.com/browser/django/branches/magic-removal/django/templatetags/__init__.py--"May the forces of evil become confused on the way to your house."  -- Georg

Re: authentication by email

2012-03-08 Thread Matt Pegler
For the project I am working on, we solved this by making a custom auth backend that checks the username against the email column. We've found it to be a nice clean solution to wanting to use email addresses instead of usernames. On Thu, Mar 8, 2012 at 9:54 PM, Clay McClure wrote: > "Django is a

Re: authentication by email

2012-03-08 Thread Matt Pegler
Sorry all, disregard my previous email, I misread one thing and completely missed Wim's original message. On Thu, Mar 8, 2012 at 11:07 PM, Matt Pegler wrote: > For the project I am working on, we solved this by making a custom > auth backend that checks the username against the e

finding the source of "interesting" SQL queries

2012-10-22 Thread Matt McClure
t, an approach that the community would like to include in Django? [1]: http://nedbatchelder.com/blog/201008/global_django_requests.html -- Matt McClure http://www.matthewlmcclure.com http://www.mapmyfitness.com/profile/matthewlmcclure -- You received this message because you are subscri

Re: finding the source of "interesting" SQL queries

2012-10-22 Thread Matt McClure
Thanks, Russell. That's similar to the approach we were thinking of implementing. Hopefully we'll have a straw man to share shortly. Matt -- You received this message because you are subscribed to the Google Groups "Django developers" group. To view this discussion on

Github tags

2012-10-28 Thread Matt Austin
Hi, Would it be possible to get tags for 1.3.3, 1.3.4, 1.4.2, and 1.5 alpha tagged on the github repository? The tagging seems to have fallen behind with these releases. Thanks, -- Matt -- You received this message because you are subscribed to the Google Groups "Django developers&q

ModelMultipleChoiceField, clean and to_python

2012-12-18 Thread Matt Hoskins
I describe as "untidy" rather than as a bug as I'm not clear whether the documentation on validation is suggesting fields should have a "to_python" method and/or whether it's reasonable to expect "to_python" methods (if they exist) on form fields should work.

Feedback #24496 - Check CSRF Referer against CSRF_COOKIE_DOMAIN

2015-03-19 Thread Matt Robenolt
Ticket and patch have been submitted regarding this: https://code.djangoproject.com/ticket/24496 https://github.com/django/django/pull/4337 Since this is related to CSRF and technically weakening the strictness of the Referer check, Tim Graham suggested soliciting feedback here to get more eyeb

Potentially inconsistent behavior between test client and normal WSGI requests

2015-04-24 Thread Matt Hooks
Hi all, As I was fixing an issue in our API related to url encodings, I noticed a problem should have been caught by a test that was somehow passing. (Remember, make sure your test can fail!) If you had some path /some/path/Spam%20Ham, and a URL pattern to capture /some/path/(?P.+)$, it's not

Re: Potentially inconsistent behavior between test client and normal WSGI requests

2015-04-24 Thread Matt Hooks
o. The gevent ones dont play nice with my python3 install.) On Friday, April 24, 2015 at 5:07:59 PM UTC-4, Florian Apolloner wrote: > > > > On Friday, April 24, 2015 at 10:51:12 PM UTC+2, Matt Hooks wrote: >> >> (The behavior of the development server is similar to the test

Re: Potentially inconsistent behavior between test client and normal WSGI requests

2015-04-26 Thread Matt Hooks
> > > > On Saturday, April 25, 2015 at 8:46:58 AM UTC+2, Matt Hooks wrote: >> >> I'm not really familiar with the design ideals of the Django devs or the >> WSGI spec. From what I can tell, the spec doesn't specify whether the url >> should be unquoted befor

Queryset values() differentiate between requests for model objects and model IDs

2015-05-07 Thread Matt C
If I have some models like so: from django.db import models class X(models.Model): y = models.ForeignKey(Y) ... other fields ... class Y(models.Model): ... some fields ... ... and I do a query like so: X.objects.all().values('y') ... I get back a list of dictionaries that contai

Re: 1.9 release planning

2015-06-11 Thread Matt Austin
With a more structured release plan, and LTS releases, would it be worth considering LTS releases as 'major' version numbers, with regular releases and 'minor' version releases? It would be easier to identify LTS releases at a glance, and might provide more meaning to the v

Using OneToOneField in reverse from values or values_list is rejected with "Invalid field name"

2011-01-31 Thread Matt Hoskins
the case of a reverse OneToOne then something along the lines of "if not allow_many and (m2m or (not direct and not isinstance(getattr(field,'field',None),OneToOneField))" instead could work to allow OneToOne reverses through in setup_joins when allow_many is False. Regards, Ma

Re: HTTP methods in urls.py

2011-03-21 Thread Matt Harasymczuk
e per view -- Matt Harasymczuk www.matt.harasymczuk.pl On Mar 21, 8:44 am, Russell Keith-Magee wrote: > On Mon, Mar 21, 2011 at 9:09 AM, haras.pl wrote: > > It would be nice to have possibility to distinguish a HTTP method in > > urls.py. IMHO it would be clearer and more

Re: Default project layout / directory structure

2011-03-21 Thread Matt Harasymczuk
/__init__.py imports all models. It works like a charm. I think it should be by default :} I created skel/django/project and skel/django/app folders, where I have this file structure when I start project I simply copy folder, rename it, and adjust -- Matt Harasymczuk www.matt.harasymczuk.pl -- You

secret key from file...

2011-03-21 Thread Matt Harasymczuk
What do you think? IMHO both this ways are good -- Matt Harasymczuk http://www.matt.harasymczuk.pl -- 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 unsubsc

Re: secret key from file...

2011-03-21 Thread Matt Robenolt
What we use is a settings.cfg, which is an ini file for global configurations. Database settings, etc. We need to share these settings across different languages and parts of our application. You can set up your ini file as such: [secret] key=abcdefghijklmnopqrstuvwxyz0123456789 ini files are

Re: secret key from file...

2011-03-21 Thread Matt Harasymczuk
Thats right, there should be a secret_settings.py file with db credentials and secret_key also a warning that it should not be added to version control -- Matt Harasymczuk http://www.matt.harasymczuk.pl On Mar 21, 5:07 pm, Kristaps Kūlis wrote: > "real" config should not be in ve

Re: secret key from file...

2011-03-22 Thread Matt Robenolt
Why not just do an import for your custom settings? try: from site_settings import * except ImportError: pass On Mar 22, 2011, at 5:51 PM, Ian Kelly wrote: > On Tue, Mar 22, 2011 at 6:44 AM, Kristaps Kūlis > wrote: >> I personally would greatly appreciate update in docs to sho

Re: secret key from file...

2011-03-22 Thread Matt Robenolt
s a nice little pattern that gets us by, but yes, things like this do show that there needs to be one overall "recommended" method for maintaining separate settings on a per server/environment basis. On Mar 22, 2011, at 7:05 PM, Ian Kelly wrote: > On Tue, Mar 22, 2011 at 4:49 PM, Ma

MEDIA, STATICFILES and ADMIN to dictionaries like CACHES and DATABASES

2011-03-23 Thread Matt Harasymczuk
I give you an example: BTW switch name from media to "useruploaded" or "uploaded", which IMHO is self explaining, hence MEDIA is not. STATICFILES = { 'uploaded' : { # old name MEDIA 'PREFIX' : '', 'ROOT': '', 'URL': '', }, 'admin': { 'PREFIX' : '', 'ROOT': '',

Re: Django urls in JavaScript

2011-03-23 Thread Matt Robenolt
How could this even begin to be solved without incurring another http request to resolve the url pattern? The only way I can imagine it is if we had a generic /resolve/ path that took some get parameters to return a full URL, or even it translate to a 301 redirect, but that'll get messy with PO

Re: Django urls in JavaScript

2011-03-24 Thread Matt Robenolt
So you're basically proposing to write a Javascript library that is a translation of URLResolver, and essentially have a dynamic "Javascript" file that could be included that would contain your URL patterns? Just trying to make sure we're on the same page. -- You received this message because

Re: Django urls in JavaScript

2011-03-24 Thread Matt Robenolt
There also proposes the problem of selecting which urls are "published" in this file and which aren't. Any ideas for that? I'm sure lots of people wouldn't want their entire sitemap exposed to the public in one large js file. -- You received this message because you are subscribed to the Googl

Re: Django urls in JavaScript

2011-03-24 Thread Matt Robenolt
I think the biggest problem with translating the reverse() lookup is the lack of kwargs and named capture groups in Javascript regex. So a pattern such as: /page/(?P\d+)/ would not translate whatsoever. Then on the Javascript side, we wouldn't be able to use: reverse('goto_page', [], {page_id:

Re: Django urls in JavaScript

2011-03-24 Thread Matt Robenolt
It could just be a combo of both. There'd be one file for the urlresolver.js, and a patterns.js. Interesting. Now, could the patterns in Python be translated to Javascript properly? I'll do some playing around today and see if I can come up with some basics. Even if this doesn't land in Django

Re: Django urls in JavaScript

2011-03-24 Thread Matt Robenolt
Ahh, I missed that from your original post. I like that. :) -- 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, send email to django-deve

Re: Proposal: switch to HTML5 for bundled templates

2011-03-29 Thread Matt Harasymczuk
/ I think we should join this movement, and provide modernizr, for example in conditional css tag It works for me, hence all should benefit from it. -- Matt Harasymczuk http://www.matt.harasymczuk.pl -- You received this message because you are subscribed to the Google Groups "D

Re: Proposal: switch to HTML5 for bundled templates

2011-03-29 Thread Matt Harasymczuk
nfluence on our potential revenue sees pages like lynx does. If not support html5 features now before the 1.4 release, then mark support for ie6 like the XMLField, obsolete and on an accelerated deprecation schedule. I rest my case ;} -- Matt Harasymczuk http://www.matt.harasymczuk.pl -- Yo

Using OneToOneField in reverse from values or values_list is rejected with "Invalid field name" (repost)

2011-04-05 Thread Matt Hoskins
se of a reverse OneToOne then something along the lines of "if not allow_many and (m2m or (not direct and not isinstance(getattr(field,'field',None),OneToOneField))" instead could work to allow OneToOne reverses through in setup_joins when allow_many is False. Regards, Matt --

Re: Using OneToOneField in reverse from values or values_list is rejected with "Invalid field name" (repost)

2011-04-08 Thread Matt Hoskins
han the public API. Want me to log it as a bug and include the test that'll pass and some notes explaining what's gone on? (I can, and have, run the same test against Django 1.2.5 to prove the test fails where the problem hasn't been masked by the change to the call to add_fields).

Re: Using OneToOneField in reverse from values or values_list is rejected with "Invalid field name" (repost)

2011-04-08 Thread Matt Hoskins
On Apr 7, 10:47 am, Julien Phalip wrote: > Hi Matt, > > Do you think this could be related > tohttp://code.djangoproject.com/ticket/11448 > ? > > If so, do the patches attached to that ticket help resolve your issue? > > Thanks, > > Julien Hi Julien, Tha

I don't think #15289 has been fully fixed

2011-04-11 Thread Matt Hoskins
g off - a call has to be made to the object.__getattribute__ - so self.db and self.cursor would need to be fished out using that. I wasn't sure about reopening #15289 or raising a new ticket, so thought I'd post here to ask about the best course of action (assuming I'm spot on i

Logging configuration and handle_uncaught_exception

2011-06-10 Thread Matt Bennett
rror is passed to the logger at all. Regards, Matt. [1] http://stackoverflow.com/questions/6305132/django-1-3-logging-500-errors-are-not-logged -- You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send em

Re: Logging configuration and handle_uncaught_exception

2011-06-14 Thread Matt Bennett
On Mon, Jun 13, 2011 at 9:53 PM, Vinay Sajip wrote: > On Jun 10, 2:05 pm, Matt Bennett wrote: > >> Is there a reason the call to logger.error can't come before we return >> the technical_500_response when DEBUG=True? It seems to me that the >> debug level should

Re: Logging configuration and handle_uncaught_exception

2011-06-17 Thread Matt Bennett
> code paths, and the admin email handler itself can remain > general-purpose, but the backwards-compatible behavior can be maintained. > > Matt, if you'd be willing to open a ticket for this, that'd be helpful. > If you feel like putting together a patch using the Fil

Re: Logging configuration and handle_uncaught_exception

2011-06-17 Thread Matt Bennett
On Fri, Jun 17, 2011 at 6:45 PM, Vinay Sajip wrote: > Matt Bennett writes: > >> >> > This is a case for a custom Filter object [1]. The filter object >> > implementation would only be a few lines, to reject logging when DEBUG >> > is True, and can be att

Re: RFC: Django 1.0 roadmap and timeline

2008-06-12 Thread Matt Davies
Jacob, I feel your pain butty. Do what you think is right, django has been brilliant so far. The jump to version 1(lightspeed) has been a bit of a nightmare, but let's all remember a pre django world. I for one trust Jacob's judgement. Just do it mate, there's good good people who want to help.

rev 7920 fresh checkout fails tests?

2008-07-13 Thread Matt Wilson
= FAIL: Doctest: regressiontests.utils.tests.__test__.itercompat -- Traceback (most recent call last): File "/home/matt/virtualenvs/django-scheduler/lib/python2.5/site- packages/dj

Re: rev 7920 fresh checkout fails tests?

2008-07-14 Thread Matt Wilson
sn't defined. Whoops! Thanks to everyone for the help. Matt --~--~-~--~~~---~--~~ 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.c

Re: Results of Moscow local sprint (newforms-admin and Oracle pooling)

2008-07-16 Thread Matt Boersma
rather see it folded into the trunk for the Oracle backend, rather than as a separate backend. We require cx_Oracle 4.3.1 or later, so there shouldn't be any issues with pooling support. But I suppose that relegates this to post-1.0. Matt On Jul 15, 2:38 pm, Ivan Sagalaev <[EMAIL PRO

You've broken Oracle

2008-08-18 Thread Matt Boersma
This is just a heads up since clearly some committers must be unaware: checkins of the last two days have created 27 (yes, twenty-seven) new test case failures for Oracle. I had been working on cleaning up the existing few failures for the Oracle backend, but unless those who actually committed t

Re: You've broken Oracle

2008-08-19 Thread Matt Boersma
lause. This seems to fix most of the failures. I'll check it in soon when I'm sure it's not causing any new problems. On Aug 18, 2:20 pm, "Ramiro Morales" <[EMAIL PROTECTED]> wrote: > Matt, > > On Mon, Aug 18, 2008 at 4:04 PM, Matt Boersma <[EMAIL PROTE

  1   2   >