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.

A simple demonstration of integrating a sentiment analysis tool in a django project

sentiment-analysis A simple demonstration of integrating a sentiment analysis tool in a django project (watch the video .mp4) To run this project : pi

2 Oct 16, 2021
Django Query Capture can check the query situation at a glance, notice slow queries, and notice where N+1 occurs.

django-query-capture Overview Django Query Capture can check the query situation at a glance, notice slow queries, and notice where N+1 occurs. Some r

GilYoung Song 80 Nov 22, 2022
django-reversion is an extension to the Django web framework that provides version control for model instances.

django-reversion django-reversion is an extension to the Django web framework that provides version control for model instances. Requirements Python 3

Dave Hall 2.8k Jan 02, 2023
The Django Leaflet Admin List package provides an admin list view featured by the map and bounding box filter for the geo-based data of the GeoDjango.

The Django Leaflet Admin List package provides an admin list view featured by the map and bounding box filter for the geo-based data of the GeoDjango. It requires a django-leaflet package.

Vsevolod Novikov 33 Nov 11, 2022
Blog focused on skills enhancement and knowledge sharing. Tech Stack's: Vue.js, Django and Django-Ninja

Blog focused on skills enhancement and knowledge sharing. Tech Stack's: Vue.js, Django and Django-Ninja

Wanderson Fontes 2 Sep 21, 2022
Automatically deletes old file for FileField and ImageField. It also deletes files on models instance deletion.

Django Cleanup Features The django-cleanup app automatically deletes files for FileField, ImageField and subclasses. When a FileField's value is chang

Ilya Shalyapin 838 Dec 30, 2022
Auto-detecting the n+1 queries problem in Python

nplusone nplusone is a library for detecting the n+1 queries problem in Python ORMs, including SQLAlchemy, Peewee, and the Django ORM. The Problem Man

Joshua Carp 837 Dec 29, 2022
A web app which allows user to query the weather info of any place in the world

weather-app This is a web app which allows user to get the weather info of any place in the world as soon as possible. It makes use of OpenWeatherMap

Oladipo Adesiyan 3 Sep 20, 2021
Social Media Network Focuses On Data Security And Being Community Driven Web App

privalise Social Media Network Focuses On Data Security And Being Community Driven Web App The Main Idea: We`ve seen social media web apps that focuse

Privalise 8 Jun 25, 2021
Store model history and view/revert changes from admin site.

django-simple-history django-simple-history stores Django model state on every create/update/delete. This app supports the following combinations of D

Jazzband 1.8k Jan 08, 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
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
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
🔥 Campus-Run Django Server🔥

🏫 Campus-Run Campus-Run is a 3D racing game set on a college campus. Designed this service to comfort university students who are unable to visit the

Youngkwon Kim 1 Feb 08, 2022
Django-Text-to-HTML-converter - The simple Text to HTML Converter using Django framework

Django-Text-to-HTML-converter This is the simple Text to HTML Converter using Dj

Nikit Singh Kanyal 6 Oct 09, 2022
Django based webapp pulling in crypto news and price data via api

Deploy Django in Production FTA project implementing containerization of Django Web Framework into Docker to be placed into Azure Container Services a

0 Sep 21, 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 implementation of STOMP with Django

Django Stomp A simple implementation of STOMP with Django. In theory it can work with any broker which supports STOMP with none or minor adjustments.

Juntos Somos Mais 32 Nov 08, 2022
Agenda feita usando o django para adicionar eventos

Agenda de Eventos Projeto Agenda com Django Inicio O projeto foi iniciado no Django, usando o models.py foi adicionado os dados dos eventos e feita as

Bruno Fernandes 1 Apr 14, 2022
It takes time to start a Django Project and make it almost production-ready.

It takes time to start a Django Project and make it almost production-ready. A developer needs to spend a lot of time installing required libraries, setup a database, setup cache as well as hiding se

Khan Asfi Reza 1 Jan 01, 2022