Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

specify mysite.books.models instead of just books.models #23

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
4 participants

nicboul commented Dec 16, 2012

No description provided.

lfolco commented Feb 14, 2013

hi-

when i've been going through it, using mysite.books.models resulted in an error. my directory structure is as follows. i followed the instructions pretty clearly. i'm using version django version 1.4

mysite
    - books
       - __init__.py
       - admin.py
       - models.py
       - tests.py
       - views.py
    - mysite
       - __init__.py
       - settings.py
       - urls.py
       - views.py
       - wsgi.py
    - templates
       - books
           - search_form.html
           - search_results.html
       - base.html
       - current_datetime.html
       - display_meta.html
       - hours_ahead.html
    - manage.py

is that how you have your directory setup? i'm not sure if i'm doing this wrong :)

Hello Laura:
Thanks for your query. Please post the error you are getting so that we can
get debug it.

Also your directory structures seems cluttered,
mysite
mysite

  • init.py
  • settings.py
  • urls.py
  • wsgi.py
  • templates
    books
    • init.py
    • admin.py
    • models.py
    • tests.py
    • views.py
      templates
    • search_form.html
    • search_results.html
    • base.html
    • current_datetime.html
    • display_meta.html
    • hours_ahead.html
      manage.py

'mysite.books.models' is referencing a directory structure with mysite at
the top tier(representing the project), books second line(the books app)
and the models file next. It could be that the model file is inaccessible
give the structure you have, so I advise you restructure your files to
match what I have showed you up here.

Hope that clears you up, let me know how it goes.

Al
On Thursday, February 14, 2013, Laura Folco wrote:

hi-

when i've been going through it, using mysite.books.models resulted in an
error. my directory structure is as follows. i followed the instructions
pretty clearly. i'm using version django version 1.4

mysite

  • books
  • init.py
  • admin.py
  • models.py
  • tests.py
  • views.py
  • mysite
  • init.py
  • settings.py
  • urls.py
  • views.py
  • wsgi.py
  • templates
  • books
  • search_form.html
  • search_results.html
  • base.html
  • current_datetime.html
  • display_meta.html
  • hours_ahead.html
  • manage.py

is that how you have your directory setup? i'm not sure if i'm doing this
wrong :)


Reply to this email directly or view it on GitHubhttps://github.com/jacobian/djangobook.com/pull/23#issuecomment-13570786.

Sorry here is a better arrangement. Check if your structure aligns.

mysite
mysite

  • init.py
  • settings.py
  • urls.py
  • wsgi.py
  • templates
    books
    • init.py
    • admin.py
    • models.py
    • tests.py
    • views.py
      templates
    • search_form.html
    • search_results.html
    • base.html
    • current_datetime.html
    • display_meta.html
    • hours_ahead.html
      manage.py

On Friday, February 15, 2013, Alvin Kato wrote:

Hello Laura:
Thanks for your query. Please post the error you are getting so that we
can get debug it.

Also your directory structures seems cluttered,
mysite
mysite

  • init.py
  • settings.py
  • urls.py
  • wsgi.py
  • templates
    books
    • init.py
    • admin.py
    • models.py
    • tests.py
    • views.py
      templates
    • search_form.html
    • search_results.html
    • base.html
    • current_datetime.html
    • display_meta.html
    • hours_ahead.html
      manage.py

'mysite.books.models' is referencing a directory structure with mysite at
the top tier(representing the project), books second line(the books app)
and the models file next. It could be that the model file is inaccessible
give the structure you have, so I advise you restructure your files to
match what I have showed you up here.

Hope that clears you up, let me know how it goes.

Al
On Thursday, February 14, 2013, Laura Folco wrote:

hi-

when i've been going through it, using mysite.books.models resulted in an
error. my directory structure is as follows. i followed the instructions
pretty clearly. i'm using version django version 1.4

mysite

  • books
  • init.py
  • admin.py
  • models.py
  • tests.py
  • views.py
  • mysite
  • init.py
  • settings.py
  • urls.py
  • views.py
  • wsgi.py
  • templates
  • books
  • search_form.html
  • search_results.html
  • base.html
  • current_datetime.html
  • display_meta.html
  • hours_ahead.html
  • manage.py

is that how you have your directory setup? i'm not sure if i'm doing this
wrong :)


Reply to this email directly or view it on GitHubhttps://github.com/jacobian/djangobook.com/pull/23#issuecomment-13570786.

Contributor

jacobian commented Apr 14, 2013

It should just be books.models. It's possible there's other things wrong that lead to that not working, but those should be fixed, not this.

@jacobian jacobian closed this Apr 14, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment