Re: IMPORT PROBLEM

2024-09-03 Thread Olatide Joseph
There's no file named views.py in that directory On Mon, Sep 2, 2024, 2:03 PM Talha Malik wrote: > Send the screenshot of folder structure, in which file you are importing > and how you are importing? > > On Mon, 2 Sept 2024, 11:46 am Augusto Domingos, < > augustodomingosva...@gmail.com> wrote:

Re: IMPORT PROBLEM

2024-09-02 Thread Talha Malik
Is views.py in the same folder of urls.py or is views.py in the parent folder of urls folder? On Mon, 2 Sept 2024, 12:44 pm Heman Okumbo, wrote: > Homeland is my project directory,there is another folder in the same > directory with the same name,my apps directory is named land and its where > i

Re: IMPORT PROBLEM

2024-09-02 Thread Talha Malik
Send the screenshot of folder structure, in which file you are importing and how you are importing? On Mon, 2 Sept 2024, 11:46 am Augusto Domingos, < augustodomingosva...@gmail.com> wrote: > > can you send some screenshots showings how you are importing the view? > Em segunda-feira, 2 de setembro

Re: IMPORT PROBLEM

2024-09-02 Thread Prashanth Patelc
Use like this path('pen/',views.land,name='pen'), On Mon, Sep 2, 2024, 1:14 PM Heman Okumbo wrote: > Homeland is my project directory,there is another folder in the same > directory with the same name,my apps directory is named land and its where > i am trying to import views from. > I get the b

Re: IMPORT PROBLEM

2024-09-02 Thread Heman Okumbo
Thanks for the tip,what can be the problem if Django is not importing a function from the app directory ie from land import views,the function in views is pen, error traceback states there is no pen function in views. On Mon, Sep 2, 2024, 12:12 Augusto Domingos wrote: > Good... it's just a path

Re: IMPORT PROBLEM

2024-09-02 Thread Augusto Domingos
Good... it's just a path issue. Instead of doing '*from . import views*', try this: '*from {app_name} import views*'. In your case, you have an app named *'land*', so it would look something like this: '*from land import views*'. You need to specify the app name because of the directory str

Re: IMPORT PROBLEM

2024-09-01 Thread Augusto Domingos
can you send some screenshots showings how you are importing the view? Em segunda-feira, 2 de setembro de 2024 às 07:50:38 UTC+2, Heman Okumbo escreveu: > My project url cannot import views from the app folder, what ks the > problem? > -- You received this message because you are subscribed t

IMPORT PROBLEM

2024-09-01 Thread Heman Okumbo
My project url cannot import views from the app folder, what ks the problem? -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroup

Re: Circular import problem

2014-04-16 Thread Johannes Schneider
You can use from foo import bar inside your method/class definitions or you can use import foo.bar. bg, Johannes On 16.04.2014 11:37, Daniel Oźminkowski wrote: Hello, I recently cut my models.py into separate files and now I try to fix all the problems with imports that showed up. I hit the w

Circular import problem

2014-04-16 Thread Daniel Oźminkowski
Hello, I recently cut my models.py into separate files and now I try to fix all the problems with imports that showed up. I hit the wall on this one though. Purpose of the application is to process a text file with instructions and fit them into hierarchical structure like this: Program <- Node

Re: Circular import problem

2013-04-13 Thread bubufff
a model (so > i have to import the models in this file). Also, in my models file, I > trigger a post_save signal to call the util file file (so I have to import > this file in the models file). Obviously, I will get a circle import > problem. Therefore, what is the best pra

Re: Circular import problem

2013-04-11 Thread Nikolas Stevenson-Molnar
all, > > I have a util file, which will do some stuffs and then, update a model > (so i have to import the models in this file). Also, in my models > file, I trigger a post_save signal to call the util file file (so I > have to import this file in the models file). Obviously, I w

Re: Circular import problem

