On Sep 8, 6:13 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote:
> On Mon, Sep 8, 2008 at 6:06 PM, KillaBee <
>
>
>
> [EMAIL PROTECTED]> wrote:
> > On Sep 8, 3:26 pm, Daniel Roseman <[EMAIL PROTECTED]>
> > wrote:
> > > On Sep 8, 9:16 pm, KillaBee <[EMAIL PROTECTED]>
> > > wrote:
>
> > > > I keep getting this error on this view named timesheets, the code
> > > > looks like this.
>
> > > <snip tons of irrelevant code>
>
> > > > ViewDoesNotExist: Could not import intraweb.apps.timesheets.views.
> > > > Error was: cannot import name entrys
>
> > > The traceback quite clearly states that the error is in
> > > timesheets.views, but you've just given us timesheets.models. In your
> > > views.py you're obviously doing something like from
> > > intraweb.apps.timesheets.models import entrys, but there's no such
> > > model - there is only one called Entry. So import that instead.
> > > --
> > > DR.
> > yes I am doing that , but how do you do just import the entry and
> > JobPosition?
>
> [Please consider posting huge chunks of code on someplace like
> dpaste.cominstead of inline in the mail.  Most mail clients mangle
> code beyond
> recognition.]
>
>
>
> > [snip]
> > from intraweb.apps.timesheets.models.timesheets import entrys
> > from intraweb.apps.timesheets.models.timesheets import jobpositions
>
> You need to change these import lines to import Entry and JobPosition.
> Then, you need to change the code within the views that uses entrys and
> jobpositions to use the new names, and to use only 1.0 features ... a brief
> look at it shows it is using things like Manipulators, which no longer exist
> in 1.0.  I don't know what else it might be using that is no longer there,
> but that's one big thing you're going to have to fix.
>
> Karen

Thanks that is what is happening, this line is wrong.
from intraweb.apps.timesheets.models.timesheets import Entry

intraweb is the project
apps is the app
timesheets is a folder
models is a folder
timesheets is the file
Entry is the class i am tring to import
is this right?
--------------------------------------------------------------------------------
There is a timesheets.py at intraweb.apps.timesheets that has a line
in it that use Entry

def get_all_entrys(self):
    all=[]

    try:
      u = self.get_user()
      for d in self.get_all_dates():
        try:
          e = entrys.get_object(date__exact=d,
user__username__exact=self.username)
        except entrys.EntryDoesNotExist:
          e = Entry(user=u, date=d)
#??????????????????????????????????????????????

        all.append(e)
    except users.UserDoesNotExist:
      print self.username

    return all

I tried to import Entry in by using this line:
from intraweb.apps.models.timesheets import Entry

Am I importing it right,
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to