This Django app will be used to host Source.Python plugins, sub-plugins, and custom packages.

Related tags

DjangoSPPM
Overview

Source.Python Project Manager

This Django app will be used to host Source.Python plugins, sub-plugins, and custom packages.

Want to help develop this application?

If you wish to contribute to this application, follow the instructions below on how to set it up locally.

Local setup

  1. Clone the repository
  2. Create a virtual environment
    1. Some IDEs, like Pycharm, come with tools to automatically create the virtual environment.
    2. If you have to set it up yourself, there are plenty of online guides to help you.
    3. We may Docker-ize the app in the future, which will make this a little simpler, but will require you to install/run Docker.
  3. Log into your virtual environment to complete the rest of these steps.
  4. Run pip install -r pip-requirements/local.txt to install all the Python/Django requirements.
  5. Run the migrate management command to create the tables/columns in your database.
  6. Run the create_game_instances management command to create the Game objects.
  7. Run the createsuperuser management command to create your main user.
  8. Run the associate_super_user management command to associate the Super User you just created with a ForumUser object.
    1. Arguments for the command are:
      1. username - The username of the Super User.
      2. forum_id - The user id from the Source.Python forums.
  9. If you want to create a test (non-Super User) User, run the create_test_user management command.
    1. Arguments for the command are:
      1. username - The username of the User.
      2. password - The password to use for the User.
      3. forum_id - The user id from the Source.Python forums.
  10. If you want additional users to test with, run the create_random_users management command.
    1. Arguments for the command are:
      1. count - The number of random Users to create.
  11. Run the server using the runserver management command.
    1. Some IDEs, like Pycharm, have tools to run the server instead of manually running the command in a console window.

Authentication (logging in)

You can log in one of two ways.

  1. The Django Admin can be used to log in your Super User you created above.
  2. A simple login page is available (local only) via the /accounts/login page.

Either way will allow you to login and view/utilize all the APIs except for the Django Admin. Certain APIs require you to be logged in, whether as a regular user or a Super User.

APIs

Walkable REST APIs

The REST APIs that the frontend will eventually be built off of can be found at /api. They are walkable, meaning the APIs are laid out before you on each page, so just click a link to navigate to another API. Some will require you to add a Project name to the URL path.

Each REST API should also show a list of filters and ordering fields, along with examples.

GET calls do not require the user to be logged in. POST calls require the user to be logged in. PATCH and DELETE calls require the user to be logged in, as well as be either the owner or a contributor for the Project (ie package/plugin/sub-plugin contributor). DELETE cannot be called on Projects themselves, just on the associated models.

Games

/api/games

  • displays the existing games along with their slug and icon
  • allows for GET

Packages

/api/packages/projects

  • displays all Packages
  • allows for GET, POST, and PATCH
  • POST not only requires base information for the , but also information for the first release (ie notes, version, and zip file).
  • PATCH requires the package to be added to the URL path (ie /api/packages/packages/ )

/api/packages/contributors/

  • displays the contributors for the given .
  • allows for GET, POST, and DELETE
  • POST and DELETE can only be executed by the owner of the Project
  • DELETE requires the id to be added to the URL path (ie /api/packages/contributors/ / )

/api/packages/games/

  • displays all associated games for the given .
  • allows for GET, POST, and DELETE
  • DELETE requires the id to be added to the URL path (ie /api/packages/games/ / )

/api/packages/images/

  • displays all images for the given .
  • allows for GET, POST, and DELETE
  • DELETE requires the id to be added to the URL path (ie /api/packages/images/ / )

/api/packages/releases/

  • displays all releases for the given .
  • allows for GET and POST
  • you cannot currently PATCH or DELETE a release, though the Django Admin does allow for it if a User happens to make a mistake.

/api/packages/tags/

  • displays all images for the given .
  • allows for GET, POST, and DELETE
  • DELETE requires the id to be added to the URL path (ie /api/packages/tags/ / )

Plugins

  • All the same APIs for Packages exist for Plugins (using plugins and in place of packages and ) with the following addition.

/api/plugins/paths/

  • displays the Sub-Plugin paths allowed for the given . For instance, GunGame allows for custom Sub-Plugins but requires them to be located in the ../plugins/custom directory and include a file as / .py .
  • For example: ../plugins/custom/gg_assists/gg_assists.py
  • allows for GET, POST, PATCH, and DELETE

Sub-Plugins

  • All the same APIs for Packages exist for Sub-Plugins, though they require the which they are associated as well as the .
  • For example: /api/sub-plugins/contributors/ /

Tags

/api/tags

  • displays all created tags
  • tags are created via the Project Tag APIs listed above for Packages, Plugins, and Sub-Plugins.
  • allows for GET
  • tags can be black-listed by an Admin/Super User in the Django Admin. due to the black-listing, tags should not be deleted.

Users

/api/users

  • displays all created users
  • allows for GET

Admin

Since you have created a Super User, you should be able to log into /admin using your username/password. This will allow you to test the Django Admin functionality if you are working on it.

Statistics

There is also a /statistics page to display certain statistics for your local environment from a project, user, and download perspective.

