Re: Parsing / Deserializing a JSON String

2009-09-06 Thread J. Clifford Dyer
On Sat, 2009-09-05 at 16:12 -0700, Eric wrote: > Thank you for your input. I tried what you suggested by first just > trying to loop through the data like so: > > " > test_output = 0 > for obj in serializers.deserialize('json', gantt_data)['ganttgroups']: > test_output = test_output + 1 >

Re: Unit testing views.

2009-07-11 Thread J. Clifford Dyer
Woot! Thank you. I'll be pestering my sysadmins about that starting with our Tuesday meeting this week. :) Cheers, Cliff On Sat, 2009-07-11 at 22:32 +0800, Russell Keith-Magee wrote: > On Fri, Jul 10, 2009 at 1:02 PM, J. Clifford Dyer<j...@sdf.lonestar.org> > wrote: > > &

Re: Unit testing views.

2009-07-09 Thread J. Clifford Dyer
On Fri, 2009-07-10 at 07:58 +0800, Russell Keith-Magee wrote: > On Fri, Jul 10, 2009 at 3:23 AM, J. Cliff Dyer wrote: > > > > I'm trying to get my django site under tests. I've started testing my > > pages using Client('url/to/my/page'), but I noticed that each test takes > > about

Re: Basic concept for templatetag using node and parser

2008-11-14 Thread J. Clifford Dyer
On Fri, 2008-11-14 at 16:59 +0530, suganthi saravanan wrote: > Here i have customized the class in the templatetags folder and i have > render too. Using the function also i have called the parser function > and return the node object... > > I have created the template also > > How to call in

Re: a problem with djikiki

2008-05-25 Thread J. Clifford Dyer
That might be a problem with your urls.py file. An extra comma somewhere, perhaps. Also, what version of django are you using? Cheers, Cliff On Sat, 2008-05-24 at 06:53 -0700, Qiang wrote: > anyone have used the djikiki,a django wiki engine? > i want to write a wiki engine with django like

Re: alternative to (r'^house/edit/(\d+)/$',ediHouse)?

2008-04-12 Thread J. Clifford Dyer
Heh. It should also be pointed out that security is not obfuscation. If your slug is a social security number, I don't care if you're using a one time pad for authentication, you're still going to have social security numbers in your browser history for the world to see. :) A mix of

Re: alternative to (r'^house/edit/(\d+)/$',ediHouse)?

2008-04-12 Thread J. Clifford Dyer
If your concern is people randomly (or intentionally) hitting your URLs, you might try creating a checksum of some kind on your primary key concatenated with a hidden salt string. Just make sure you keep that checksum in an index to your DB, so performance doesn't suffer as a result. There is a

Re: Unexpected TypeError in m2m relationship

2008-03-30 Thread J. Clifford Dyer
On Wed, 2008-03-26 at 19:11 -0400, Karen Tracey wrote: > On Wed, Mar 26, 2008 at 5:16 PM, J. Cliff Dyer <[EMAIL PROTECTED]> > wrote: > > > So it did. I had stripped down my original one to get rid of > a couple > hundred lines of unimportant cruft, but

Re: SQL Join

2008-02-13 Thread J. Clifford Dyer
The type field on Membership rules out m2m. There's a patch in the works (6095) to address this, and it could use testing, if you'd like to try it out. Alternatively, set up a many to one from membership to user, and from membership to group, and call the backrefs "groups" and "users"

Re: template UnicodeDecodeError at / 'utf8' codec can't decode byte 0xa9 in position 1393: unexpected code byte

2008-02-13 Thread J. Clifford Dyer
0xA9 is the codepoint for the copyright symbol, but in UTF-8, characters above 0x7F are not encoded with their codepoint value. That means your documents are probably encoded in ISO-8859-1 or ISO-8859-15. So as per Malcolm's advice, you should either re-save your templates in UTF-8, or tell

Re: Database?

