How python treat some folder as module? You need to add __init__.py into it.


On Thu, Feb 9, 2012 at 11:33 AM, Daniel Roseman <dan...@roseman.org.uk>wrote:

>
> On Thursday, 9 February 2012 10:21:29 UTC, Alessandro Candini wrote:
>>
>> Hi list.
>> In my project named STO I have the 'jsonopenlayers' app with the
>> following structure:
>>
>> STO
>> ├── __init__.py
>> ├── jsonopenlayers
>> │ ├── ingestion
>> │ │ └── ingestShp.py
>> │ ├── __init__.py
>> │ ├── models.py
>> │ └── views.py
>> ├── manage.py
>> └── settings.py
>>
>> What I would like to do is to import the functions written inside
>> ingestShp.py into my views.py.
>>
>> I've tried in several ways, for example with
>>
>> from jsonopenlayers.ingestion.**ingestShp import *
>>
>> inside the views.py file, but I get the error
>>
>> Could not import jsonopenlayers.views. Error was: No module named
>> ingestion.ingestShp
>>
>> How can I import this file?
>>
>> Thanks in advance
>>
>
>

-- 
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