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.

Use minify-html, the extremely fast HTML + JS + CSS minifier, with Django.

django-minify-html Use minify-html, the extremely fast HTML + JS + CSS minifier, with Django. Requirements Python 3.8 to 3.10 supported. Django 2.2 to

Adam Johnson 60 Dec 28, 2022
A helper for organizing Django project settings by relying on well established programming patterns.

django-configurations django-configurations eases Django project configuration by relying on the composability of Python classes. It extends the notio

Jazzband 953 Dec 29, 2022
Projeto Crud Django and Mongo

Projeto-Crud_Django_and_Mongo Configuração para rodar o projeto Download Project

Samuel Fernandes Oliveira 2 Jan 24, 2022
Loguru is an exceeding easy way to do logging in Python

Django Easy Logging Easy Django logging with Loguru Loguru is an exceeding easy way to do logging in Python. django-easy-logging makes it exceedingly

Neutron Sync 8 Oct 17, 2022
Official clone of the Subversion repository.

Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design. All documentation is in the "docs" directo

Raymond Penners 3 May 06, 2022
Strict separation of config from code.

Python Decouple: Strict separation of settings from code Decouple helps you to organize your settings so that you can change parameters without having

Henrique Bastos 2.3k Jan 04, 2023
Django Starter is a simple Skeleton to start with a Django project.

Django Starter Template Description Django Starter is a simple Skeleton to start

Numan Ibn Mazid 1 Jan 10, 2022
Twitter-clone using Django (DRF) + VueJS

Twitter Clone work in progress 🚧 A Twitter clone project Table Of Contents About the Project Built With Getting Started Running project License Autho

Ahmad Alwi 8 Sep 08, 2022
Django admin CKEditor integration.

Django CKEditor NOTICE: django-ckeditor 5 has backward incompatible code moves against 4.5.1. File upload support has been moved to ckeditor_uploader.

2.2k Jan 02, 2023
React.JS - Django Application Template

OTS React.JS - DJango Web Application (UNTESTED) This repository servers as a template for creating React.JS - Django Web Applications. Note that the

Darryl See Wei Shen 5 Aug 19, 2022
pdm-django: Django command shortcuts for PDM

pdm-django: Django command shortcuts for PDM A plugin that gives you command shortcuts for developing with PDM. pdm run python manage.py runserver -

Neutron Sync 2 Aug 11, 2022
A tool to automatically fix Django deprecations.

A tool to help upgrade Django projects to newer version of the framework by automatically fixing deprecations. The problem When maintaining a Django s

Bruno Alla 155 Dec 14, 2022
Opinionated boilerplate for starting a Django project together with React front-end library and TailwindCSS CSS framework.

Opinionated boilerplate for starting a Django project together with React front-end library and TailwindCSS CSS framework.

João Vítor Carli 10 Jan 08, 2023
Simple tagging for django

django-taggit This is a Jazzband project. By contributing you agree to abide by the Contributor Code of Conduct and follow the guidelines. django-tagg

Jazzband 3k Jan 02, 2023
An extremely fast JavaScript and CSS bundler and minifier

Website | Getting started | Documentation | Plugins | FAQ Why? Our current build tools for the web are 10-100x slower than they could be: The main goa

Evan Wallace 34.2k Jan 04, 2023
Radically simplified static file serving for Python web apps

WhiteNoise Radically simplified static file serving for Python web apps With a couple of lines of config WhiteNoise allows your web app to serve its o

Dave Evans 2.1k Dec 15, 2022
django+bootstrap5 实现的 个人博客

项目状态: 正在开发中【目前已基本可用】 项目地址: https://github.com/find456789/django_blog django_blog django+bootstrap5 实现的 个人博客 特点 文章的历史版本管理(随时回退) rss、atom markdown 评论功能

名字 3 Nov 16, 2021
Buckshot++ is a new algorithm that finds highly stable clusters efficiently.

Buckshot++: An Outlier-Resistant and Scalable Clustering Algorithm. (Inspired by the Buckshot Algorithm.) Here, we introduce a new algorithm, which we

John Jung 1 Jul 02, 2022
Quick example of a todo list application using Django and HTMX

django-htmx-todo-list Quick example of a todo list application using Django and HTMX Background Modified & expanded from https://github.com/jaredlockh

Jack Linke 54 Dec 10, 2022
A set of high-level abstractions for Django forms

django-formtools Django's "formtools" is a set of high-level abstractions for Django forms. Currently for form previews and multi-step forms. This cod

Jazzband 621 Dec 30, 2022