Sorry, I was unclear. I don't mean that these files contain python  
source code. They contain text that I want to read from certain  
requests to my app. So the question is where to put the files (under  
the app directory I assume), and how to refer to them using a  
relative path, or how I can discover the context to specify an  
absolute path.

Jack

On Mar 3, 2009, at 4:58 PM, Briel wrote:

>
> Django makes python aware of your app folder when you install the app
> so you can just do:
>
> from appname.resources.filename import function
>
> That should work whenever your app is propperly installed.
>
> On 3 Mar., 21:41, Jack Orenstein <j...@geophile.com> wrote:
>> I have a small number of files that need to be accessible to my
>> Django application. These are part of the application, and so should
>> be treated as source code. The question is where to put them? Putting
>> them under MEDIA_ROOT doesn't seem right. They go with the
>> application so they should be somewhere under the application
>> directory. Suppose I put them in APPLICATION_NAME/resources -- how
>> would I then refer to these files? I obviously don't want to code an
>> absolute path into my application.
>>
>> Jack
> >


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to