Commit 56da96f7 authored by Benoit Alessandroni's avatar Benoit Alessandroni

Fixing some references and adding stuff in README

parent 253e788b
# Django LDP example
# Django LDP Like
## Step by step quickstart
## Context
1. Installation
- `git clone /path/to/myawesomepackage`
- `git remote set-url origin the_repository_url`
- rename djangoldp_example directory to djangoldp_myawesomepackage
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.
- replace /path/to/myawesomepackage with the local path of your package.
- replace the_repository_url with the git url of your package (example:
- replace djangoldp_myawesomepackage with your package name. Please respect the naming convention (singular word, starting by `djangoldp_`)
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.
2. Developpement environnement
In order to test and developp your package, you need to put the package src directory at the same level of a working django ldp app. By exemple, you can clone the sib app data server
`git clone server /path/to/app`
- The classical way :
`ln -s /path/to/myawesomepackage/djangoldp_myawesomepackage /path/to/app/djangoldp_myawesomepackage`
- The docker way : in the *volumes* section, add a line in docker-compose.override.yml. Example
- ./:/app
- /path/to/myawesomepackage/djangoldp_myawesomepackage:/app/djangoldp_myawesomepackage
Would ideally be implemented in a way which makes it compatible with the [ActivityPub Like Activity](
Add your package in of the app. Now, you can test if your package is imported propefully by doing a
`python shell` then
......@@ -33,16 +14,20 @@ from djangoldp_myawesomepackage.models import ExampleModel
If, no error, it's working.
3. Customization
- `setup.cfg` : please, fill the name, version, url, author_email, description
- `djangoldp_example/`: fill the name, don't touch the version number !
- everything under the djangoldp_example is part of your package, you probably would replace "example" by your package name.
## Planning
1. 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
4. Push on the repository you've created
2. Make it clean
## Notes
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 :
1. Add the `sib-deploy` user as a `maintainer` to the project (`Settings > Members`)
from import BaseCommand, CommandError
from djangoldp_example.factories import ExampleFactory
from djangoldp_like.factories import ExampleFactory
class Command(BaseCommand):
help = 'Mock data'
name = djangoldp_example
version = attr: djangoldp_example.__version__
url =
name = djangoldp_like
version = attr: djangoldp_like.__version__
url =
author = Startin'blox
author_email =
description = djangoldp example package
author_email =
description = DjangoLDP Like package
license = MIT
......@@ -18,5 +18,5 @@ dev =
version_source = tag
version_variable = djangoldp_example/
version_variable = djangoldp_like/
commit_parser = commit_parser.parse
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment