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

Related tags

Django SPPM
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.

You might also like...
This is raw connection between redis server and django python app

Django_Redis This repository contains the code for this blogpost. Running the Application Clone the repository git clone https://github.com/xxl4tomxu9

The best way to have DRY Django forms. The app provides a tag and filter that lets you quickly render forms in a div format while providing an enormous amount of capability to configure and control the rendered HTML.
The best way to have DRY Django forms. The app provides a tag and filter that lets you quickly render forms in a div format while providing an enormous amount of capability to configure and control the rendered HTML.

django-crispy-forms The best way to have Django DRY forms. Build programmatic reusable layouts out of components, having full control of the rendered

This a Django TODO app project and practiced how to deploy  and publish the project to Heroku
This a Django TODO app project and practiced how to deploy and publish the project to Heroku

ToDo App Demo | Project Table of Contents Overview Built With Features How to use Acknowledgements Contact Overview Built With HTML CSS JS Django How

A blog app powered by python-django

Django_BlogApp This is a blog app powered by python-django Features Add and delete blog post View someone else blog Can add comment to that blog And o

A Django/Python web app that functions as a digital diary

My Django Diary Full-stack web application that functions as a digital diary using Django, Python, SQLite, HTML & CSS. Things I learned during this pr

Neighbourhood - A python-django web app to help the residence of a given neighborhood know their surrounding better
Neighbourhood - A python-django web app to help the residence of a given neighborhood know their surrounding better

Neighbourhood A python-django web app to help the residence of a given neighborh

This is a Django app that uses numerous Google APIs such as reCAPTURE, maps and waypoints

Django project that uses Googles APIs to auto populate fields, display maps and routes for multiple waypoints

Django And React Notes App
Django And React Notes App

Django & React Notes App Cloning the repository -- Clone the repository using the command below : git clone https://github.com/divanov11/Django-React

PWA is a simple Django app to develope and deploy a Progressive Web Application.

PWA PWA is a simple Django app to develope and deploy a Progressive Web Application. Detailed documentation is in the "docs" directory. Quick start Ad

Owner
null
Django project starter on steroids: quickly create a Django app AND generate source code for data models + REST/GraphQL APIs (the generated code is auto-linted and has 100% test coverage).

Create Django App ?? We're a Django project starter on steroids! One-line command to create a Django app with all the dependencies auto-installed AND

imagine.ai 68 Oct 19, 2022
Django URL Shortener is a Django app to to include URL Shortening feature in your Django Project

Django URL Shortener Django URL Shortener is a Django app to to include URL Shortening feature in your Django Project Install this package to your Dja

Rishav Sinha 4 Nov 18, 2021
Yummy Django API, it's the exclusive API used for the e-yummy-ke vue web app

Yummy Django API, it's the exclusive API used for the e-yummy-ke vue web app

Am.Chris_KE 1 Feb 14, 2022
Alt1-compatible widget host for RuneScape 3

RuneKit Alt1-compatible toolbox for RuneScape 3, for Linux and macOS. Compatibility macOS installation guide Running This project use Poetry as packag

Manatsawin Hanmongkolchai 75 Nov 28, 2022
APIs for a Chat app. Written with Django Rest framework and Django channels.

ChatAPI APIs for a Chat app. Written with Django Rest framework and Django channels. The documentation for the http end points can be found here This

Victor Aderibigbe 18 Sep 9, 2022
Django-Audiofield is a simple app that allows Audio files upload, management and conversion to different audio format (mp3, wav & ogg), which also makes it easy to play audio files into your Django application.

Django-Audiofield Description: Django Audio Management Tools Maintainer: Areski Contributors: list of contributors Django-Audiofield is a simple app t

Areski Belaid 167 Nov 10, 2022
A Django app to initialize Sentry client for your Django applications

Dj_sentry This Django application intialize Sentry SDK to your Django application. How to install You can install this packaging by using: pip install

Gandi 1 Dec 9, 2021
This is a repository for collecting global custom management extensions for the Django Framework.

Django Extensions Django Extensions is a collection of custom extensions for the Django Framework. Getting Started The easiest way to figure out what

Django Extensions 6k Dec 26, 2022
Custom Django field for using enumerations of named constants

django-enumfield Provides an enumeration Django model field (using IntegerField) with reusable enums and transition validation. Installation Currently

5 Monkeys 195 Dec 20, 2022
A simple Blog Using Django Framework and Used IBM Cloud Services for Text Analysis and Text to Speech

ElhamBlog Cloud Computing Course first assignment. A simple Blog Using Django Framework and Used IBM Cloud Services for Text Analysis and Text to Spee

Elham Razi 5 Dec 6, 2022