Re: cached template loader is new in trunk/1.2, docs does not mention that

2010-01-06 Thread Amit Upadhyay
loader. On Wed, Jan 6, 2010 at 9:54 PM, Amit Upadhyay <upadh...@gmail.com> wrote: > http://docs.djangoproject.com/en/dev/ref/templates/api/#loader-types, I > looked and could not find "cached.py" > in Django-1.1.1/django/template/loaders. > > -- > Amit Upadhyay

cached template loader is new in trunk/1.2, docs does not mention that

2010-01-06 Thread Amit Upadhyay
http://docs.djangoproject.com/en/dev/ref/templates/api/#loader-types, I looked and could not find "cached.py" in Django-1.1.1/django/template/loaders. -- Amit Upadhyay www.amitu.com +91-9820-295-512 -- You received this message because you are subscribed to the Google Groups "Dj

Re: django doc improvement suggestion

2009-07-05 Thread Amit Upadhyay
uot;power pages" for the above use cases, which just links to everything you need to know when doing this task, which is already available in our documentation section [may be even including offisite info]. On Sun, Jul 5, 2009 at 1:05 PM, Amit Upadhyay <upadh...@gmail.com> wro

django doc improvement suggestion

2009-07-05 Thread Amit Upadhyay
. Will create a patches if given a go ahead. -- Amit Upadhyay www.amitu.com +91-9820-295-512 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email

hi

2009-03-21 Thread Amit Upadhyay
Hey, Checkout www.RemindMeSam.com . -- Amit Upadhyay Via - www.remindmesam.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-

Re: GET requests should not alter data?

2008-10-17 Thread Amit Upadhyay
On Fri, Oct 17, 2008 at 7:10 PM, Ivan Sagalaev <[EMAIL PROTECTED]> wrote: > > Amit Upadhyay wrote: >> The crux of that solution is the middleware: >> >> def process_request(self, request): >> state = request.method in ['

Re: GET requests should not alter data?

2008-10-17 Thread Amit Upadhyay
ude apps that are not really in django.contrib, but also on google code etc. I guess django-svn should do. [2]: There are too many ways to use django, and one cant think about all of them is a valid technical reason, but what I am talking about here may be important enough given its impac

Re: GET requests should not alter data?

2008-10-17 Thread Amit Upadhyay
On Fri, Oct 17, 2008 at 4:03 PM, James Bennett <[EMAIL PROTECTED]>wrote: > > On Fri, Oct 17, 2008 at 5:07 AM, Amit Upadhyay <[EMAIL PROTECTED]> wrote: > > Either this becomes a django standard, every code that might update > database >

Re: GET requests should not alter data?

2008-10-17 Thread Amit Upadhyay
pair. > As I understand, this is too whacky in my opinion, what if after 100 SELECT queries in a view, one does a INSERT/UPDATE based on data obtained so far, SELECTs would have gone to slave, which may be lagging by an uncertain amount of time, and the write to master, this will lead to very h

Re: GET requests should not alter data?

2008-10-15 Thread Amit Upadhyay
On Wed, Oct 15, 2008 at 5:17 PM, Ivan Sagalaev <[EMAIL PROTECTED]> wrote: > > Amit Upadhyay wrote: >> This is not about specs or what is allowed, rather what is there in >> actual django. And about implementation goals for django. It is >> possible to have a dj

Re: GET requests should not alter data?

2008-10-15 Thread Amit Upadhyay
t only if there are more than one webserver, and thus for the sake one issue per thread we can ignore it for now, focusing only on whats required to scale database server, which is big enough a problem. -- Amit Upadhyay Vakow! www.vakow.com +91-9820-295-512 --~--~-~--~~~---

Re: GET requests should not alter data?

2008-10-15 Thread Amit Upadhyay
.djangoproject.com/ticket/4604 -- Amit Upadhyay Vakow! www.vakow.com +91-9820-295-512 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-de

Re: GET requests should not alter data?

2008-10-15 Thread Amit Upadhyay
On Wed, Oct 15, 2008 at 1:20 PM, Amit Upadhyay <[EMAIL PROTECTED]> wrote: > Question: 1. is the expectation that GET request should only do SELECT > reasonable? 2. if 1, then should django enforce it? Clarification, enforce is ambiguous: Question2.1. django, core and contrib

GET requests should not alter data?

2008-10-15 Thread Amit Upadhyay
far using non db based session backend, and allowing delete for auth_messages from "GET machines" and living with "a message appears more than once" is what I am doing]. [1]: For example through http://www.djangosnippets.org/snippets/1141/ -- Amit Upadhyay Vakow! www.vakow.

