https://github.com/ujblockchain/sarchiweb
Official Website for South Africa-Switzerland Bilateral Research Chair in Blockchain Technology (UJ Blockchain) which aims to explore blockchain integrations with real-world applications and development.
https://github.com/ujblockchain/sarchiweb
agri-food blockchain blockchain-technology dapps-development django hedera hedera-hashgraph jinja2 web3 web3-dapp
Last synced: 2 months ago
JSON representation
Official Website for South Africa-Switzerland Bilateral Research Chair in Blockchain Technology (UJ Blockchain) which aims to explore blockchain integrations with real-world applications and development.
- Host: GitHub
- URL: https://github.com/ujblockchain/sarchiweb
- Owner: ujblockchain
- License: other
- Created: 2023-08-08T15:06:40.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2025-02-11T18:36:49.000Z (4 months ago)
- Last Synced: 2025-03-25T11:52:29.347Z (3 months ago)
- Topics: agri-food, blockchain, blockchain-technology, dapps-development, django, hedera, hedera-hashgraph, jinja2, web3, web3-dapp
- Language: HTML
- Homepage: https://blockchain.uj.ac.za
- Size: 24.4 MB
- Stars: 6
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
.. figure:: https://blockchain.uj.ac.za/static/images/logo.png
:align: center=========
SARChI
=========South Africa-Switzerland Bilateral Research Chair in Blockchain Technology (UJ Blockchain)
aims to explore blockchain integrations with real-world applications and development in Agric food.==========
Setup
==========Set environment variable for Django Secret Key, Debug, Allowed Host, and Admin Path.
Also add configuration for Database, Django Axes and Email with SMTP Host... code-block:: bash
SECRET_KEY = '...'
DEBUG = ...
ALLOWED_HOSTS = '...'
ADMIN_PATH = '...'ENGINE = '...'
NAME = '...'
HOST = '...'
USER = '...'
PASSWORD = '...'
PORT = '...'SILENCED_SYSTEM_CHECKS = '...'
AXES_FAILURE_LIMIT = '...'
AXES_COOLOFF_TIME = '...'
AXES_ONLY_ADMIN_SITE = '...'
AXES_LOCKOUT_TEMPLATE = '...'
AXES_LOCKOUT_URL = '...'
AXES_USERNAME_FORM_FIELD = '...'
AXES_RESET_ON_SUCCESS = '...'
AXES_NEVER_LOCKOUT_WHITELIST = '...'
AXES_IP_WHITELIST = '...'
AXES_ENABLE_ACCESS_FAILURE_LOG = '...'
AXES_RESET_ON_SUCCESS = '...'
AXES_LOCKOUT_PARAMETERS = '...'EMAIL_BACKEND = '...'
EMAIL_PORT = '...'
EMAIL_HOST = '...'
EMAIL_HOST_USER = '...'
EMAIL_HOST_PASSWORD = '...'
DEFAULT_FROM_EMAIL = '...'
SERVER_EMAIL = '...'
EMAIL_SUBJECT_PREFIX = '...'
EMAIL_USE_TSL = '...'Recaptcha Setup
----------------Set *Google Recaptcha* public and private key in environment variables.
Public and private key can be gotten from *https://developers.google.com/recaptcha/*.
Ensure you use :emphasis:`reCAPTCHA v3`... code-block:: bash
RECAPTCHA_PUBLIC_KEY = '...'
RECAPTCHA_PRIVATE_KEY = '...'
RECAPTCHA_REQUIRED_SCORE = ...Huey Setup
---------------Setup huey distributed task processing using *greenlet* worker type.
For greenlet to work, you need to setup a monkey patch that serves as a custom bootstrap script... code-block:: bash
HUEY = {
'huey_class': 'huey.RedisHuey', # Huey implementation to use.
'name': config('NAME'), # Use db name for huey.
'results': True, # Store return values of tasks.
'store_none': False, # If a task returns None, do not save to results.
'immediate': False,
'utc': True, # Use UTC for all times internally.
'blocking': True, # Perform blocking pop rather than poll Redis.
'connection': {
'host': 'localhost',
'port': 6379,
'db': 0,
'connection_pool': None, # Definitely you should use pooling!
# ... tons of other options, see redis-py for details.# huey-specific connection parameters.
'read_timeout': 1, # If not polling (blocking pop), use timeout.
'url': None, # Allow Redis config via a DSN.
},
'consumer': {
'workers': 1,
'worker_type': 'thread',
'initial_delay': 0.1, # Smallest polling interval, same as -d.
'backoff': 1.15, # Exponential backoff using this rate, -b.
'max_delay': 10.0, # Max possible polling interval, -m.
'scheduler_interval': 1, # Check schedule every second, -s.
'periodic': True, # Enable crontab feature.
'check_worker_health': True, # Enable worker health checks.
'health_check_interval': 1, # Check worker health every second.
},
}Running Project
----------------Setup
^^^^^^^^^^^.. code-block:: bash
make setup
create Superuser
^^^^^^^^^^^^^^^^^^.. code-block:: bash
make superuser
Run Server
^^^^^^^^^^^
.. code-block:: bashmake runserver
Start Background Task
^^^^^^^^^^^^^^^^^^^^^^There is need for a background task using huey to send emails to users.
.. code-block:: bash
make huey
Running Test With Coverage
^^^^^^^^^^^^^^^^^^^^^^^^^^^.. code-block:: bash
make run-coverage