User Frontend

Eventually we will be adding /plugins and /packages, as well as /plugins/ /sub-plugins for a frontend User experience. These all still need built, so if you have Javascript experience and are willing to help out, it would be much appreciated. The first obstacle will be to determine which Javascript framework to use. This really depends on what people know, but Vue or React would be preferred.

Testing

Unit Testing

To run the Django test suite, run pytest. The output will show you any tests that are failing. It will also show you a list of warnings, which will help with deprecated functionalities that may need updated in the future.

pytest also creates a coverage report that can be found at htmlcov/index.html. This report shows where there are gaps in the coverage.

Linting

To run the linters, run prospector. The output will tell you where there are coding standards violations that need fixed.

Simple Login Logout System using Django, JavaScript and ajax.

Djanog-UserAuthenticationSystem Technology Use #version Python 3.9.5 Django 3.2.7 JavaScript --- Ajax Validation --- Login and Logout Functionality, A

Bhaskar Mahor 3 Mar 26, 2022
Django + Next.js integration

Django Next.js Django + Next.js integration From a comment on StackOverflow: Run 2 ports on the same server. One for django (public facing) and one fo

Quera 162 Jan 03, 2023
Easily share data across your company via SQL queries. From Grove Collab.

SQL Explorer SQL Explorer aims to make the flow of data between people fast, simple, and confusion-free. It is a Django-based application that you can

Grove Collaborative 2.1k Dec 30, 2022
Awesome Django Blog App

Awesome-Django-Blog-App Made with love django as the backend and Bootstrap as the frontend ! i hope that can help !! Project Title Django provides mul

ANAS NABIL 2 Feb 08, 2022
Built from scratch to replicate some of the Django admin functionality and add some more, to serve as an introspective interface for Django and Mongo.

django-mongonaut Info: An introspective interface for Django and MongoDB. Version: 0.2.21 Maintainer: Jazzband (jazzband.co) This Project is Being Mov

Jazzband 238 Dec 26, 2022
This is django-import-export module that exports data into many formats

django-import-export This is django-import-export module which exports data into many formats, you can implement this in your admin panel. - Dehydrat

Shivam Rohilla 3 Jun 03, 2021
A clone of https://virgool.io written in django

Virgool clone A clone of virgool blog written in django Installation first rename the .env.sample to .env and fill it. with docker docker-compose up -

Danial Selmipoor 7 Dec 23, 2022
Dynamic Django settings.

Constance - Dynamic Django settings A Django app for storing dynamic settings in pluggable backends (Redis and Django model backend built in) with an

Jazzband 1.5k Jan 07, 2023
Imparare Django ricreando un sito facsimile a quello Flask

SitoPBG-Django Imparare Django ricreando un sito facsimile a quello Flask Note di utilizzo Necessita la valorizzazione delle seguenti variabili di amb

Mario Nardi 1 Dec 08, 2021
Visual DSL framework for django

Preface Processes change more often than technic. Domain Rules are situational and may differ from customer to customer. With diverse code and frequen

Dmitry Kuksinsky 165 Jan 08, 2023
Django + NextJS + Tailwind Boilerplate

django + NextJS + Tailwind Boilerplate About A Django project boilerplate/templa

Shayan Debroy 3 Mar 11, 2022
Displaying objects on maps in the Django views and administration site.

DjangoAdminGeomap library The free, open-source DjangoAdminGeomap library is designed to display objects on the map in the Django views and admin site

Vitaly Bogomolov 31 Dec 28, 2022
Python port of Google's libphonenumber

phonenumbers Python Library This is a Python port of Google's libphonenumber library It supports Python 2.5-2.7 and Python 3.x (in the same codebase,

David Drysdale 3.1k Jan 08, 2023
Per object permissions for Django

django-guardian django-guardian is an implementation of per object permissions [1] on top of Django's authorization backend Documentation Online docum

3.3k Jan 04, 2023
A app for managing lessons with Django

Course Notes A app for managing lessons with Django Some Ideas

Motahhar.Mokfi 6 Jan 28, 2022
A BitField extension for Django Models

django-bitfield Provides a BitField like class (using a BigIntegerField) for your Django models. (If you're upgrading from a version before 1.2 the AP

DISQUS 361 Dec 22, 2022
django app that allows capture application metrics by each user individually

Django User Metrics django app that allows capture application metrics by each user individually, so after you can generate reports with aggregation o

Reiner Marquez 42 Apr 28, 2022
This repository contains django library management system project.

Library Management System Django ** INSTALLATION** First of all install python on your system. Then run pip install -r requirements.txt to required se

whoisdinanath 1 Dec 26, 2022
A music recommendation REST API which makes a machine learning algorithm work with the Django REST Framework

music-recommender-rest-api A music recommendation REST API which makes a machine learning algorithm work with the Django REST Framework How it works T

The Reaper 1 Sep 28, 2021
Compresses linked and inline javascript or CSS into a single cached file.

Django Compressor Django Compressor processes, combines and minifies linked and inline Javascript or CSS in a Django template into cacheable static fi

2.6k Jan 03, 2023