Re: Proposal: django.forms.SafeForm - forms with built in CSRF protection

2008-09-23 Thread Amit Upadhyay
est, will add a input file containing something derived from {{ request }} and middleware will check and raise HttpForbidden. Its so ugly that it does not deserve a form validation error in my opinion. This will require least amount of changes in existing sites. -- Amit Upadhyay Vakow! www.vakow

old docs not opening

2008-08-26 Thread Amit Upadhyay
http://www.djangoproject.com/documentation/0.96/pagination/ Giving 404. Known issue or I should file a bug? -- Amit Upadhyay Vakow! www.vakow.com +91-9820-295-512 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

about templatetag namespaces

2008-07-10 Thread Amit Upadhyay
that takes the tag/fitler name and returns me the qualified name of the function handling the tag/filter. [1]: http://groups.google.com/group/django-developers/browse_frm/thread/2b5a4a31f0349d27/b92c96a8dccc214b#b92c96a8dccc214b [2]: http://code.djangoproject.com/attachment/ticke

Re: Middleware class vs decorators (proposal?)

2008-04-14 Thread Amit Upadhyay
On Mon, Apr 14, 2008 at 2:00 PM, James Bennett <[EMAIL PROTECTED]> wrote: > > On Sun, Apr 13, 2008 at 6:05 AM, Amit Upadhyay <[EMAIL PROTECTED]> wrote: > > I was wondering about the reason that middleware classes were used > instead > > of decorators to i

Re: Middleware class vs decorators (proposal?)

2008-04-14 Thread Amit Upadhyay
sign over this that I am missing. PS: This is another advantage of having middleware as decorators, we won't need that helper :-) -- Amit Upadhyay Vakow! www.vakow.com +91-9820-295-512 --~--~-~--~~~---~--~~ You received this message because you are subscri

Middleware class vs decorators (proposal?)

2008-04-13 Thread Amit Upadhyay
, having access to x, y, z is more natural than to attach them to self before and after the call of view return resp return decorated -- Amit Upadhyay Vakow! www.vakow.com +91-9820-295-512 --~--~-~--~~~---~--~~ You received this message because you

Re: add support for unicode-normalizing get/post-data?

2008-04-10 Thread Amit Upadhyay
he real view. -- Amit Upadhyay Vakow! www.vakow.com +91-9820-295-512 --~--~-~--~~~---~--~~ 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@googlegro

Re: Fixing app_label

2007-12-06 Thread Amit Upadhyay
iddlewares=['example.mymiddleware']), ) -- Amit Upadhyay Vakow! www.vakow.com +91-9820-295-512 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send

Re: An addendum to the escaping proposals

2007-11-07 Thread Amit Upadhyay
if I can reuse the token or I will have to create more than one. Also if the token expire after sometime, that I have to worry about. -- Amit Upadhyay Vakow! www.vakow.com +91-9820-295-512 --~--~-~--~~~---~--~~ You received this message because you are subscribed

proposal: deprecate "date" and "time" template filters and create "formattimestamp"

2007-10-28 Thread Amit Upadhyay
if you use wrong formatting characters. [/Rant] Template filters "date" and "time" are formatting tags, and there are three other formatting tags, they are named "filesizeformat", "stringformat" and "floatformat",

Re: proposal: helper functions for validation

2007-09-11 Thread Amit Upadhyay
e[1] with proposed function names and signatures, please go through it, and see if they make sense, and might be useful for django. [1]: http://code.djangoproject.com/wiki/ValidationHelperFunctionsProposal -- Amit Upadhyay http://www.amitu.com/blog

