The system allows individual users to form communities, create groups, participate in various activities defined in the community/group, and thus, enhance its value for the society in terms of education.
- Python 3.6
- Django 1.11.7
- MySQL Server
- Django REST Framework
- django-role-permissions 2.1.0
- python-decouple 3.1
- PyEtherpad Lite
- social-auth-app-django 2.1.0
- django-comments-xtd 2.0.9
- django-contrib-comments 1.8.0
- django-machina 0.6.0
- django-reversion 2.0.10
- django-reversion-compare 0.8.1
- django-mptt 0.8.7
- django-notifications-hq 1.4.0
- django-activity-stream 0.6.5
- django-jsonfield 1.0.1
- django-widget-tweaks 1.4.1
- django-cors-headers 2.1.0
- Django Wiki 0.3.1
- Gunicorn
- Oauthlib
- Pillow
- Requests
- Elasticsearch
- Celery
- RabbitMQ
For three Step Installation use Docker: Install
To set-up event logging for this system, please refer to the installation steps given in the repository link given below: https://github.com/fresearchgroup/Collaboration-System-Event-Logs
To create and edit interactive content (H5P) and to enable real-time collaborative editing of articles, please refer to the installation steps given in the repository link given below: https://github.com/fresearchgroup/Community-Content-Tools
This system is used to recommend articles based on his/her activity in the sytem. Please refer to the installation steps given in the repository below: https://github.com/fresearchgroup/Community-Recommendation
Accepting Unicode(UTF8) Charcter Input for CharField in Django and Varchar field in Mysql.
Steps:
#For altering Database charecter set to UTF8(utf8mb4)
1. ALTER DATABASE database_name CHARACTER SET = utf8mb4 COLLATE utf8mb4_unicode_ci;
#For altering table characterset to UTF8(utf8mb4)
2. ALTER TABLE table_name CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
#For altering table columns to characterset to UTF8(utf8mb4)
3. ALTER TABLE table_name CHANGE column_name column_name VARCHAR(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL;
4. Run this management commund
python3 manage.py update_translation_fields
####Community APIs
1. Community Join :
Allowed Method : POST
URL: /api/community/<community-id>/join/
Url parameters
Community-id: Its is the id of the community the user wants to join.
Permission:
Must be Authenticated
Must not already be the member of the same community.
2. Community Unjoin:
Allowed Method: DELETE
URL: /api/community/<community-id>/unjoin/
Url parameters:
Community-id: Its is the id of the community the user wants to unjoin.
Permissions:
Must be Authenticated
Must be a member of that community
3. Create Community Resource:
Allowed Method: POST
URL: /api/community/<community-id>/create/<resource-type>
Url parameters:
Community-id: The ID of the community where the user wants to create the resource.
Resource-type: The type of resource that the user wants to create in that community
Currently two types of resource are supported. They are -
‘article’
‘media’
Please note, the resource-type parameters should match with the above mentioned types.
Body schema fields:
i. Article:
"title": {
"type": "string",
"required": true,
"label": "Title",
"max_length": 100
},
"body": {
"type": "string",
"required": false,
"label": "Body"
},
"image": {
"type": "image upload",
"label": "Image",
"max_length": 100
}
ii. Media:
"mediatype": {
"type": "choice",
"label": "Mediatype",
"choices": [
{
"value": "IMAGE",
"display_name": "Image"
},
{
"value": "AUDIO",
"display_name": "Audio"
},
{
"value": "VIDEO",
"display_name": "Video"
}
]
},
"title": {
"type": "string",
"required": true,
"read_only": false,
"label": "Title",
"max_length": 100
},
"mediafile": {
"type": "file upload",
"required": false,
"read_only": false,
"label": "Mediafile",
"max_length": 100
},
"medialink": {
"type": "string",
"required": false,
"read_only": false,
"label": "Medialink",
"max_length": 300
}
Permissions:
Must be Authenticated.
Must be a member of that community.
4. Community List APi: This api returns a list of communities in the system.
Allowed Method : GET
URL: /api/community/list/
Permissions:
Allowed to all.
5. Community Articles list API: This api returns a list of all published articles of a particular community.
Allow Method : GET
URL: /api/community/<COMMUNITY-ID>/articles/
Url parameters:
Community-id: The ID of the community
Permissions:
Allowed to all
6. Community Media list API: This api returns a list of published media of particular type (eg: IMAGE, AUDIO, VIDEO) in a community.
Allowed Method: GET
URL: /api/community/<COMMUNITY-ID>/media/<MEDIA-TYPE>/
URL parameters:
COMMUNITY-ID: the id of a particular community.
MEDIA-TYPE: the type of media content that the api will return. Options are - IMAGE, AUDIO, VIDEO
Permissions:
Allowed to all
####User APIs
1. Login API-
Allowed Method: POST
URl: /api/auth/
POST request body should contain two fields - username and password
Returned data will be JSON containing two fields - refresh and access
Using the access token will used for every other authenticated request.
2. Signup API:
Allowed Method: POST
URL: /api/auth/signup/
POST request should contain three fields - username, password, and email
Returned data will be JSON containing two fields - refresh and access
3. Refresh Token API:
Allowed Method: POST
URL: /api/auth/refresh/
POST request body should contain one filed - refresh
Returned data will be JSON containing two fields - refresh and access
Since access tokens are short lived, this API can be used to refresh the access token.
Currently, username is not encoded in the tokens returned by this API. Will be modified soon.
The username will be encoded in both access and refresh tokens. These tokens can be decoded using any JWT library to access the username data inside it. One popular library for Java and Android is https://java.jsonwebtoken.io, for Angular - https://github.com/auth0/angular2-jwt. Examples to decode (or parse) JWT token has been shown in their documentation.