Django package that allows to administer in a simple way the resources of an API with Rest Framework using several modes of operation.
# ~$
sudo apt install python3;\
sudo apt install python3-pipYou have to make sure of the version of python that is installed. The version of python
used is python 3.10.10.
You can install a python virtualenv program in two different ways.
# ~$
sudo apt install python3-venvOR
# ~$
sudo pip3 install virtualenvIn your project root, if you have not already done so, run one of the following commands to create a virtual environment.
# ~$
python3 -m venv envOR
# ~$
virtualenv env -p python3# ~$
source env/bin/activateYou must install the following dependences :
# ~$
pip install -r requirements.txt- Copy 
mfsfolder and past it into your root project. - Write the following code source in 
settings.pyof your Django project. 
# ...
# Django guardian settings
AUTHENTICATION_BACKENDS = (
    'django.contrib.auth.backends.ModelBackend',  # this is default
    'guardian.backends.ObjectPermissionBackend',
)- In 
urls.pyfile, write the following code: 
# ...
from django.conf import settings
from django.conf.urls.static import static
# ...
# After urlpatterns definition ...
urlpatterns += static(settings.FSURL, document_root=settings.FSDIR);- Execute the following django commands to make migration of the database File model :
 
# ~$
./manage.py makemigrations;\
./manage.py migrateAll is done !
We will see some examples of use cases in a Django project. Given an application named galery.
- Example 1:
You can create model of image file in 
galerylike following code : 
from django.utils.translation import gettext_lazy as _
from django.db  import models
from mfs.models import File
Now we will try to create an image uploading function in the views.py file :
from django.shortcuts import render
from restibm.generics import CreateAPIView
from restibm.viewsets import ModelViewSet
from main.serializers import UserCreateSerializer
from main.serializers import DashboardSerializer
from main.models import User
from main.models import Dashboard
class UserCreateAPIView(CreateAPIView):
    serializer_class = UserCreateSerializer
    model = User
    public = True
class DashboardModelViewSet(ModelViewSet):
    serializer_class = DashboardSerializer
    model = Dashboard