Re: proposal: helper functions for validation

2007-09-11 Thread Amit Upadhyay
_date_within_range, validate_date_before, validate_date_after will have to be implemented by the users, but if we had such a library with dozens of special purpose functions to assist validation, writing form validation would become all the more sweeter. -- Amit Upadhy

Re: proposal: helper functions for validation

2007-09-10 Thread Amit Upadhyay
On 9/10/07, Nis Jørgensen <[EMAIL PROTECTED]> wrote: > > Russell Keith-Magee skrev: > > On 9/9/07, Amit Upadhyay <[EMAIL PROTECTED]> wrote: > > > >> Python unittest TestCase objects have a lot of helper functions like > >> assert_(), failUnles

proposal: helper functions for validation

2007-09-08 Thread Amit Upadhyay
per functions, and they will raise ValidationError instead of AssertionError. [1]: http://docs.python.org/lib/testcase-objects.html -- Amit Upadhyay Vakow! www.vakow.com +91-9820-295-512 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Goo

Re: Time for a new release?

2007-08-29 Thread Amit Upadhyay
p at the SVN docs. > > > They shouldn't have to go the web site: the release docs should be on > their > > disk, within the installed release itself (see my other message). > > See above. I'm sure you mean well, but the experience of seeing people > actually work with Djan

Re: Peeking into database queries from the unit-test framework

2007-07-28 Thread Amit Upadhyay
llow the registration of callbacks with django.db.connection, > like so: > > django.db.connection.register_query_callback(lambda query: > sys.stderr.write(query)) Can't the same be done as a signal? Multiple parties can then listen for query execution. -- Amit Upadhyay Vako

Re: docstrings

2007-07-26 Thread Amit Upadhyay
ke your email for example, why is it wrapped at 80 chars? Because its easier to read. In source code this fosters better coding practice, if indentation level is too deep, you are doing something wrong. -- Amit Upadhyay http://www.amitu.com/blog/ +91-9820-295-512 --~--~-~--~~---

Re: reverse pagination be made default?

2007-07-23 Thread Amit Upadhyay
o wonder why my books are suddenly going Z-A when my default > sorting is A-Z. Also, this only makes sense when things are ordered by time, for other criteria, it would not make any difference either ways. -- Amit Upadhyay Vakow! www.vakow.com +91-9820-295-512 --~--~-~--~~-

Re: reverse pagination be made default?

2007-07-23 Thread Amit Upadhyay
On 7/23/07, Tom Tobin <[EMAIL PROTECTED]> wrote: > > > On 7/22/07, Amit Upadhyay <[EMAIL PROTECTED]> wrote: > > I have just uploaded a patch for what I call "reverse pagination". > Please > > read about it here: > > http://code.djangoproject.com/

reverse pagination be made default?

2007-07-22 Thread Amit Upadhyay
it should be the default behavior in stock django installation. There have been a couple of other backward-in-compatible changes, can this be considered? -- Amit Upadhyay Vakow! www.vakow.com +91-9820-295-512 --~--~-~--~~~---~--~~ You received this message b

Re: Message Passing for Anonymous Users

2007-06-19 Thread Amit Upadhyay
ssions.models.Message. Why is request.session["_messages"] not enough? It can be a list of string messages. -- Amit Upadhyay Vakow! www.vakow.com +91-9820-295-512 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Gr

Re: configurable session age

2007-06-14 Thread Amit Upadhyay
On 6/14/07, Amit Upadhyay <[EMAIL PROTECTED]> wrote: > > Updated API: added set_life to SessionWrapper. It takes an integer, number > of seconds for which the session should be valid. It can also take > django.contrib.session.models.TILL_BROWSER_CLOSE, that will quell the >

Re: configurable session age

2007-06-14 Thread Amit Upadhyay
On 6/14/07, Amit Upadhyay <[EMAIL PROTECTED]> wrote: > > After further staring at the code, I realize that there still is some > problem, if session is modified after the cookie is set, django will revert > the cookie to expire when browser closes. The only solution se

