Re: os.path

2010-08-02 Thread yalda nasirian
tanx On Mon, Aug 2, 2010 at 11:54 AM, Jirka Vejrazka wrote: > os.path is a standard Python module, you do have it already. > > Cheers > > Jirka > > > On 02/08/2010, yalda.nasirian wrote: > > hi > > > > note > > > > If you want to

Re: where is my os.path

2010-08-02 Thread Carlos Ricardo Santos
So "import os" On 2 August 2010 05:57, yalda.nasirian wrote: > hi > when i type import sys or os i have error that unknown os > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to django-us...@googlegroup

Re: os.path

2010-08-02 Thread Jirka Vejrazka
os.path is a standard Python module, you do have it already. Cheers Jirka On 02/08/2010, yalda.nasirian wrote: > hi > > note > > If you want to be a bit more flexible and decoupled, though, you can > take advantage of the fact that Django settings files are jus

os.path

2010-08-01 Thread yalda.nasirian
hi note If you want to be a bit more flexible and decoupled, though, you can take advantage of the fact that Django settings files are just Python code by constructing the contents of TEMPLATE_DIRS dynamically, for example: import os.path TEMPLATE_DIRS = ( os.path.join(os.path.dirname

where is my os.path

2010-08-01 Thread yalda.nasirian
hi when i type import sys or os i have error that unknown os -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr

Re: Os.path in window and linux help?

2009-05-03 Thread George Song
--- > this application is to make a report(reportlab,xhtml2pdf,pisa ) .it > works fine on my OS( Ubuntu ) > But the images could not display on other OS(Windows) > look at my templates source code i try to works on cross platforms such > as linux ,windows. > A

Os.path in window and linux help?

2009-05-03 Thread phan sarak
and this is mytemplate --- - this application is to make a report(reportlab,xhtml2pdf,pisa ) .it works fine on my OS( Ubuntu ) But the images could not display on other OS(Windows) look at my templates source code

Re: Django And os.path Behavior

2008-12-05 Thread Graham Dumpleton
On Dec 6, 10:07 am, dayvo <[EMAIL PROTECTED]> wrote: > Good question.  That could affect the app if I were using relative > path's or relying on the environment to locate files.  The path's I'm > using in the app are stored are absolute paths.  They work correctly > for path's that don't have un

Re: Django And os.path Behavior

2008-12-05 Thread dayvo
Solved. I had to surround my folderpath field with smart_str according to http://docs.djangobrasil.org/ref/unicode.html#ref-unicode The only change needed in the example was on the last line: [EMAIL PROTECTED]:/home/published/www/django/catalog/music# cat demo.py import os import music.models

Re: Django And os.path Behavior

2008-12-05 Thread Karen Tracey
On Fri, Dec 5, 2008 at 6:07 PM, dayvo <[EMAIL PROTECTED]> wrote: > > Good question. That could affect the app if I were using relative > path's or relying on the environment to locate files. The path's I'm > using in the app are stored are absolute paths. They work correctly > for path's that d

Re: Django And os.path Behavior

2008-12-05 Thread dayvo
from django.db import models from django.contrib.contenttypes.models import ContentType from django.contrib.contenttypes import generic from django.contrib.auth.models import User import datetime class TagItem(models.Model): foreignID = models.IntegerField() description = models.

Re: Django And os.path Behavior

2008-12-05 Thread Carlos A. Carnero Delgado
Hello, > The path in this demo contains "El Camarón de la Isla", where the > accent character is the trouble maker. Can you post your music.models? Best regards, Carlos. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Grou

Re: Django And os.path Behavior

2008-12-05 Thread dayvo
Good question. That could affect the app if I were using relative path's or relying on the environment to locate files. The path's I'm using in the app are stored are absolute paths. They work correctly for path's that don't have unicode characters in them. My Django app works correctly with %

Re: Django And os.path Behavior

2008-12-05 Thread Graham Dumpleton
What locale settings do you have set in the environment of your user account? These will not be getting used in context of Apache. Graham On Dec 6, 9:21 am, dayvo <[EMAIL PROTECTED]> wrote: > Thanks for the response Andy. > > The code does work fine in the interpreter.  It's when the code is > c

Re: Django And os.path Behavior

2008-12-05 Thread dayvo
Thanks for the response Andy. The code does work fine in the interpreter. It's when the code is called from a web page where it throws an error. I know it has something to do with unicode but I can't understand why os.stat is behaving differently. To test from a view:

Re: Django And os.path Behavior

2008-12-05 Thread Andy McKay
;, "copyright", "credits" or "license" for more information. (InteractiveConsole) >>> import django >>> import test True Seems to work just fine, there's nothing I've seen that fiddles with os.path. What is more likely: in one situat

Django And os.path Behavior

2008-12-05 Thread dayvo
os.path.exists behaves differently if called from a django app. Why? Can I work around this? I need to check if pathnames exist where the path may have special/unicode characters. I also need to open files from that path. The path in this demo contains "El Camarón de la Isla", where the accent