pigmonkey / django-vellum Goto Github PK
View Code? Open in Web Editor NEWThis project forked from nathanborror/django-basic-apps
A web log for Django.
License: BSD 3-Clause "New" or "Revised" License
This project forked from nathanborror/django-basic-apps
A web log for Django.
License: BSD 3-Clause "New" or "Revised" License
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.
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.
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.