You are not logged in.

#1 2012-11-09 06:42:05

Registered: 2012-02-08
Posts: 98

[Solved] A bit of Django help for a confused soul

I'm trying to use Django's FilePathField object inside of a Page class I've created, so that each new page created can be associated with a template from a templates folder. Currently, I have two dummy .html templates sitting in the folder, but the FilePathField just turns up a blank list every time I use it. I'm totally bewildered, since the documentation doesn't go greatly in depth on this particular field, and there doesn't seem to be a lot of help floating around out there on the subject (using the file upload is obviously far more popular).

I can't help but feel like I'm doing something wrong. I specified the path to my templates folder as the first argument to the field, and it's showing up as the correct path in the admin form. Can anyone help me shine some light on this?

[EDIT: I was missing the 'path=' variable preceding my path. How stupid can one be?]

Last edited by OakRaider4Life (2012-11-09 10:26:00)


Board footer

Powered by FluxBB