Re: configurable session age

2007-06-13 Thread Amit Upadhyay
it sound? On 6/14/07, Amit Upadhyay <[EMAIL PROTECTED]> wrote: > > Hi, > > This is a gentle reminder/ping for > http://code.djangoproject.com/ticket/2548 by Tsume. Its status is design > decision needed, but that is only because of a query by Adrian, about if the > reque

configurable session age

2007-06-13 Thread Amit Upadhyay
in future, and SESSION_EXPIRE_AT_BROWSER_CLOSE is True, the intention really is to expire the session after that much time and not as soon as browser is closed. Please if you can consider checking it in. If interest is there, I will attach a patch with documentation, not really sure how to write unittest for it tho. -- Ami

Re: image bundle for django

2007-06-13 Thread Amit Upadhyay
Refer http://groups.google.com/group/django-users/browse_thread/thread/3e7658074bedb6d8/4d8d3fdc63455ca7?#4d8d3fdc63455ca7for context. On 6/13/07, Amit Upadhyay <[EMAIL PROTECTED]> wrote: > > On 6/12/07, Rob Hudson <[EMAIL PROTECTED]> wrote: > > > > One thoug

Re: image bundle for django

2007-06-13 Thread Amit Upadhyay
; offsets in the final. Server side resizing was compulsory as otherwise the background technique would not work. AFAIK. Browser will just show the part of image, and does not shrink the background to fit. I see you're using mx.Misc.OrderedMapping. Does that do anything that > django.utils.data

Re: make model.save() take kw params

2007-06-13 Thread Amit Upadhyay
On 6/13/07, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > > > On Wed, 2007-06-13 at 00:11 +0530, Amit Upadhyay wrote: > > Hi, > > > > Wouldn't it be cool if we can say > > user.save(email="[EMAIL PROTECTED]"), which will do the equivalent &

mailing list forking?

2007-06-13 Thread Amit Upadhyay
Do other people know about this: http://www.nabble.com/image-bundle-for-django-t3900874.html [I see 4-5 replies to my post on this page] vs http://groups.google.com/group/django-users/msg/4d8d3fdc63455ca7 [here, there is no reply]. -- Amit Upadhyay Vakow! www.vakow.com +91-9820-295-512

make model.save() take kw params

2007-06-12 Thread Amit Upadhyay
Hi, Wouldn't it be cool if we can say user.save(email="[EMAIL PROTECTED]"), which will do the equivalent of user.email = "[EMAIL PROTECTED]"; user.save()? Should be single line change, putting a self.__dict__.update(kw) in model.save(). -- Amit Upadhyay Vakow! www.vakow.

Re: GSoC 2007 Status Update: Django REST interface

2007-06-01 Thread Amit Upadhyay
losed by jacob saying " This is a subset of #115<http://code.djangoproject.com/ticket/115>." which I feel is not the case, as #115 is "Models CRUD via web services". Related bug: http://code.djangoproject.com/ticket/552 -- Amit Upadhy

Re: Proposal: post_create signal

2007-06-01 Thread Amit Upadhyay
lf.is_new = not bool(self.id) in pre_save and if self.is_new: # do something in post_save? -- Amit Upadhyay Vakao! +91-9820-295-512 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers" group. To

Re: django-values -> django-policy?

2007-05-29 Thread Amit Upadhyay
On 5/29/07, Derek Hoy <[EMAIL PROTECTED]> wrote: > > > Registry? +1 django-registry. -- Amit Upadhyay Vakao! +91-9820-295-512 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django develo

Re: Multiple Profiles

2007-05-08 Thread Amit Upadhyay
To solve this issue i wrote a simple patch for contrib/auth/models.py. > [Patch is attached] that add one var to get_profile so you can choose your > profile table dinamically. > > Is there another solution for this? > > Regards, > -- > Martín Conte Mac Donell > http://

Re: Add a salt to the newforms fields names

2007-03-23 Thread Amit Upadhyay
ws auto-complete. May be an optional argument for CharField? [HTML allows to do a autocomplete=off in input fields]. -- Amit Upadhyay Blog: http://www.rootshell.be/~upadhyay +91-9820-295-512 --~--~-~--~~~---~--~~ You received this message because you are subscribed to