2013-04-11 Thread andres . osinski
ry de Movistar (http://www.movistar.com.ar) -Original Message- From: bubu...@gmail.com Sender: django-users@googlegroups.com Date: Thu, 11 Apr 2013 11:08:26 To: Reply-To: django-users@googlegroups.com Subject: Circular import problem Hi all, I have a util file, which will do some stuff

Circular import problem

2013-04-11 Thread bubufff
import problem. Therefore, what is the best practices in this situation ? -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@google

Re: import problem

2012-02-17 Thread Furbee
Good point, Dennis. I use Apache2, and any time I modify .py files, I need to restart the Apache2 daemon. I wish I didn't have to, but the environment needs to be flushed. Luckily, it doesn't kill the sessions or anything like, say ColdFusion when it restarts. I was wondering if there was something

Re: import problem

2012-02-16 Thread Scott Macri
WEIRD. There must have been something messed up in my environment. I closed IDLE, deleted the dosomething.pyc file and reran the code. It seems to be working now. I didn't make any code changes so maybe something was in memory, who knows. I tried deleting the pyc file before and it didn't do a

Re: import problem

2012-02-16 Thread Furbee
He said he would do that later tonight. Furbee On Thu, Feb 16, 2012 at 2:04 PM, Dennis Lee Bieber wrote: > On Thu, 16 Feb 2012 13:41:32 -0500, Scott Macri > wrote: > > >I don't believe I have any circular imports in my code. I have a > >simple file dosomething.py, with a simple class containin

Re: import problem

2012-02-16 Thread Scott Macri
I don't believe I have any circular imports in my code. I have a simple file dosomething.py, with a simple class containing a simple function. dosomething.py def somefunction(some_date) At the tope of dosomething I have: import datetime in the somefunction def I have: start_date = datetime.date

Re: import problem

2012-02-16 Thread DrBloodmoney
On Thu, Feb 16, 2012 at 9:20 AM, Scott Macri wrote: > DrBloodmoney I not sure what you mean by circular imports.  datetime > is the only import I have in this file. Here are examples of circular import problems [1][2] I am forever getting bitten by them, so it's become one of the first things th

Re: import problem

2012-02-16 Thread scott macri
DrBloodmoney I not sure what you mean by circular imports. datetime is the only import I have in this file. Yes Furbeenator it is a 'datetime' is not defined error. I'll post the entire error message tonight when I get home. My website directory is mn and my app directory is hcp. I'm trying to

Re: import problem

2012-02-16 Thread Scott Macri
Oh, the other thing is that if I run the exact same code in my idle shell within the hcp app all the imports work fine. On Thu, Feb 16, 2012 at 9:20 AM, Scott Macri wrote: > DrBloodmoney I not sure what you mean by circular imports.  datetime > is the only import I have in this file. > > Yes Furb

Re: import problem

2012-02-16 Thread Scott Macri
DrBloodmoney I not sure what you mean by circular imports. datetime is the only import I have in this file. Yes Furbeenator it is a 'datetime' is not defined error. I'll post the entire error message tonight when I get home. My website directory is mn and my app directory is hcp. I'm trying to

Re: import problem

2012-02-15 Thread Furbee
Can you reply with the actual NameError Exception? Like: NameError: globalname 'datetime' is not defined, or whatever it is. From the module that is throwing this error are you importing anything else that is importing an overridden date method or datetime object? You can also try this (instead of

Re: import problem

2012-02-15 Thread DrBloodmoney
On Wed, Feb 15, 2012 at 10:48 PM, Scott wrote: > Hello, > I'm having a strange issue and have already spent an hour trying to > figure it out. > > I created a python app called mn.  Then I setup all my models and > stuff to work under mn.hcp.  Everything has been working fine until I > tried to us

import problem

2012-02-15 Thread Scott
Hello, I'm having a strange issue and have already spent an hour trying to figure it out. I created a python app called mn. Then I setup all my models and stuff to work under mn.hcp. Everything has been working fine until I tried to use date time in a py file in the hcp directory. I've imported

Re: Import problem

2011-08-21 Thread Jim
You are right, SleepyCal. I changed global to something else, and the import issue was solved. -- 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/-/ElDTlCgIITMJ

Re: Import problem

2011-08-21 Thread Cal Leeming [Simplicity Media Ltd]
I could be wrong but ,i dont think the word 'global' is allowed anywhere in a file name ,import reference, class name etc.. i could be wrong tho. Try with global2 ?? On Aug 21, 2011 2:10 PM, "Jim" wrote: > Hello folks, > > I am new to both Python and Django. And the story is a little long. So, > p

Import problem

2011-08-21 Thread Jim
Hello folks, I am new to both Python and Django. And the story is a little long. So, please bear with me. Recently I created a site named djangoSite to practice the Django framework. The first thing I want to do is to create a SQLite database to hold global data of the site. As simple as it s

Re: Import problem: app name cannot be the same as project name?

2011-01-22 Thread bruno desthuilliers
On 21 jan, 21:36, Edwin wrote: > I have an app that's called the same way as my project name Won't work. (let's > name it 'blog'). My directory structure is: > > blog >    apps >       blog >           models.py >       books >           management >           models.py > > Everything works f

Import problem: app name cannot be the same as project name?

2011-01-21 Thread Edwin
I have an app that's called the same way as my project name (let's name it 'blog'). My directory structure is: blog apps blog models.py books management models.py Everything works fine except that when i created a custom command inside another app, ca

Re: Import problem on the attempt to use {% url %}

2010-01-22 Thread Felipe
Thanks a lot Karen Tracey. You've solved my problem. Felipe. On 22 jan, 01:13, Karen Tracey wrote: > On Thu, Jan 21, 2010 at 9:28 PM, Felipe wrote: > > Hello Friends, > > > Someone here know what this error mean? > > >http://www.catojo.com.br/contact/ > > > This generally happens when I try t

Re: Import problem on the attempt to use {% url %}

2010-01-21 Thread Karen Tracey
On Thu, Jan 21, 2010 at 9:28 PM, Felipe wrote: > Hello Friends, > > Someone here know what this error mean? > > http://www.catojo.com.br/contact/ > > This generally happens when I try to use something like {% url %} tag. > > But I've been ensured that the view 'home.views' exists and it is > plac

Import problem on the attempt to use {% url %}

2010-01-21 Thread Felipe
Hello Friends, Someone here know what this error mean? http://www.catojo.com.br/contact/ This generally happens when I try to use something like {% url %} tag. But I've been ensured that the view 'home.views' exists and it is placed in blog.home.views directory, however, by some unknown issue t

Re: import problem

2009-08-09 Thread Léon Dignòn
Thank you all! :) On Aug 9, 9:35 pm, "J. Cliff Dyer" wrote: > On Sun, 2009-08-09 at 11:59 -0700, Léon Dignòn wrote: > > In my myproject/urls.py I want to pass the class to a function. > > Because my urls.py is full of imports, I do not want another import > > line for this class I only use at on

Re: import problem

2009-08-09 Thread J. Cliff Dyer
On Sun, 2009-08-09 at 11:59 -0700, Léon Dignòn wrote: > In my myproject/urls.py I want to pass the class to a function. > Because my urls.py is full of imports, I do not want another import > line for this class I only use at one line, because it's easier to > read. > > I wonder that I have to im

Re: import problem

2009-08-09 Thread Daniel Roseman
On Aug 9, 7:59 pm, Léon Dignòn wrote: > In my myproject/urls.py I want to pass the class to a function. > Because my urls.py is full of imports, I do not want another import > line for this class I only use at one line, because it's easier to > read. > > I wonder that I have to import myproject w

Re: import problem

2009-08-09 Thread Léon Dignòn
In my myproject/urls.py I want to pass the class to a function. Because my urls.py is full of imports, I do not want another import line for this class I only use at one line, because it's easier to read. I wonder that I have to import myproject when I reference a model class in an app which _is_

Re: import problem

2009-08-09 Thread Daniel Roseman
On Aug 9, 7:34 pm, Léon Dignòn wrote: > Hello, > > some times I'd like not to import a class but just write it down. > > Instead of > from myproject.myapp.models import MyModel > > I'd like to use > myproject.myapp.models.MyModel > > But I get a NameError: name 'myproject' is not defined > > Also

import problem

2009-08-09 Thread Léon Dignòn
Hello, some times I'd like not to import a class but just write it down. Instead of from myproject.myapp.models import MyModel I'd like to use myproject.myapp.models.MyModel But I get a NameError: name 'myproject' is not defined Also myapp.models.MyModel raises a NameError: name 'myapp' is no

Re: import problem

2007-05-01 Thread Michael K
On Apr 29, 6:37 pm, kamil <[EMAIL PROTECTED]> wrote: > Hi Michael. You are right there was module named utils (coincidentally > same name as django module) in the nesh thumbnail app. > Problem resolved :) > Thank You Very Much for the time You dedicate me. > I feel in debt with U and I feel real

