basxsoftwareassociation / basxconnect_demo Goto Github PK
View Code? Open in Web Editor NEWsample project with basxconnect
License: BSD 3-Clause "New" or "Revised" License
sample project with basxconnect
License: BSD 3-Clause "New" or "Revised" License
@saemideluxe said:
In order to have features available which are scheduled or task based, a celery worker needs to be started in addition:
celery -A celery_config worker
Since celery is a dependency, it should be available after pip install -r requirements.txt.
And for the backend queue-system rabbitmq needs to installed and running (e.g. with apt install rabbitmq-server)
this works fine with sqlite.
This used to work also for mysql, until the new table core_vocabulary
got introduced, I think.
But now if I configure my installation to work with mysql, then I get this error on the initial python manage.py migrate
:
[00:04:05] Traceback (most recent call last):
[00:04:05] File "/home/django/basxconnect_demo/.venv/lib/python3.9/site-packages/django/db/backends/utils.py", line 84, in _execute
[00:04:05] return self.cursor.execute(sql, params)
[00:04:05] File "/home/django/basxconnect_demo/.venv/lib/python3.9/site-packages/django/db/backends/mysql/base.py", line 73, in execute
[00:04:05] return self.cursor.execute(query, args)
[00:04:05] File "/home/django/basxconnect_demo/.venv/lib/python3.9/site-packages/MySQLdb/cursors.py", line 206, in execute
[00:04:05] res = self._query(query)
[00:04:05] File "/home/django/basxconnect_demo/.venv/lib/python3.9/site-packages/MySQLdb/cursors.py", line 319, in _query
[00:04:05] db.query(q)
[00:04:05] File "/home/django/basxconnect_demo/.venv/lib/python3.9/site-packages/MySQLdb/connections.py", line 259, in query
[00:04:05] _mysql.connection.query(self, query)
[00:04:05] MySQLdb._exceptions.ProgrammingError: (1146, "Table 'basxconnect.core_vocabulary' doesn't exist")
[00:04:05]
[00:04:05] The above exception was the direct cause of the following exception:
[00:04:05]
[00:04:05] Traceback (most recent call last):
[00:04:05] File "/home/django/basxconnect_demo/manage.py", line 23, in <module>
[00:04:05] main()
[00:04:05] File "/home/django/basxconnect_demo/manage.py", line 19, in main
[00:04:05] execute_from_command_line(sys.argv)
[00:04:05] File "/home/django/basxconnect_demo/.venv/lib/python3.9/site-packages/django/core/management/__init__.py", line 419, in execute_from_command_line
[00:04:05] utility.execute()
[00:04:05] File "/home/django/basxconnect_demo/.venv/lib/python3.9/site-packages/django/core/management/__init__.py", line 395, in execute
[00:04:05] django.setup()
[00:04:05] File "/home/django/basxconnect_demo/.venv/lib/python3.9/site-packages/django/__init__.py", line 24, in setup
[00:04:05] apps.populate(settings.INSTALLED_APPS)
[00:04:05] File "/home/django/basxconnect_demo/.venv/lib/python3.9/site-packages/django/apps/registry.py", line 122, in populate
[00:04:05] app_config.ready()
[00:04:05] File "/home/django/basxconnect_demo/.venv/lib/python3.9/site-packages/basxconnect/core/apps.py", line 30, in ready
[00:04:05] Vocabulary.objects.get_or_create(slug=slug, defaults={"name": name})
[00:04:05] File "/home/django/basxconnect_demo/.venv/lib/python3.9/site-packages/django/db/models/manager.py", line 85, in manager_method
[00:04:05] return getattr(self.get_queryset(), name)(*args, **kwargs)
[00:04:05] File "/home/django/basxconnect_demo/.venv/lib/python3.9/site-packages/django/db/models/query.py", line 581, in get_or_create
[00:04:05] return self.get(**kwargs), False
[00:04:05] File "/home/django/basxconnect_demo/.venv/lib/python3.9/site-packages/django/db/models/query.py", line 431, in get
[00:04:05] num = len(clone)
[00:04:05] File "/home/django/basxconnect_demo/.venv/lib/python3.9/site-packages/django/db/models/query.py", line 262, in __len__
[00:04:05] self._fetch_all()
[00:04:05] File "/home/django/basxconnect_demo/.venv/lib/python3.9/site-packages/django/db/models/query.py", line 1324, in _fetch_all
[00:04:05] self._result_cache = list(self._iterable_class(self))
[00:04:05] File "/home/django/basxconnect_demo/.venv/lib/python3.9/site-packages/django/db/models/query.py", line 51, in __iter__
[00:04:05] results = compiler.execute_sql(chunked_fetch=self.chunked_fetch, chunk_size=self.chunk_size)
[00:04:05] File "/home/django/basxconnect_demo/.venv/lib/python3.9/site-packages/django/db/models/sql/compiler.py", line 1175, in execute_sql
[00:04:05] cursor.execute(sql, params)
[00:04:05] File "/home/django/basxconnect_demo/.venv/lib/python3.9/site-packages/django/db/backends/utils.py", line 98, in execute
[00:04:05] return super().execute(sql, params)
[00:04:05] File "/home/django/basxconnect_demo/.venv/lib/python3.9/site-packages/django/db/backends/utils.py", line 66, in execute
[00:04:05] return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
[00:04:05] File "/home/django/basxconnect_demo/.venv/lib/python3.9/site-packages/django/db/backends/utils.py", line 75, in _execute_with_wrappers
[00:04:05] return executor(sql, params, many, context)
[00:04:05] File "/home/django/basxconnect_demo/.venv/lib/python3.9/site-packages/django/db/backends/utils.py", line 84, in _execute
[00:04:05] return self.cursor.execute(sql, params)
[00:04:05] File "/home/django/basxconnect_demo/.venv/lib/python3.9/site-packages/django/db/utils.py", line 90, in __exit__
[00:04:05] raise dj_exc_value.with_traceback(traceback) from exc_value
[00:04:05] File "/home/django/basxconnect_demo/.venv/lib/python3.9/site-packages/django/db/backends/utils.py", line 84, in _execute
[00:04:05] return self.cursor.execute(sql, params)
[00:04:05] File "/home/django/basxconnect_demo/.venv/lib/python3.9/site-packages/django/db/backends/mysql/base.py", line 73, in execute
[00:04:05] return self.cursor.execute(query, args)
[00:04:05] File "/home/django/basxconnect_demo/.venv/lib/python3.9/site-packages/MySQLdb/cursors.py", line 206, in execute
[00:04:05] res = self._query(query)
[00:04:05] File "/home/django/basxconnect_demo/.venv/lib/python3.9/site-packages/MySQLdb/cursors.py", line 319, in _query
[00:04:05] db.query(q)
[00:04:05] File "/home/django/basxconnect_demo/.venv/lib/python3.9/site-packages/MySQLdb/connections.py", line 259, in query
[00:04:05] _mysql.connection.query(self, query)
[00:04:05] django.db.utils.ProgrammingError: (1146, "Table 'basxconnect.core_vocabulary' doesn't exist")
see https://lbs.solidcharity.com/logs/basx/basxconnect/basxconnect-test/main/debian/bullseye/amd64/70 for the full log.
see https://github.com/basxsoftwareassociation/getbasxconnect/blob/main/getbasxconnect.sh#L189 how I configure mysql:
I have a basxconnect_demo/settings/local.py with this content:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'OPTIONS': {
'read_default_file': '/home/django/my.cnf',
},
}
}
once the python packages bread, htmlgenerator and basxconnect get more stable, we should just reference basxconnect without git repositories in requirements.txt.
old pip says:
WARNING: You are using pip version 20.2.4; however, version 21.3.1 is available.
You should consider upgrading via the '/home/django/basxconnect_demo/.venv/bin/python3 -m pip install --upgrade pip' command.
We recommend you use --use-feature=2020-resolver to test your packages with the new resolver before it becomes the default.
django-celery-beat 2.2.1 requires Django<4.0,>=2.2, but you'll have django 4.0 which is incompatible.
And fails because of this:
File "/home/django/basxconnect_demo/.venv/lib64/python3.9/site-packages/haystack/admin.py", line 7, in <module>
from django.utils.translation import ungettext
ImportError: cannot import name 'ungettext' from 'django.utils.translation' (/home/django/basxconnect_demo/.venv/lib64/python3.9/site-packages/django/utils/translation/__init__.py)
Solution: upgrade pip
That will lead to Django 3.2 being installed, until Django 4 is ready with all dependancies.
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.