Re: feature request: user session

2007-03-21 Thread Amit Upadhyay
On 3/21/07, Michael Radziej <[EMAIL PROTECTED]> wrote: > > On Wed, Mar 21, Amit Upadhyay wrote: > > > Hi, > > > > Django has anonymous sessions, tracked by cookies. The session can not > be > > accessed from a different machine for the same user > >

feature request: user session

2007-03-21 Thread Amit Upadhyay
/ticket/3776 [little more info, about how I intend to implement is in the ticket]. -- Amit Upadhyay Blog: http://www.rootshell.be/~upadhyay +91-9820-295-512 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "D

Re: using "dictionary with attribute-style access" for newform

2007-03-07 Thread Amit Upadhyay
Actually no :-( It will conflict with keys, clear etc members of standard dictionary. May be I will write a MyForm that will do it locally for me, from which I will inherit the rest of my forms. On 3/7/07, Amit Upadhyay <[EMAIL PROTECTED]> wrote: > > Hi, > > I have an enhanceme

using "dictionary with attribute-style access" for newform

2007-03-07 Thread Amit Upadhyay
init__(*args, **kw) > self.fields.title.initial = blog.title > Its easier on eyes as well as fingers. Please! I love you, I beg you! :-) -- Amit Upadhyay +91-9820-295-512 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Gr

Re: Question about UserProfile

2007-03-07 Thread Amit Upadhyay
like this: >>> profile = user.get_profile() >>> profile.email_confirmed = True # or whatever you wanted to do >>> profile.save() And use the profile object now onwards in the view. get_profile is only a convenient shortcut. -- Amit Upadhyay Blog:

Re: newforms: "forms with prefixes", nitpick

2007-02-01 Thread Amit Upadhyay
now either prefix will be *added* before the id or you have to override a method for allowing other formatting, python's string formatting is not used in prefix. Should be. -- Amit Upadhyay Blog: http://www.rootshell.be/~upadhyay +91-9820-295-512 --~--~-~--~~~---~--~

newforms: "forms with prefixes", nitpick

2007-01-29 Thread Amit Upadhyay
://code.djangoproject.com/browser/django/trunk/tests/regressiontests/forms/tests.py#L2733 -1 Can we simple not take prefix to contain a formatting string? That is what came to my mind when I read prefix when I first encountered it. Is there something I am missing? -- Amit Upadhyay Blog: http

Re: Ideas for /examples/ directory

2006-04-18 Thread Amit Upadhyay
On 4/17/06, Adrian Holovaty <[EMAIL PROTECTED]> wrote: One quick constraint: None of the examples should require a database.Asking people to install database tables just to view examples isn'tacceptable, IMO.How about shipping a prepopulated sqlite db? To avoid dependency I recommend splitting the

Re: Validation-aware models: First stab

2006-03-14 Thread Amit Upadhyay
On 3/14/06, James Bennett <[EMAIL PROTECTED]> wrote: * It's conceptually simpler; instead of worrying about whichvalidation layer you got down to before an error occurred, you onlyhave to worry about two states: success and failure.* It's more logical; I still don't see any good reason why

proposal: endif, endfor etc assume whatever follows in tag is comment

2006-03-13 Thread Amit Upadhyay
Hi,It regularly becomes difficult to track which {% endif %} belong to which {% if %}, it would be good if we can say {% endif start_process %} where start_process is purely comment. -- Amit Upadhyay Blog: http://www.rootshell.be/~upadhyay+91-9867-359-701

Re: Validation-aware models: First stab

2006-03-13 Thread Amit Upadhyay
HI Adrian,Does it mean AddManipulator/UpdateManipulator are going away?This way of doing things is inconsitant with handling custom forms. If it is, a good step for django ORM, a bad step for django web framework. Let me elaborate, this is my typical view:def confirm_email(request):    if not

Re: [Changeset] r2386 - django/branches/magic-removal/django/core

