Re: static images with built-in django server

2007-10-06 Thread staff-gmail
Tim Chase wrote: >> Thanks. Yes, using relative paths is the right idea - it's a shame that >> the base url's have to be hard coded in the templates. I understand >> from a web efficiency standpoint of Django not handling static content >> but from an application development standpoint this

Re: static images with built-in django server

2007-10-06 Thread staff-gmail
cjl wrote: > John: > > I've added a section at the end of the first chapter of my tutorial > that describes how to serve static content with the Django development > server, which seems to be a frequently asked question. See: > > http://www.instantdjango.com/chapter1.html > > Check it out, and

static images with built-in django server

2007-10-05 Thread staff-gmail
I have read the docs on static files but cannot figure out how to specify an image when using the built-in web server. If I have my media location: /myproject/myapp/media/picture1.png if I have a template file /myproject/myapp/templates/mypage.html if I try : I get nothing. In fact I've

NewForms Choice Field Working ?

2007-10-04 Thread staff-gmail
I'm using vers .96 I converted a char field to have choices old: prefix = models.CharField(maxlength=100, default = 'Mr.') I then changed my model: SALUTATION=( ('Mr.','Mr.'), ('Ms.','Ms.'), ) ... prefix = models.CharField(maxlength=100, choices=SALUTATION, default='Mr.') I then ran

Re: confused over using ORM in view/template

2007-10-03 Thread staff-gmail
nd maybe I will contribute some documentation if I can figure some things out - or maybe I just say the heck with Django attitudes and go back to Rails. I'm losing productivity fast here. Malcolm Tredinnick wrote: > On Wed, 2007-10-03 at 11:22 -0600, staff-gmail wrote: > [...] > >&g

where to put algorithm libraries

2007-10-02 Thread staff-gmail
I have a class full of algorithms - where is the best place to put this in Django so that I can then just "import libxxx" in any model class. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group.

default locations for css and js files

2007-10-01 Thread staff-gmail
I can't figure out where to put my css and js files. I did not want to hard code the media path in my settings file so it is the default ''. So if I put a css file in my template - where does Django look for the relative path ? Any help appreciated.

Re: Forms vs. Admin?

2007-10-01 Thread staff-gmail
cjl wrote: > John: > > >> I think it would actually be of more benefit if you could/would >> contribute this to the django project and have it on the project site. >> That way we can all contribute to it and make it even better. >> > > Are you referring to my 'Instant Django' website? > >

Re: Should Django have a road map?

2007-10-01 Thread staff-gmail
okay,okay, I'll just write up something and submit it :) I didn't see any welcome or about page on the main site so I'll work on that and include this stuff. Now back to coding. Tim Chase wrote: >> similar - sooo, do you think it's worthwhile to pull this together on a >> about / welcome

Re: Forms vs. Admin?

2007-10-01 Thread staff-gmail
I think it would actually be of more benefit if you could/would contribute this to the django project and have it on the project site. That way we can all contribute to it and make it even better. cjl wrote: > I'm a Django and web-development newcomer, working on a tutorial for > other

Re: Forms vs. Admin?

2007-10-01 Thread staff-gmail
I just posted a ticket (documentation #5645) for something similar - I also think the choice is confusing to new users sooo, let's get some documentation improved on this - feel free to contribute to the ticket - I'll try to do likewise. Horst Gutmann wrote: > Do you mean for other users

Re: Should Django have a road map?

2007-10-01 Thread staff-gmail
Malcolm, well said - I just wasted a bunch of time writing a response that was similar - sooo, do you think it's worthwhile to pull this together on a about / welcome / introduction page under a heading like "How Django Works". Then when these comments come, they can be pointed to the page.

Re: How to create a nested list in a view?

2007-09-30 Thread staff-gmail
You are right - you don't want to do all that in the view. You should be able to pass in your railway_list as an object to the template then in your template show each item as {{railway_list.name}} or something like that. Dan wrote: > Hello All > > I seem to be having a bit of a problem

Re: how to do something at startup

2007-09-28 Thread staff-gmail
James Bennett wrote: > On 9/28/07, Mark Green <[EMAIL PROTECTED]> wrote: > >> i'm looking for a way to perform a bunch of initialization tasks >> right after django startup. >> > > There really is no such thing as "Django startup"; remember that > Django is hosted inside a web server, and

Re: Downloadable HTML documentation?

2007-09-28 Thread staff-gmail
James Bennett wrote: > On 9/28/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > >> A search of the group didn't turn this up, so I thought I'd ask: is >> there any way to get an HTML version of the docs other than slurping >> it off the Django site? The indexing and links in the HTML version

Re: what is wrong with my New Forms code

2007-09-28 Thread staff-gmail
to correlate to the if > request.method not the first if. > thks - you are exactly right - I fixed the indentation and all is well. > > -richard > > On Sep 27, 2007, at 10:52 PM, staff-gmail wrote: > > >> I tried the following but it fails in flames with &quo

what is wrong with my New Forms code

2007-09-27 Thread staff-gmail
I tried the following but it fails in flames with "http response required..." I've followed the documentation - am I called the function correctly by a url with "/mymodel_addedit"Can someone help ? urls.py r'^mymodel/addedit/$', 'myproject.myapp.views.mymodel_addedit'), views.py def

Re: Making Django Easier For New Users

2007-09-26 Thread staff-gmail
Russell Keith-Magee wrote: > On 9/25/07, staff-gmail <[EMAIL PROTECTED]> wrote: > >> Just some perspectives from a new user starting to use Django from Rails >> and PHP. I really like the organization of Django (great job guys). >> But due to some of t

Some New User Questions & Suggestions

2007-09-25 Thread staff-gmail
somehow my earlier post got stuck into another thread. As a new user, here are some suggestions & questions: Startup: It is important to note in the documentation that with some distros (ie ubuntu) you need: $ django-admin.py startproject myproject then to create an application: $ cd

Making Django Easier For New Users

2007-09-24 Thread staff-gmail
Just some perspectives from a new user starting to use Django from Rails and PHP. I really like the organization of Django (great job guys). But due to some of the newness, here are some lack of examples that still make Django kind of hard to use or figure out. So while my comments might