Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Got error while "Do usual Django-stuff" during setup. #2

Open
iamklang opened this issue Jul 18, 2013 · 0 comments
Open

Got error while "Do usual Django-stuff" during setup. #2

iamklang opened this issue Jul 18, 2013 · 0 comments

Comments

@iamklang
Copy link

Reproduce step:

  • We clone a nikolo-server project in our machine
  • We setup my nikola-server follow step in nikilo-server page on github
  • When we are doing with "usual Django-stuff" we got error below -:
nikola-server)juacompe@horus:~/projects/beachfrontclub/nikola-server/alva$ python manage.py syncdb --all
Saving all blogs
Traceback (most recent call last):
  File "manage.py", line 10, in <module>
    startup.run()
  File "/home/juacompe/projects/beachfrontclub/nikola-server/alva/alva/startup.py", line 5, in run
    for blog in models.Blog.objects.all():
  File "/home/juacompe/virtualenvs/nikola-server/local/lib/python2.7/site-packages/django/db/models/query.py", line 123, in _result_iter
    self._fill_cache()
  File "/home/juacompe/virtualenvs/nikola-server/local/lib/python2.7/site-packages/django/db/models/query.py", line 927, in _fill_cache
    self._result_cache.append(next(self._iter))
  File "/home/juacompe/virtualenvs/nikola-server/local/lib/python2.7/site-packages/django/db/models/query.py", line 301, in iterator
    for row in compiler.results_iter():
  File "/home/juacompe/virtualenvs/nikola-server/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 775, in results_iter
    for rows in self.execute_sql(MULTI):
  File "/home/juacompe/virtualenvs/nikola-server/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 840, in execute_sql
    cursor.execute(sql, params)
  File "/home/juacompe/virtualenvs/nikola-server/local/lib/python2.7/site-packages/django/db/backends/util.py", line 41, in execute
    return self.cursor.execute(sql, params)
  File "/home/juacompe/virtualenvs/nikola-server/local/lib/python2.7/site-packages/django/db/backends/sqlite3/base.py", line 366, in execute
    six.reraise(utils.DatabaseError, utils.DatabaseError(*tuple(e.args)), sys.exc_info()[2])
  File "/home/juacompe/virtualenvs/nikola-server/local/lib/python2.7/site-packages/django/db/backends/sqlite3/base.py", line 362, in execute
    return Database.Cursor.execute(self, query, params)
django.db.utils.DatabaseError: no such table: blogs_blog
  • Then we changed code in startup.py to below -:
    from blogs import models

    def run():
        print "Saving all blogs"
  • We run with "python manage.py syncdb --all" agian and it's work.
for blog in models.Blog.objects.all():
        print "=>", blog
        blog.save()

What are those line for ?

Should I send a pull request?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant