Re: Django, Python, AJAX position

2010-11-30 Thread Brett Thomas
If nobody responded to you yesterday, you might want to revise the post with some more details, rather than just re-posting it. It's not worth most good developers' time to inquire about 2 sentence job posts that are really ambiguous... On Tue, Nov 30, 2010 at 10:37 AM, Bita Bita wrote: > My cli

Re: django to php

2010-11-30 Thread Brett Thomas
Time better spent learning django :) On Nov 30, 2010 9:24 AM, "Tom Evans" wrote: > On Tue, Nov 30, 2010 at 7:26 AM, Akash Mukherjee wrote: >> Hello, >> >> I have a webapp created in django. Now I want to convert the entire >> code into PHP. Is it possible?? If yes, how? >> >> Thanks >> >> Akash >

Re: Django timestamp to Javascript timestamp

2010-11-29 Thread Brett Thomas
I found it easiest to use the javascript date constructor with a date string. Just have Django output the date in whatever time zone you want it displayed to the user: var d=new Date("November 29, 2010 9:22:00"); Unfortunately Django's default Date display, the ISO standard, prints a string that

Should CSRF Middleware return 403 or 500 error from AJAX call?

2010-11-15 Thread Brett Thomas
Hi there, Ran into some unexpected CSRF behavior - not sure if it's desired or a bug. An AJAX request that includes the "X-Requested-With: XMLHttpRequest" header but does not include csrf token will bypass CSRF middleware. If you hit server error (mine was a TypeError), response has error code 500

Re: Proto-newbie needs Django for running an app, not for dev work

2010-09-17 Thread Brett Thomas
Thanks for the thorough email. Hopefully somebody else can tell you more about what you did bc I'm not that familiar with the Django internals, but shared hosting is just hard to navigate. (I assume you are using a shared hosting account, thus the sudo command - run as administrator - doesn't work.

Aggregating answers from different question types

2010-04-01 Thread Brett Thomas
Hey, this is a pretty basic schema question, but I'm wondering how to best implement it in Django. I have an app that collects user data from a few different question types: multiple choice questions, true/false questions, numerical questions, etc. I'll have a bunch of queries that aggregate all a

Best practices for restricting media?

2010-02-21 Thread Brett Thomas
Hey, this is a pretty basic sysadmin question, but seems pretty critical for django development. What's the best way to limit media on a django site to certain users? A typical example is a photo gallery app. Suppose you are recreating Flickr, and a user's photos should only be viewable by his/her

URL design - why the trailing slash?

2010-01-27 Thread Brett Thomas
Most of the URLConf examples I run across use a trailing slash on all URLs: www.example.com/profile/ I'm not sure why, but I don't like this. I think it looks nicer without: www.example.com/profile Are there any performance or security reasons to use the trailing slash in Django? Seems like there

Re: is there a way to cascade foreign keys?

2010-01-26 Thread Brett Thomas
I'm fairly new to django - please correct me if this isn't a good solution. I ran in to a similar issue recently, and found it alot easier to have the ajax views return full html rather than json. So load the page with empty divs for each dropdown, then displaying the second form is much easier: