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 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 > www.amitu.com > +91-9

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
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 wrote: > Hi, > > I find http://docs.djang

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
ight imply/include 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

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
nchronous nature of a master-slave > 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 w

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 django(

Re: GET requests should not alter data?

2008-10-15 Thread Amit Upadhyay
em but 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
/code.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 djan

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 apps

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
ssors.request, 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!

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
g a script 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/attach

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 su

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 are

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
p('foo.blog', middlewares=['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" gro

Re: contrib.auth and User model

2007-11-08 Thread Amit Upadhyay
; user profile and get_profile, but it is not very nice solution and > have imperfections: ;-) See if this is of any help: http://www.amitu.com/blog/2007/july/django-extending-user-model/ -- Amit Upadhyay Vakow! www.vakow.com +91-9820-295-512 --~--~-~--~~~---~-

Re: An addendum to the escaping proposals

2007-11-07 Thread Amit Upadhyay
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 to

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
ated a wiki page[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

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-11 Thread Amit Upadhyay
based on presence or absence of certain exception for example, code gets cut down from 4 lines to 1. -- Amit Upadhyay +91-9820-295-512 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers" g

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_(), failUnless(), as

Re: proposal: helper functions for validation

2007-09-09 Thread Amit Upadhyay
ature, each validation statement will have to contain a superfluous self. in the beginning. Whereas helper functions can all be imported in the name space. Its only minor syntactic sugar so to say, that we are after with this. -- Amit Upadhyay Vakow! www.vakow.com +91-9820-295-512 --~--~-

proposal: helper functions for validation

2007-09-08 Thread Amit Upadhyay
return self.clean_data["username"] Message would be compulsory in these helper 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 --~--~-~--~~---

Re: Time for a new release?

2007-08-29 Thread Amit Upadhyay
> distros track releases, not SVN) and ending up 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

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

2007-07-28 Thread Amit Upadhyay
uld allow 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 Upa

Re: docstrings

2007-07-26 Thread Amit Upadhyay
n this. Take 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
to 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
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 becau

Re: Message Passing for Anonymous Users

2007-06-19 Thread Amit Upadhyay
ib.sessions.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 Goog

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 > se

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 seems

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
uture, 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 thought I h

Re: image bundle for django

2007-06-13 Thread Amit Upadhyay
ndle to determine > 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 anythi

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 equival

Re: mailing list forking?

2007-06-13 Thread Amit Upadhyay
Never mind. http://groups.google.com/group/django-users/browse_thread/thread/3e7658074bedb6d8/4d8d3fdc63455ca7?#4d8d3fdc63455ca7 Cursing myself. On 6/13/07, Amit Upadhyay <[EMAIL PROTECTED]> wrote: > > Do other people know about this: > > http://www.nabble.com/image-bundle-f

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.v

Re: GSoC 2007 Status Update: Django REST interface

2007-06-01 Thread Amit Upadhyay
sed 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 -- A

Re: Proposal: post_create signal

2007-06-01 Thread Amit Upadhyay
doing a: self.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 develo

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 developer

Re: Multiple Profiles

2007-05-08 Thread Amit Upadhyay
t > not profile) > > 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

Re: Add a salt to the newforms fields names

2007-03-23 Thread Amit Upadhyay
isallows 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 sub

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
thing 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

Re: newforms: "forms with prefixes", nitpick

2007-02-03 Thread Amit Upadhyay
can be done here. If its present use it as format string, if not prepend it. -- Amit Upadhyay Blog: http://www.rootshell.be/~upadhyay +91-9820-295-512 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django develope

Re: newforms: "forms with prefixes", nitpick

2007-02-01 Thread Amit Upadhyay
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: New branch: newforms-admin

2007-01-26 Thread Amit Upadhyay
. There are other backward incompatible changes. Admin app is too much coupled with the django core. Make it a truely contrib app. Tomorrow a GUIAdmin becomes possible. -- Amit Upadhyay +91-9820-295-512 --~--~-~--~~~---~--~~ You received this message because you are s

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 informat

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 requ

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 all

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 = MyModel(new

Re: Proposal: Validation-aware models

2006-02-22 Thread Amit Upadhyay
On 2/22/06, kmh <[EMAIL PROTECTED]> wrote: I like the idea.  Perhaps you could have a class methodwithout_validation() for the bulk upload?I do not get the point of this whole discussion, if you are doing form handing your views, manipulators are good because they are consistent with the custom for

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 e

text field becoming array.array

2006-02-18 Thread Amit Upadhyay
Hi,I have been using django for developing application and it went on fine, worked as expected, but was not handling unicode properly. I have a Post model, and I am fetching the content of some blog posts and storing it in Post in _pre_save. I was using original_content = urllib.ulropen(self.url).

Re: How about converting python config files to text config files

2006-02-10 Thread Amit Upadhyay
On 2/10/06, Sean Perry <[EMAIL PROTECTED]> wrote: Russell Keith-Magee wrote:> I fail to see what problem would be solved or made easier by introducing a> new syntax.>sometimes people like to use a language other than python but share some data.Parsing XML is trivial in python, check out ElementTree

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 a

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 conta

Re: speeding Django up

2006-02-02 Thread Amit Upadhyay
On 2/3/06, Armin Ronacher <[EMAIL PROTECTED]> wrote: Does django provide a system for caching the nodelist? In Jinja I'veadded a loader which cpickles the nodelist using protocol 2 which isvery fast because you don't have to parse it again. Django provides a caching framework, and you can cache arb

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: http://www.artima.com/weblogs/vie

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 actua

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 change

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 for

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 when

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 {# #}. We've

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

Re: magic-removal table name pluralization

2006-01-07 Thread Amit Upadhyay
On 1/7/06, Adrian Holovaty <[EMAIL PROTECTED]> wrote: On 1/6/06, Joseph Kocherhans <[EMAIL PROTECTED]> wrote:> In the magic-removal branch most traces of automatic pluralization> have been removed, but the table names are still pluralized by > default. I don't think they should be. Is this just a c

Re: IntegrityError, how to catch it?

2006-01-06 Thread Amit Upadhyay
On 1/6/06, Adrian Holovaty <[EMAIL PROTECTED]> wrote: On 1/6/06, Amit Upadhyay <[EMAIL PROTECTED]> wrote:> 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 we

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 = users.Us

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: OneToOne on users.User cause exception in admin

2006-01-05 Thread Amit Upadhyay
Hi,On 1/6/06, Dody Suria Wijaya <[EMAIL PROTECTED]> wrote: Temporary fix can be applied by passing list_select_related=TrueThis did fix the problem. Thanks a million! :-)Din't try the other permanent solution for lack of time, will try some other time and let you know. -- Amit UpadhyayBlog: http://

admin reports wrong absolute url

2006-01-05 Thread Amit Upadhyay
Hi, I have a model whose absolute url is deifned:def get_absolute_url(self): return '/invitation/%i/' % self.idand it works fine on python prompt:>>> invitationcodes.get_list ()[0].get_absolute_url()'/invitation/1/'But when I open the objects "change" page in admin, and try to follow "View on Site"

OneToOne on users.User cause exception in admin

2006-01-05 Thread Amit Upadhyay
Hi,There is an open bug: http://code.djangoproject.com/ticket/930 which talks about problem with OneToOneField when used with users.User. My model is something like this: class UserDetail(meta.Model):    user = meta.OneToOneField(users.User)    telephone = meta.CharField(maxlength=15)    # we can a

Re: subdomain specific settings file

2006-01-05 Thread Amit Upadhyay
On 1/5/06, Brant Harris <[EMAIL PROTECTED]> wrote: Hrm, I think you are trying to simplify a less common task whilecomplicating the more common one.  It seems more useful to set updocumentation for this case in "Solving specific problems".  The more simple the default project/app layout is, the bet

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 d

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 differen

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 langua

  1   2   >