Giter Site home page Giter Site logo

djaodjin / djaodjin-deployutils Goto Github PK

View Code? Open in Web Editor NEW
7.0 5.0 6.0 600 KB

Deploy webapps hosted on djaodjin.com

Home Page: https://www.djaodjin.com

License: BSD 2-Clause "Simplified" License

Makefile 1.09% Python 93.12% Shell 0.98% HTML 1.36% Dockerfile 0.31% JavaScript 3.13%
django deploy-tool flask session

djaodjin-deployutils's Introduction

DjaoDjin deployutils

This Python module enables a Django or Flask project to seamlessly integrate behind the HTTP session manager reverse proxy. It will replace the default django.contrib.sessions and AUTHENTICATION_BACKENDS to decode sessions forwarded to your project by the HTTP session manager.

Tested with

  • Python: 3.7, Django: 3.2 (LTS), Django Rest Framework: 3.12
  • Python: 3.10, Django: 4.0 (latest), Django Rest Framework: 3.12
  • Python: 2.7, Django: 1.11 (legacy), Django Rest Framework: 3.9.4

More technical documentation

Install

Install deployutils into your environment

$ pip install djaodjin-deployutils

See the steps to integrate with a Django project.

Development

Clone the repository in a virtualenv and install the prerequisites

$ python3 -m .venv
$ source .venv/bin/activate
$ pip install -r testsite/requirements.txt

Create the credentials file with a DJAODJIN_SECRET_KEY and the empty db.

$ make initdb

Run the web application

$ python manage.py runserver

Browse to http://localhost:8000

Release Notes

Tested with

  • Python: 3.7, Django: 3.2 (LTS)
  • Python: 3.10, Django: 4.2 (latest)
  • Python: 2.7, Django: 1.11 (legacy) - use testsite/requirements-legacy.txt

0.11.0

  • makes manages_broker a property (breaking change)
  • fixes missing get_context_data
  • adds message about env variables override

previous release notes

djaodjin-deployutils's People

Contributors

dependabot[bot] avatar knivets avatar morganshorter avatar smirolo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

djaodjin-deployutils's Issues

pip > 10 & pip.get_installed_distributions()

From pypa/pip#5243

See https://pip.pypa.io/en/latest/user_guide/#using-pip-from-your-program - importing functions from pip is not supported. In this case, setuptools (specifically pkg_resources) probably has the functionality you need.

That's explicitly not the right thing to do. Please don't do this, we will not support such usage.

This is really an issue as we must stick with old pip version < 10 to still be able to use djaodjin-deployutils.

As far as we can see, this is only user for logging purpose in file https://github.com/djaodjin/djaodjin-deployutils/blob/master/deployutils/apps/django/logging.py

Maybe the proposed alternative in the link above can work :

import pkg_resources

dists = [d for d in pkg_resources.working_set]
# Filter out distributions you don't care about and use.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.