2006-02-24 Thread Amit Upadhyay
On 2/25/06, Adrian Holovaty <[EMAIL PROTECTED]> wrote:     # generated settings file contains INSTALLED_APPS with the basics,# such as sessions, auth, etc.. Advanced users can remove any or all of that# if they don't want to use it.python foo/manage.py synchdb   # creates tables for

Re: Proposal: Validation-aware models

2006-02-22 Thread Amit Upadhyay
On 2/22/06, Joseph Kocherhans <[EMAIL PROTECTED]> wrote: prep_data would take the request, and return a dict suitable to passto the objects constructor. FWIW I think prep_data is a bad namethough. Other suggestions?Maybe something like this:new_data = MyModel.prep_data (request)my_obj =

Re: Proposal: Validation-aware models

2006-02-22 Thread Amit Upadhyay
On 2/22/06, Adrian Holovaty <[EMAIL PROTECTED]> wrote: Let's return to this subject, which was discussed a couple of weeksago. Here's my latest thinking on the subject.* Automatic manipulators go away. Instead of messing with those, tocreate a new model object you try instantiating it. Validation

Re: still some magic left in magic removal

2006-02-03 Thread Amit Upadhyay
On 2/4/06, Robert Wittams <[EMAIL PROTECTED]> wrote: ...Horrible api example deleted...Lets see. > Cramming everything in a class will always force us to do some meta > programming.This has no meaning as far as I can tell. Are you seriously suggestingthat we shouldn't even use metaclasses? Well I

still some magic left in magic removal

2006-02-03 Thread Amit Upadhyay
Hi,I was going through magic removal wiki page, and encountered this, I think there is still some magic left in the Custom managers, and multiple managers section. I have a following objections: finding the default manager based on the order in which they are definedmanager instance magically

GvR prefers Django Template over Cheetah And Modularised Django

2006-01-31 Thread Amit Upadhyay
Hi all,One of the first thought that came to my mind when I read django documentation is, Django is really a set of related projects, Django ORM, Django Templates and Django Webframework, and can be used independently of each other. Came across this post by Guido:

Re: Implementation of descriptor fields

2006-01-30 Thread Amit Upadhyay
On 1/30/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: Presumably this needs the same behaviour as a Manager i.e. doesn'tcache.  So the the filter method needs to return a non-caching QuerySet.  To get a caching version, you would have to do .all(), soyou would have to do this everytime you

model level install and sqlreset

2006-01-28 Thread Amit Upadhyay
Hi,Off late I have found that my models are stable, but I have to keep on adding new ones. It would be good if django-admin.py had support for model level install option. "django-admin.py install myapp.mymodel "? Also it would be nice if we can have atleast model level sqlreset in case model

not getting date time javascript pickers

2006-01-28 Thread Amit Upadhyay
Hi,I am using trunk: 2116, and in the admin view, I am not getting the _javascript_ date and time pickers. Everything else seems to be working fine, is this normal?TIA,-- Amit Upadhyay Blog: http://www.rootshell.be/~upadhyay+91-9867-359-701

Re: how to set title/description for items in rss

2006-01-26 Thread Amit Upadhyay
On 1/27/06, Adrian Holovaty <[EMAIL PROTECTED]> wrote: I answered your question in another thread:http://groups.google.com/group/django-users/browse_thread/thread/0a7b94b58722470b/d378ce32a02d53ba Thanks a lot Adrian.-- Amit UpadhyayBlog: http://www.rootshell.be/~upadhyay+91-9867-359-701

how to set title/description for items in rss

2006-01-21 Thread Amit Upadhyay
Hi,I am trying to generate RSS feeds using Django, and followed the documentation, but am not able to figure out how to specify title and description for individual items. Right now Django is using the string representation of item objects. My feeds are "complex feed" as per documentation, I tried

Re: SQL Referential Integrity (WAS: Bulk delete? on django-users)

2006-01-21 Thread Amit Upadhyay
On 1/21/06, Russell Keith-Magee <[EMAIL PROTECTED]> wrote: Yes, this means that people with MySQL 3/4 databases will need toupgrade or choose another database. But why should we spend so muchtime and effort writing, testing, and debugging a reimplementation ofreferential integrity in Django simply

