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
>

Your structure should give you a clue. What file exists in every directory, 
except for "ingestion"? Hint: it begins with "_". You need it in your 
"ingestion" directory too.
--
DR.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/6Ij6xoYq438J.
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