Django LDP Like
Context
The goal of this repository is to make available to all of our models a Like feature, covering the like action, dislike action, and count of both use cases.
The like Model will be related to an IDURLField targetting users/ so that we will be able to relate the users and their likes in a distributed world.
Would ideally be implemented in a way which makes it compatible with the ActivityPub Like Activity
Add your package in settings.py of the app. Now, you can test if your package is imported propefully by doing a
python manage.py shell then
from djangoldp_myawesomepackage.models import ExampleModel
If, no error, it's working.
Planning
- Make it work:
Being able to post a like, a dislike. Being able to retrieve the count of likes and dislikes for a given resource Being able to do that on the federation instance bearing the current user identity
- Make it clean
Test it in the context of the federation Ensure we stay compliant with the activityPub specification
CICD
When you're ready to publish your app :
-
Add the
sib-deployuser as amaintainerto the project (Settings > Members) -
Configure
pipeline strategytoclone(Settings > CI/CD > Pipelines) -
Protect the
masterbranch allowing onlymaintainersto push (Settings > Repository > Protected branches) -
Configure CI/CD variables to authenticate on pypi.org:
| Variable | Value | Protection |
|---|---|---|
GL_TOKEN |
sib-deploy-token |
protected |
PYPI_PASSWORD |
pypi-password |
protected |
PYPI_USERNAME |
startinblox | protected |
- Replace the "do_not_publish" by "master" in the .gitlab-ci.yml
Factories
If you dont need factory, you can remove the mock_example command, the factories files and the extras_require section in setup.cfg
Provide a factory is a good pratice in order to simplify the mocking of data on a server / in a test pipeline.
Metadata
Release files for djangoldp-like 0.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| djangoldp_like-0.0.3.tar.gz | 3.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| djangoldp_like-0.0.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 9.4 kB
Release files / djangoldp_like-0.0.3.tar.gz
| Download URL | djangoldp_like-0.0.3.tar.gz |
|---|---|
| Size | 3.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e52544ef40cde7af778d74870d9cc3b65d49c66886486a468c732cd2df29e58e
|
|
BLAKE2b-256 checksum How to use checksums |
fad3ed317e2b47cd41fc1493a773c635801e7daa0b5bd30b4561dad004e1832e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.15.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.6.10
|
Release files / djangoldp_like-0.0.3-py3-none-any.whl
| Download URL | djangoldp_like-0.0.3-py3-none-any.whl |
|---|---|
| Size | 5.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4b7e1364da294b756f49b0b2eede89265aca5972ec6efd192e0ab9ed6175fea6
|
|
BLAKE2b-256 checksum How to use checksums |
b16a4b343cc81bd5d6564fefbea8d3f89810e266285b68cc4dcdc79d6f66a0d7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.15.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.6.10
|