GithubHelp home page GithubHelp logo

pigmonkey / django-vellum Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nathanborror/django-basic-apps

13.0 13.0 5.0 784 KB

A web log for Django.

License: BSD 3-Clause "New" or "Revised" License

Python 100.00%

django-vellum's People

Contributors

ericholscher avatar feuervogel avatar howiworkdaily avatar ipmb avatar jaredly avatar justquick avatar mcroydon avatar montylounge avatar myles avatar nathanborror avatar pigmonkey avatar tmc avatar toastdriven avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

django-vellum's Issues

One or more models did not validate

I installed the application.
After "manage.py syncdb" got error.

Error: One or more models did not validate:
vellum.post: 'tags' has an m2m relation with model <class 'taggit.models.Tag'>, which has either not been installed or is abstract.
vellum.post: 'tagged_items' has an m2m relation with model <class 'taggit.models.TaggedItem'>, which has either not been installed or is abstract.

manage.py syncdb command fails on empty database

I'm running django-vellum==1.4.2 (installed with pip) on both Django 1.4 and Django 1.5.
When I want to syncdb (or run any other manage.py command) from a clean install (empty database), I get an error message:

(mysite) /tmp/mysite/code $ python manage.py syncdb
DatabaseError: no such table: django_site
(mysite) /tmp/mysite/code $

This is on Django Django 1.5.4, but on Django 1.4.1 I get the full stack trace:

(mysite) /tmp/mysite/code $ python manage.py test vellum                                      
Traceback (most recent call last):
  File "manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "/tmp/mysite/lib/python2.7/site-packages/django/core/management/__init__.py", line 443, in execute_from_command_line
    utility.execute()
  File "/tmp/mysite/lib/python2.7/site-packages/django/core/management/__init__.py", line 382, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/tmp/mysite/lib/python2.7/site-packages/django/core/management/commands/test.py", line 49, in run_from_argv
    super(Command, self).run_from_argv(argv)
  File "/tmp/mysite/lib/python2.7/site-packages/django/core/management/base.py", line 196, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/tmp/mysite/lib/python2.7/site-packages/django/core/management/base.py", line 232, in execute
    output = self.handle(*args, **options)
  File "/tmp/mysite/lib/python2.7/site-packages/django/core/management/commands/test.py", line 72, in handle
    failures = test_runner.run_tests(test_labels)
  File "/tmp/mysite/lib/python2.7/site-packages/django/test/simple.py", line 380, in run_tests
    suite = self.build_suite(test_labels, extra_tests)
  File "/tmp/mysite/lib/python2.7/site-packages/django/test/simple.py", line 263, in build_suite
    app = get_app(label)
  File "/tmp/mysite/lib/python2.7/site-packages/django/db/models/loading.py", line 140, in get_app
    self._populate()
  File "/tmp/mysite/lib/python2.7/site-packages/django/db/models/loading.py", line 64, in _populate
    self.load_app(app_name, True)
  File "/tmp/mysite/lib/python2.7/site-packages/django/db/models/loading.py", line 88, in load_app
    models = import_module('.models', app_name)
  File "/tmp/mysite/lib/python2.7/site-packages/django/utils/importlib.py", line 35, in import_module
    __import__(name)
  File "/tmp/mysite/lib/python2.7/site-packages/vellum/models.py", line 15, in <module>
    from vellum import settings
  File "/tmp/mysite/lib/python2.7/site-packages/vellum/settings.py", line 10, in <module>
    BLOG_NAME = getattr(settings, 'BLOG_NAME', Site.objects.get_current().name)
  File "/tmp/mysite/lib/python2.7/site-packages/django/contrib/sites/models.py", line 25, in get_current
    current_site = self.get(pk=sid)
  File "/tmp/mysite/lib/python2.7/site-packages/django/db/models/manager.py", line 131, in get
    return self.get_query_set().get(*args, **kwargs)
  File "/tmp/mysite/lib/python2.7/site-packages/django/db/models/query.py", line 361, in get
    num = len(clone)
  File "/tmp/mysite/lib/python2.7/site-packages/django/db/models/query.py", line 85, in __len__
    self._result_cache = list(self.iterator())
  File "/tmp/mysite/lib/python2.7/site-packages/django/db/models/query.py", line 291, in iterator
    for row in compiler.results_iter():
  File "/tmp/mysite/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 763, in results_iter
    for rows in self.execute_sql(MULTI):
  File "/tmp/mysite/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 818, in execute_sql
    cursor.execute(sql, params)
  File "/tmp/mysite/lib/python2.7/site-packages/django/db/backends/sqlite3/base.py", line 337, in execute
    return Database.Cursor.execute(self, query, params)
django.db.utils.DatabaseError: no such table: django_site
(mysite) /tmp/mysite/code $

The funny thing is that I get this message even with the BLOG_NAME setting setup. So it means the default value of the expression getattr(settings, 'BLOG_NAME', Site.objects.get_current().name) allways gets evaluated :S
Replacing the getattr by a try/except (ValueError) clause should solve the issue.

Broken tests because of NoReverseMatch urls

Is it me or all vellum tests are broken?
It seems the url names were updated from blog_* to vellum_* in the urls.py but not in tests.
Therefore I get a lot of NoReverseMatch when running tests after a clean clone.
This is a simple fix.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.