Re: Import issue

2021-10-02 Thread Sophia Iroegbu
Thanks it works On Sat, Oct 2, 2021, 11:47 AM Vineet Kothari wrote: > Hi, > Did you check in python manage.py shell then try to import it and > check. > > Thanks & Regards, > Vineet Kothari > > On Sat, 2 Oct 2021, 10:12 am Malcolm MacKinnon, > wrote: > >> Is your module included in your in

Re: Import issue

2021-10-02 Thread Vineet Kothari
Hi, Did you check in python manage.py shell then try to import it and check. Thanks & Regards, Vineet Kothari On Sat, 2 Oct 2021, 10:12 am Malcolm MacKinnon, wrote: > Is your module included in your installed apps in the settings.py file? > > On Fri, Oct 1, 2021 at 8:09 PM Sophia Iroegbu

Re: Import issue

2021-10-01 Thread Malcolm MacKinnon
Is your module included in your installed apps in the settings.py file? On Fri, Oct 1, 2021 at 8:09 PM Sophia Iroegbu wrote: > > I noticed that each time I download a python package and import it. > It imports, it works but once I run my code it runs into an error. > > Error message: ModuleNotFou

Import issue

2021-10-01 Thread Sophia Iroegbu
I noticed that each time I download a python package and import it. It imports, it works but once I run my code it runs into an error. Error message: ModuleNotFoundError. What do I do? -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubs

Re: noob: cyclic import issue

2010-03-29 Thread bruno desthuilliers
On 29 mar, 12:16, vamsy krishna wrote: > thnx jonas...i figured datz wat i mite do... Totally OT, but talking "datz way" won't make you looks "kewl" here. > so django has a limitation > on imports like in da case i mentioned? > It's not a django limitation, it's a Python one. Technical point

Re: noob: cyclic import issue

2010-03-29 Thread vamsy krishna
thnx jonas...i figured datz wat i mite do...so django has a limitation on imports like in da case i mentioned? On Mar 29, 2:51 pm, Jonas Obrist wrote: > On 03/29/2010 10:28 AM, vamsy krishna wrote: > > > hi...am very new to django and am having some problem with my code... > > > say i've two modu

Re: noob: cyclic import issue

2010-03-29 Thread Jonas Obrist
On 03/29/2010 10:28 AM, vamsy krishna wrote: hi...am very new to django and am having some problem with my code... say i've two modules...mod1 n mod2...n views in both modules have certain generic functions which i need to import from each other...as in (in views.py of mod1) from mod2.views im

noob: cyclic import issue

2010-03-29 Thread vamsy krishna
hi...am very new to django and am having some problem with my code... say i've two modules...mod1 n mod2...n views in both modules have certain generic functions which i need to import from each other...as in (in views.py of mod1) from mod2.views import xyz (and in views.py of mod2) from mod1.

Re: library import issue.

2008-06-17 Thread Karen Tracey
On Tue, Jun 17, 2008 at 3:48 AM, James Matthews <[EMAIL PROTECTED]> wrote: > The server is running suExec therefore Apache executes as the user. So it > should be able to read my library. > SuEXEC cleans the environment before calling your code. According to Step 19 described here: http://httpd

Re: library import issue.

2008-06-17 Thread James Matthews
The server is running suExec therefore Apache executes as the user. So it should be able to read my library. James On Mon, Jun 16, 2008 at 5:08 PM, Karen Tracey <[EMAIL PROTECTED]> wrote: > On Mon, Jun 16, 2008 at 9:19 AM, James Matthews <[EMAIL PROTECTED]> > wrote: > >> Karen >> >> The library

Re: library import issue.

2008-06-16 Thread Karen Tracey
On Mon, Jun 16, 2008 at 9:19 AM, James Matthews <[EMAIL PROTECTED]> wrote: > Karen > > The library path is in both LD_LIBRARY_PATH and the PYTHONPATH You mean you've specified it in the appropriate config file? Based on the results, though, it doesn't seem to be working. What, exactly, did you

Re: library import issue.

2008-06-16 Thread James Matthews
Karen The library path is in both LD_LIBRARY_PATH and the PYTHONPATH On Mon, Jun 16, 2008 at 3:09 PM, Karen Tracey <[EMAIL PROTECTED]> wrote: > On Mon, Jun 16, 2008 at 8:48 AM, James Matthews <[EMAIL PROTECTED]> > wrote: > >> Sorry, >> >> I am running Django in a shared hosting environment, Apac