Re: SQL Referential Integrity (WAS: Bulk delete? on django-users)

2006-01-19 Thread Amit Upadhyay
On 1/19/06, Russell Keith-Magee <[EMAIL PROTECTED]> wrote: On 1/19/06, Adrian Holovaty <[EMAIL PROTECTED]> wrote:>> On 1/19/06, Russell Keith-Magee <[EMAIL PROTECTED] > wrote:> > It seems like most of the internal reference walking logic in the> > object.delete() call would be eliminated if the

Re: apps with the same name

2006-01-14 Thread Amit Upadhyay
On 1/14/06, Max Battcher <[EMAIL PROTECTED]> wrote: Joseph Kocherhans wrote:> Any ideas that don't involve 50+ character table names and 10 level> deep template directories? ;-)What about application relabeling?  Just like you might do a python ``import something as somebettername`` when there are

Re: Failing silently, and documentation thereof

2006-01-12 Thread Amit Upadhyay
On 1/12/06, Simon Willison <[EMAIL PROTECTED]> wrote: On 12 Jan 2006, at 06:59, James Bennett wrote:> The Django docs say that template filters should always fail silently> and never raise exceptions; they should instead return either the> original input or an empty string, as appropriate. And

Re: Proposal: Shorter comment tag

2006-01-11 Thread Amit Upadhyay
On 1/12/06, Russell Keith-Magee <[EMAIL PROTECTED]> wrote: Crap. Lets try this again without tabbing onto the send button. On 1/12/06, Adrian Holovaty < [EMAIL PROTECTED]> wrote: On 1/11/06, scum <[EMAIL PROTECTED]> wrote:> Could the comment tag be simplified to something like {! !} or {# #}.

Re: Proposal: Django namespace simplification

2006-01-08 Thread Amit Upadhyay
,  though I prefer django.exceptions over django.error[should be django.errors]. -- Amit Upadhyay Blog: http://www.rootshell.be/~upadhyay+91-9867-359-701

IntegrityError, how to catch it?

2006-01-06 Thread Amit Upadhyay
Hi,What is the rigth way of catching IntegrityError, the traceback I get suggests using _mysql_exceptions.IntegrityError, which is wrong because it assumes mysql, as well as it goes against the general python guideline of not using "hidden" members of modules. Here is my traceback:>>> u =

Re: admin reports wrong absolute url

2006-01-06 Thread Amit Upadhyay
On 1/6/06, Ian Holsman <[EMAIL PROTECTED]> wrote: Hi Amit.if you modify the 'domain' column in the 'site' table and put hostname:port#it should work ok.Hi Ian,Thanks, I played with the admin, and figured out this thing myself soon after I posted that mail. Is this documented somewhere? Thanks for

Re: admin reports wrong absolute url

2006-01-05 Thread Amit Upadhyay
On 1/5/06, Jason Davies <[EMAIL PROTECTED]> wrote: Amit Upadhyay wrote:[snip]> But when I open the objects "change" page in admin, and try to follow "View> on Site" link, it takes me to some http://localhost:6680/r/10/1/, which> 404s.You need to add the followi

Re: subdomain specific settings file

2006-01-03 Thread Amit Upadhyay
On 1/3/06, Jacob Kaplan-Moss <[EMAIL PROTECTED]> wrote: > What do you think?I'm not sure I get it -- you want to automatically load a settingsfile based on the subdomain?  That seems a little too magic for me,especially when you can already do this just by changing DJANGO_SETTINGS_MODULE for each

subdomain specific settings file

2006-01-02 Thread Amit Upadhyay
Hi,Wish you all a very happy and fruitful new year!Djando URL resolution causes some problem with applications hosted in different subdomains. Consider www.example.com and blog.example.com. Both of them are running off the same database and share common admin, and so on, but are hosted in

Re: Descriptors for fields?

2005-12-14 Thread Amit Upadhyay
On 12/14/05, Robert Wittams <[EMAIL PROTECTED]> wrote: >>> How about _list. They are python lists anyway so that would help> too.>Did you even read my post? They aren't lists. They are possibly orderedsets. To be a list, it would need to always have a meaningful order, and it would also need to be

Re: Descriptors for fields?

2005-12-14 Thread Amit Upadhyay
On 12/14/05, Jeroen Ruigrok van der Werven <[EMAIL PROTECTED]> wrote: On 12/14/05, Robert Wittams <[EMAIL PROTECTED]> wrote:[ p1.article_set.order_by('headline') ]> Is your confusion between set the verb and set the noun ? I don't really > know how to fix that without refactoring the English

HttpResponseRedirect and relative URLs

2005-12-13 Thread Amit Upadhyay
Hi,I am developing an application and am soon going to deploy on another server but the URLs won't be exactly the same. There are many places I have to construct URLs, for linking to other pages in my application as well as for redirecting, and it is not clear to me how to do it in a portable

Re: Removing the magic

2005-12-07 Thread Amit Upadhyay
On 12/7/05, Simon Willison <[EMAIL PROTECTED]> wrote: On 6 Dec 2005, at 21:00, Adrian Holovaty wrote:> Thoughts?>> http://code.djangoproject.com/wiki/RemovingTheMagicI really like almost all of it. My one hang-up is this: Person.objects.get_list(Person.q.first_name == 'Adrian')I like the

Re: Cache and GET parameters

2005-12-06 Thread Amit Upadhyay
On 12/6/05, Adrian Holovaty <[EMAIL PROTECTED]> wrote: The remaining question is: What's the behavior if vary_on_get() isn'tspecified for a particular view? Do we cache everything (includingseparate cache entries for any combination of different GETparameters) or cache nothing (current behavior)?

Re: save/delete/etc hooks for custom fields

2005-12-01 Thread Amit Upadhyay
On 12/1/05, Robert Wittams <[EMAIL PROTECTED]> wrote: Nebojša Đorđević - nesh wrote:>> IMHO some type of event system should definitely go in 1.0. Can we  add> this to VersionOneFeatures?I wouldn't mind personally, but I think that at some point we have to draw a moratorium on 1.0 features - and

Re: Random Tag

2005-11-29 Thread Amit Upadhyay
On 11/29/05, Tom Tobin <[EMAIL PROTECTED]> wrote: I'd be interested in feedback on ticket #919, which implements a"random" tag which parallels the functionality of the random filter.I'd also be curious as to where the best place would be to implement a possible helper class for the weighted random

Re: <% include %> should support select_template like sytax too

2005-11-28 Thread Amit Upadhyay
On 11/28/05, Tom Tobin <[EMAIL PROTECTED]> wrote: On 11/28/05, Amit Upadhyay <[EMAIL PROTECTED]> wrote:> Just that I felt dropping a mail on the list gives a little more visibility> and opportunity to get feedbacks, than just filing a ticket, which only a > handful of core

Re: <% include %> should support select_template like sytax too

2005-11-28 Thread Amit Upadhyay
On 11/28/05, Tom Tobin <[EMAIL PROTECTED]> wrote: > Done: http://code.djangoproject.com/ticket/949Thanks!  The Trac makes it much easier to keep, well, *track* ofwhat's going on.  :-) :-) Just that I felt dropping a mail on the list gives a little more visibility and opportunity to get feedbacks,

<% include %> should support select_template like sytax too

2005-11-28 Thread Amit Upadhyay
Hi,<% include template_name %> includes the named template which is like get_template of the Python API for loading templates, for consistancy we should have a comma seperated template list similer to select_template. (Untested) Patch attached.-- Amit UpadhyayBlog:

Re: Django and AJAX: Setting aside the conflict

2005-11-18 Thread Amit Upadhyay
Here are my half cooked thought on the issue.On 11/18/05, Wilson Miner <[EMAIL PROTECTED] > wrote: I think we should be as toolkit-agnostic as we are templatesystem-agnostic and ORM-agnostic. We deliver one with Django,and all Django code builds on the delivered ones. But we don't enforcethose on