Recursive ForeignKey with blank=True

2006-03-02 Thread David Ascher
I'm trying to model an employee database, with the reporting relationship modeled as (using magic-removal):class Person(models.Model):    ...    reports_to = models.ForeignKey("self", blank=True, null=True) I need the blank=True because I'd like to avoid the bootstrapping problem in the admin UI th

Re: Django screencast

2005-12-13 Thread David Ascher
On 12/13/05, Tom Dyson <[EMAIL PROTECTED]> wrote: I've made a short screencast which introduces some of Django's keyconcepts:Great first step!1) the musical background is a very nice touch.2) in the interactive shell session, I first had the impression because it went by fast that accessing the dat

Re: To write software application with Django

2005-12-10 Thread David Ascher
On 12/10/05, Armin <[EMAIL PROTECTED]> wrote: I want to write software in Python using pyfltk GUI library and Djangoto access my data on a remote database. Then I want to make my softwareexecutable with py2exe, and sell it for a billion $.Is my plan realistic? yes, but you need to share 1% of that

Re: Per-user data: any pointers?

2005-11-27 Thread David Ascher
On 11/27/05, Robert Wittams <[EMAIL PROTECTED]> wrote: The best way to do this is to have a ForeignKey to auth.User on the toplevel object of your per user data. Thanks, that's what I ended up doing last night. And then do the permission checking in your view functions. This can beeased by adding

Per-user data: any pointers?

2005-11-26 Thread David Ascher
I'm trying to figure out how best to do per-user data (think of the relationship between users and her photos on flickr).I notice that there's a nifty concept of "permissions", which in some ways is per-user binary data.  There is also the mostly undocumented (?) get_profile() call, which might or

Re: Session

2005-11-26 Thread David Ascher
On 11/26/05, PythonistL <[EMAIL PROTECTED]> wrote: Hi,Is it possible to do the following with the sessions? In my web application I would like to tell a user ,when he is doingshopping to cart, that he is login.So, in the login page ( where user insert his ID and password) I  used request.session['U

Re: Django on Textdrive?

2005-11-25 Thread David Ascher
On 11/25/05, Nebojša Đorđević - nesh <[EMAIL PROTECTED]> wrote: On 25-11-2005, at 7:35, David Ascher wrote:> Has anyone had any success w/ Django on TxD?up-and-runnig quattro.textdriven.com ;) What setup did you use?  Apache/Lighttpd, fcgi/scgi/other? 

Re: Django on Textdrive?

2005-11-25 Thread David Ascher
But then, I think you've alrady emailed me; are you 'da' from the forum? I am =)Looking forward to the docs.---david

Re: lists in the django model system dealiomajigger.

2005-11-24 Thread David Ascher
On 11/24/05, possibilitybox <[EMAIL PROTECTED]> wrote: storing a list of tags, essentially, a la del.icio.us/flickr...You should read up on https://simon.bofh.ms/cgi-bin/trac-django-projects.cgi/wiki/AbstractTaggingCheers,--david

Re: lists in the django model system dealiomajigger.

2005-11-24 Thread David Ascher
On 11/24/05, possibilitybox <[EMAIL PROTECTED]> wrote: What kind of field would one use to store a list of values (they're allgoing to be strings, if that's relevant.)?Depends what you want to do with them.  Can you say more?--david

Django on Textdrive?

2005-11-24 Thread David Ascher
I'm getting to the point where I'd like to run some Django servers on the public web.  I have an account at TextDrive, and I've dug through their site for info.  So far, I have seen no evidence of people successfully running Django there, in part because they don't support mod_python, AFAICT they d

Re: init fails

2005-11-23 Thread David Ascher
On 11/23/05, Kenneth Gonsalves <[EMAIL PROTECTED]> wrote: On Wednesday 23 Nov 2005 2:46 pm, Kenneth Gonsalves wrote:> hi> i have a working django app. i did an svn checkout of the app> into another machine. When i try to run init, i am getting this> error: >> Error: The database couldn't be initial

Re: How to add user registration/login to an existing app?

2005-11-21 Thread David Ascher
On 11/21/05, Grigory Fateyev <[EMAIL PROTECTED]> wrote: Hello bsoltani!On Mon, 21 Nov 2005 16:30:13 - you wrote:>> As long we're counting who's interested, count me in :).>me too, +1.So the answer is that there is a set of views that can be used for it, but they're not as neatly packaged as mig

Re: 20 minute wiki, sortof.

2005-11-20 Thread David Ascher
On 11/20/05, Ian Holsman <[EMAIL PROTECTED]> wrote: hi David.do you have a SVN url?I'd love to replace moinmoin with a django wiki (i don't need muchfrom a wiki, so even a 20 minute one might be ok ;-)Uh, my code is currently at http://da.textdriven.com/svn/sydney/trunk/wiki/, but I can guarantee

Re: Using umlauts

2005-11-19 Thread David Ascher
On 11/19/05, hugo <[EMAIL PROTECTED]> wrote: This is not a new restriction introduced by Django, it's a very common restriction all over the internet protocols. So maybe we shouldn't try to solve the worlds problems all at once with Django, we still need stuff to do with 2.0 ;-)I didn't mean to im

Re: Using umlauts

2005-11-19 Thread David Ascher
On 11/19/05, hugo <[EMAIL PROTECTED]> wrote: So it's much better to stick to 7bit chars for user names. You can setthe users real name in Django, though - and there you can use allcharacters you want. ... which doesn't work for a bunch of people around the world =).  One alternative is to let peopl

Re: Why it doesn't work in Django

2005-11-18 Thread David Ascher
On 11/18/05, Adrian Holovaty <[EMAIL PROTECTED]> wrote: The Web page isn't recognizing your CSS file. Django isn't intendedserve static media files -- such as CSS -- so you'll need to useanother server, such as Apache, to serve the CSS file. Alternatively,check out the django.views.static.serve, w

How to add user registration/login to an existing app?

2005-11-18 Thread David Ascher
I've read the docs on the Django authentication model, and it seems pretty good.  What I'm looking for now is some pointers re: how to leverage the code that's used for the admin view in adding login/logout/registration/email password pages to my existing app (or similar contrib code). How are peop

Re: 20 minute wiki, sortof.

2005-11-18 Thread David Ascher
On 11/18/05, Simon Willison <[EMAIL PROTECTED]> wrote: Alternatively, we could just have CommonMiddleware throw a deliberateserver error if a POST is made to a IRL that doesn't have a trailingslash. That should make things abundantly clear :) POSTing to a URLthat CommonMiddleware wants to redirect

20 minute wiki, sortof.

2005-11-18 Thread David Ascher
After watching the TurboGears 20 minute wiki screencast today, I figured I'd try to build the equivalent code in Django to see what it's like.It took me more than 20 minutes, but since this is my first non-tutorial Django app, I'm ok with that. If anyone is interested, I've put it up at: http://da.

Re: Django and Ruby on Rails framework roundtable: Dec. 3 in Chicago

2005-11-17 Thread David Ascher
On 11/17/05, Adrian Holovaty <[EMAIL PROTECTED]> wrote: Hi all,If you're in the area, you should come to Snakes and Rubies, a meetingof Python and Ruby Web programmers on Dec. 3 in Chicago.David Heinemeier Hansson of Ruby on Rails will be presenting his creation, and I'll be presenting Django. We'l