Re: library import issue.

2008-06-16 Thread Karen Tracey
On Mon, Jun 16, 2008 at 8:48 AM, James Matthews <[EMAIL PROTECTED]> wrote: > Sorry, > > I am running Django in a shared hosting environment, Apache, Fcgi > Then you need to make sure that whatever modifications you had to make in your user shell environment to get the import to work are also in e

Re: library import issue.

2008-06-16 Thread James Matthews
Sorry, I am running Django in a shared hosting environment, Apache, Fcgi James On Mon, Jun 16, 2008 at 2:43 PM, Karen Tracey <[EMAIL PROTECTED]> wrote: > On Mon, Jun 16, 2008 at 6:07 AM, James Matthews <[EMAIL PROTECTED]> > wrote: > >> Hi, >> >> I am trying to import a library that is in a non-

Re: library import issue.

2008-06-16 Thread Karen Tracey
On Mon, Jun 16, 2008 at 6:07 AM, James Matthews <[EMAIL PROTECTED]> wrote: > Hi, > > I am trying to import a library that is in a non-standard location > ~/opt/lib (I am in a shared environment) and i added it to my > "LD_LIBRARY_PATH" however Django tells me it cannot find it and me a 500 > error

Re: library import issue.

2008-06-16 Thread James Matthews
Thank You very much Peter. However this is the output of what you told me to do. And i don't get an import error when i try to import Hdate under the django shell Python 2.5.2 (r252:60911, Mar 30 2008, 02:18:56) [GCC 3.3.5 (Debian 1:3.3.5-13)] on linux2 Type "help", "copyright", "credits" or "lice

Re: library import issue.

2008-06-16 Thread Peter Bengtsson
On Jun 16, 11:07 am, "James Matthews" <[EMAIL PROTECTED]> wrote: > Hi, > > I am trying to import a library that is in a non-standard location ~/opt/lib > (I am in a shared environment) and i added it to my "LD_LIBRARY_PATH" > however Django tells me it cannot find it and me a 500 error. > > In p

library import issue.

2008-06-16 Thread James Matthews
Hi, I am trying to import a library that is in a non-standard location ~/opt/lib (I am in a shared environment) and i added it to my "LD_LIBRARY_PATH" however Django tells me it cannot find it and me a 500 error. In python i can import the library but not in Django. I compiled this library using

Re: Import issue using signals.py

2006-10-19 Thread Waylan Limberg
On 10/19/06, MerMer <[EMAIL PROTECTED]> wrote: > > > > The quick fix here is to replace that line with > > > > from mysite.promotions import signals > > > > The quick fix here didn't work. I would then get > "update_review_average is undefined." Right, however `signals.update_review_aver

Re: Import issue using signals.py

2006-10-19 Thread MerMer
> The quick fix here is to replace that line with > > from mysite.promotions import signals > The quick fix here didn't work. I would then get "update_review_average is undefined." However, many thanks for the explanation, I'll go through it and if I have further questions come back.

Re: Import issue using signals.py

2006-10-19 Thread Malcolm Tredinnick
On Thu, 2006-10-19 at 05:27 -0700, MerMer wrote: > Malcom, many thanks. > > I have to admit as a newbie to Python and Django and I dont' fully > understand how "import" works. I just presumed that you put a > reference to any module at the top. You can. But you aren't referring to a module, you

Re: Import issue using signals.py

2006-10-19 Thread MerMer
Apologies but "from mysite.promotions.signals import update_review_average" should read "from mysite.products.signals import update_review_average" MerMer --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django us

Re: Import issue using signals.py

2006-10-19 Thread MerMer
Malcom, many thanks. I have to admit as a newbie to Python and Django and I dont' fully understand how "import" works. I just presumed that you put a reference to any module at the top. At the top of the product.models.py file I have the following:- "from mysite.promotions.signals import updat

Re: Import issue using signals.py

2006-10-19 Thread Malcolm Tredinnick
On Thu, 2006-10-19 at 04:32 -0700, MerMer wrote: > I've tried to set up a signals.py file in the same directory as my app > ("products"). > > At the top of the signals.py I have the following import statement: > > from myapp.products.models import Product, Review > > The two model classes (Prod

Import issue using signals.py

2006-10-19 Thread MerMer
I've tried to set up a signals.py file in the same directory as my app ("products"). At the top of the signals.py I have the following import statement: from myapp.products.models import Product, Review The two model classes (Product and Review) both sit in the models.py in the products directo