Enhancing MergeDict

2007-02-13 Thread John Calixto

Hi All,

I have an almost trivial (although it was helpful to me) enhancement for
django.utils.datastructures.MergeDict.  It basically adds __str__ and
__repr__ methods so that you can see more meaningful output than just
the standard "" string.

Here's my diff:

=== django/utils/datastructures.py
==
--- django/utils/datastructures.py  (revision 15931)
+++ django/utils/datastructures.py  (local)
@@ -43,6 +43,13 @@
 return True
 return False

+def __str__(self):
+return str(dict(self.items()))
+
+def __repr__(self):
+dictreprs = ', '.join(repr(d) for d in self.dicts)
+return '%s(%s)' % (self.__class__.__name__, dictreprs)
+
 class SortedDict(dict):
 "A dictionary that keeps its keys in the order in which they're
inserted."
 def __init__(self, data=None):


On another note, I'm using svk to mirror django svn.  Is it possible to
submit patches made with svk diff rather than svn diff?

Thanks,

John

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en
-~--~~~~--~~--~--~---



#2868 manage.py runscript: status?

2007-02-13 Thread Ceph

Ticket #2868 is still unreviewed. It has a patch that adds a
"runscript" option to manage.py so you can easily do:

./manage.py runscript my-script.py

I see it as assigned to Adrian, but that was pre-ticket triage change,
so I'm not really sure the status of the ticket.

Thanks!


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en
-~--~~~~--~~--~--~---



Re: Django Cheat Sheet

2007-02-13 Thread Ted

Excellent John Thanks!

As we approach 0.96 any chance of getting a pre-release newforms based
version?

Ted

On Feb 13, 5:24 am, "John Sutherland" <[EMAIL PROTECTED]>
wrote:
> Hi all,
>
> Firstly, sorry for the cross-post.
>
> My employer, Mercurytide [1], as some of you may have seen in the
> past, publishes white-papers on a monthly basis. This month it's
> another Django themed one: a Django cheat sheet:
>
> 
>
> We've spent a fair bit of time on it and would really appreciate the 
> following:
>
> 1. That you download it; try it out and enjoy it!
> 2. Give us feedback, we know it's not going to be perfect first time,
> so let us know: [EMAIL PROTECTED]
> 3. You publicise it: it would be awesome to get it on the digg front
> page [2]; but put it on your blog, your del.icio.us or where ever...
>
> Cheers,
> John.
>
> [1] 
> [2] 
>
> --
> [EMAIL PROTECTED]


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en
-~--~~~~--~~--~--~---



MANAGEMENT TRAINGING AND CONTROLLING SOFTWARES

2007-02-13 Thread Rania
 *Management - Training & Information*

[image: Best Managment Solutions] 


*Busines Management Solutions*
*+*
*Personal Financial Management Solutions*
**
*and*
**
*Softwares *
**
*Free Downlaods...*



Management Plus. 

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en
-~--~~~~--~~--~--~---

<>


authenticate() allowed to raise exceptions?

2007-02-13 Thread Boris Erdmann

Hello Group,

I would like to contribute an OpenID consumer auth backend and
wonder whether it is good style for authenticate() to raise an
exception
or not?

The question is motivated by the fact that OpenID authentication
is a two phase procedure and authenticate() is bound to returning
a valid user or None. Thus I cannot interpret None as fault, which
would be bad style inbound signaling anyway.

Two solutions come to mind: raising exceptions or modelling an
interface within token where authenticate is declared as
authenticate(token).

In fact my question could have been: How bad style is it to modify
the token on an autheticate(token) call.

Any suggestions?

Boris


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en
-~--~~~~--~~--~--~---



Django Cheat Sheet

2007-02-13 Thread John Sutherland

Hi all,

Firstly, sorry for the cross-post.

My employer, Mercurytide [1], as some of you may have seen in the
past, publishes white-papers on a monthly basis. This month it's
another Django themed one: a Django cheat sheet:



We've spent a fair bit of time on it and would really appreciate the following:

1. That you download it; try it out and enjoy it!
2. Give us feedback, we know it's not going to be perfect first time,
so let us know: [EMAIL PROTECTED]
3. You publicise it: it would be awesome to get it on the digg front
page [2]; but put it on your blog, your del.icio.us or where ever...

Cheers,
John.


[1] 
[2] 


-- 
[EMAIL PROTECTED]

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en
-~--~~~~--~~--~--~---



Re: Getting started in Django development.

2007-02-13 Thread zbelzer

I had a chance to read all of the articles you guys pointed out and
they helped tremendously. I'll take a look at some tickets and the
documentation on how I should go about fixing/submitting later today
(after some sleep and class).

I really feel like I have a much better idea now, so thank you all for
the help.

-Zach


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en
-~--~~~~--~~--~--~---