2008-02-10 Thread J. Clifford Dyer
On Sat, 2008-02-09 at 23:19 -0800, waltbrad wrote: > Hi there. I'm a python novice, getting into the Mark Lutz tome. I'm > pretty enthusiastic about python and when I found out that it could be > used in website development I had to look into to Django, (mainly > because of the Satchmo project).

Re: Newbie Question

2008-01-30 Thread J. Clifford Dyer
On Wed, 2008-01-30 at 23:01 +, Tim Sawyer wrote: > Thanks everyone, I've been reading my Python In a Nutshell ("covers python > 2.2!") and it's reminded me of what I've forgotten! > > Any suggestions for good books? Was going to get the django book and the > O'Reilly Python Cookbook. >

Re: multilingual projects in django...

2008-01-26 Thread J. Clifford Dyer
On Sat, 2008-01-26 at 04:40 -0800, halukdogan wrote: > hello > > i'm trying to develop a multilingual web app with django. i've > acchieved making django translate the messages in the views.py but it > does not translate the messages in the template files. > my message file for English is: > >

Re: Form validation and clean_data

2008-01-23 Thread J. Clifford Dyer
On Wed, 2008-01-23 at 22:53 +, Andrew Doades wrote: > Cheers, > > That was basically the question, what do i put in that to field so the > what I email address I enter to the to field is where the message is > sent to! > > Rajesh Dhawan wrote: > > > > On Jan 23, 5:11 pm, Andrew Doades

Re: Question re: defining nature of relationship with ManyToManyFields

2008-01-05 Thread J. Clifford Dyer
See ticket #6095. There's been quite a bit of discussion about it, including a bit on django-dev. Cheers, Cliff On Sat, 2008-01-05 at 00:32 -0800, Topher wrote: > Okay, I found one workaround in the archives (http://groups.google.com/ >

Re: Django... False promises?

2008-01-03 Thread J. Clifford Dyer
On Thu, 2008-01-03 at 16:07 -0800, LRP wrote: > Ah, Django promises much, but so far has delivered nothing but Mal de > Mar. Please tell me that there is smoother sailing beyond this patch > of troubled waters. > > 1) Picked as my nautical chart The Django Book... Must be > authoritative,

Re: stuck with tutorial 3 at - Write views that actually do something

2007-12-14 Thread J. Clifford Dyer
On Fri, Dec 14, 2007 at 01:01:37PM -0800, haver wrote regarding stuck with tutorial 3 at - Write views that actually do something: > > > Hi All, > > I started with django and went through 2.5 tutorials relatively > painless, but nevertheless I stuck on tutorial #3. I tried to modify > regular

x|add:-1 in templates doesn't work as I expect.

2007-12-06 Thread J. Clifford Dyer
Hello. I'm trying to get a template to render previous and next links on a series of pages, as follows. Previous | Next And I've come across some unexpected behavior. The first line does not work (add:-1), while the second line does. The first line throws a TemplateSyntaxError ("add

Re: making two-column table from one-column data

2007-12-02 Thread J. Clifford Dyer
On Sun, 2007-12-02 at 03:05 -0800, andrej kesely wrote: > hi, > i have small question: > suppose i have data in QuerySet - ['A', 'B', 'C', 'D', 'E', 'F', > 'G']. > I want make from this set two-column table in my template: > > AB > CD > EF > G > > What is the fastest way to

Re: Many to many column naming in 1.0?

2007-11-30 Thread J. Clifford Dyer
On Fri, Nov 30, 2007 at 08:16:17AM -0600, Malcolm Tredinnick wrote regarding Re: Many to many column naming in 1.0?: > > On Fri, 2007-11-30 at 07:07 -0500, J. Clifford Dyer wrote: > > Hey all, > > > > Does anyone know if there are plans to include this patch (or s

Many to many column naming in 1.0?

2007-11-30 Thread J. Clifford Dyer
Hey all, Does anyone know if there are plans to include this patch (or similar functionality) in Django 1.0? http://code.djangoproject.com/ticket/785 It's a relatively simple change, breaking no backwards compatibility, and it goes a long way to making it easier to integrate legacy DBs into