On Thu, Nov 12, 2009 at 10:33 AM, andreas schmid wrote:
>>
> im on a unix system and i can import it on the django shell but it makes
> troubles when running the django server which doesnt make sense
It may be that it won't be recognized as an app because the app
directory doesn't
have a models.
I am not sure if i got the problem right, but this is what i think you could do.
If you want to keep your views in directory:
app/
views/
__init__.py <- This is where you keep your views so you don't
even need to change your urls.py or anthing
something_else.py <- something else
A
Bill Freeman wrote:
> If that wasn't a typo, I suspect that you're going to have trouble
> with having a directory
> named "views.py".
yes it was a typo... my dir is called 'views'
> I don't know how you import anything from it unless
> it is directly on
> your path.
>
> When you say "my app is i
If that wasn't a typo, I suspect that you're going to have trouble
with having a directory
named "views.py". I don't know how you import anything from it unless
it is directly on
your path.
When you say "my app is in the pythonpath of the environment":
1. Which directory is in the python path?
Bill Freeman wrote:
> Does your project root (I'm assuming that's the directory containing
> the sub directory "app") have an __init__.py file. Does the app
> directory? I'm assuming that the one you mention below is in
> app/models/ . All three are required, if what you have on your
> sys.path
Does your project root (I'm assuming that's the directory containing
the sub directory "app") have an __init__.py file. Does the app
directory? I'm assuming that the one you mention below is in
app/models/ . All three are required, if what you have on your
sys.path is just the project root.
Do
im experiencing the same problem.
i started with a simple app and the modules.py was at the root of the
app package, so everything was fine.
now i extended the app and restructured the files in it by making a
subfolder app/models and inside an __init__.py and the mymodel.py
in the urls.py which i
I had another couple of thoughts.
In the manage.py shell, try:
from openid.yadis import xri
xri
The output will include from where it got xri. Make sure that it's
coming from your lib directory, and not from some old system wide
installation of openid.
Instead of:
from openid.as
Did you really mean "init.py", rather than the required "__init__.py".
If so, that's wrong.
I presume that the names of the files and directories are all lower
case and contain no spaces or accented characters.
I presume that you've checked and rechecked the spelling of the file
name against th
I used this in my settings.py to add the open id folder on my path
sys.path.append(os.path.join(FILE_ROOT, 'lib', 'openid'))
and on my path it say:
'C:\\TheAbeonaFile\\Python26\\Lib\\idlelib\\lib\\openid'
And both the yadis file and openid file have an init.py
On 10 Nov, 22:18, Bill Freeman wr
Which all of these directories are on your python path, and which of
them have __init__.py files?
Bill
[Hint to answer first question:
from pprint import pprint as pp
import sys
pp(sys.path)
]
On Tue, Nov 10, 2009 at 5:12 PM, When ideas fail
wrote:
>
> I have a folder called lib on my path a
11 matches
Mail list logo