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
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
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
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
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
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.
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.
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?
>
>
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
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
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
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.
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
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
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
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
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
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
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
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
20 matches
Mail list logo