Re: import problem

2007-04-29 Thread kamil
Hi Michael. You are right there was module named utils (coincidentally same name as django module) in the nesh thumbnail app. Problem resolved :) Thank You Very Much for the time You dedicate me. I feel in debt with U and I feel really happy to feel such a feedback in django community. On Apr 25,

Re: import problem

2007-04-25 Thread Michael K
On Apr 24, 4:19 pm, kamil <[EMAIL PROTECTED]> wrote: > Thanx Michael for your attention. > I'm using todays build from svn trunk. > I started project from the beginning to eliminate possibility that its > something wrong with my code. > > when I run "python manage.py runserver" everything seams O

Re: import problem

2007-04-24 Thread kamil
Thanx Michael for your attention. I'm using todays build from svn trunk. I started project from the beginning to eliminate possibility that its something wrong with my code. when I run "python manage.py runserver" everything seams OK. when I hit any page I got error I mentioned Yes I'm runnung it

Re: import problem

2007-04-24 Thread Michael K
On Apr 24, 5:41 am, kamil <[EMAIL PROTECTED]> wrote: > Hi. I'm using developement built-in django server. > Python 2.5.1c1 (release25-maint, Apr 12 2007, 21:00:25) [GCC 4.1.2 > (Ubuntu 4.1.2-0ubuntu4)] on linux2 > on fresh Kubuntu Feisty (7.04) > Kamil, I'm assuming you're just running "python

Re: import problem

2007-04-24 Thread kamil
Hi. I'm using developement built-in django server. Python 2.5.1c1 (release25-maint, Apr 12 2007, 21:00:25) [GCC 4.1.2 (Ubuntu 4.1.2-0ubuntu4)] on linux2 on fresh Kubuntu Feisty (7.04) On Apr 23, 4:01 pm, Michael K <[EMAIL PROTECTED]> wrote: > On Apr 22, 4:38 pm, kamil <[EMAIL PROTECTED]> wrote: >

Re: import problem

2007-04-23 Thread Michael K
On Apr 22, 4:38 pm, kamil <[EMAIL PROTECTED]> wrote: > Hi. I installed Django on Python 2.5 > and I receive following error on the built in server: > > Exception Type: ImportError > Exception Value:No module named utils.text > Exception Location: /usr/lib/python2.5/site-package

import problem

2007-04-22 Thread kamil
Hi. I installed Django on Python 2.5 and I receive following error on the built in server: Exception Type: ImportError Exception Value:No module named utils.text Exception Location: /usr/lib/python2.5/site-packages/django/core/ urlresolvers.py in _get_urlconf_module, line 178

weird import problem

2006-11-17 Thread [EMAIL PROTECTED]
I'm attempting to install the nesh.thumbnails app for images with thumbnails. In my model, I put from nesh.thumbnail import ImageWithThumbnailField but that fails unless I drill down a layer deeper and put from nesh.thumbnail.field import ImageWithThumbnailField which then fails when it tries t

django/mod_python/apache import problem

2006-03-22 Thread abe
hi, I'm having trouble getting django to work together with apache an mod_python if I try to access the admin page through my browser it displas the following message Mod_python error: "PythonHandler django.core.handlers.modpython" Traceback (most recent call last): File "/usr/lib/python