Skip to main content

A Django bootup application that helps with quick and secure bootup of your django project

Project description

django-bootup
================

A Django application that helps with quick and secure bootup of your django project".
``Bootup takes care of your repetitive tasks of running a clean project.``

Current Features:
_________________

1. Disable ``syncdb`` from prompting you to create a superuser

2. Latch on the ``post_syncdb`` signal and execute the following:
A. Install all ``fixture(s)`` found within a given path (single path)
* - Path is set in your settings file as: INITIAL_FIXTURES_DIRS
* _ Any valid fixture file(s) at the above path will be installed
* _ Fixture files(s) at the above path don't require to start with ``initial_``
* _ Fixture installation will be skipped if no fixture file is found at the specified path
* _ Fixture installation will be skipped if INITIAL_FIXTURES_DIRS is not defined or empty

B. Create or Update a superuser
* - This superuser will be the first created user on your system
* - Primary Key = ``1`` will be used to fetch and update existing superuser
* - Superuser credentials have to be set in the project's settings file as follows:
+ ADMIN_NAME = "desired name for the superuser"
+ MAIN_PASS = "desired password for ``the`` superuser"
+ ADMIN_EMAIL = "desired email address for the superuser"
* _ Superuser creation/update will be skipped if:
+ Any of the three (above) credentials is undefined or empty

C. Automatically create the required ``Site`` objects with proper ``name`` and ``domain`` if:
* _ Existence of SITE_INFO in your setting file with the following format
# -------------------------------
SITE_INFO = {
'1': {
'name': 'production',
'domain': 'example.com'
},
'2':{
'name': 'integration', # (optional)
'domain': 'example.net'
},
'3': {
'name': 'localhost', # development on local system (optional)
'domain': 'localhost:8080'
},
'4':{
'name': 'internal', # development on local or remote system such as headless vm! (optional)
'domain': '10.10.1.50:8080'
}
}
# -------------------------------
* _ SITE_ID needs to be set to an index to one of the above fields in SITE_INFO
+ For the Production server set SITE_ID = "1"
+ For the Integration server set SITE_ID = "2"
+ For the Localhost server set SITE_ID = "3"
+ For a IP based server set SITE_ID = "4"
* _ Any existing site objects with (pk= 1,2,3,4) will be updated with the relevant info set in SITE_INFO
* _ Site creation will be skipped if SITE_INFO is not defined in your settings file

4. Automatically create a matching user profile ``anytime`` after each user creation if:
A. Existence of USER_PROFILE_AUTO_CREATE = True in your settings file
B. Existence of AUTH_PROFILE_MODULE = 'application.UserProfile' in your settings file
* _ Example ``AUTH_PROFILE_MODULE = profile.UserProfile'``
C. User profile creation will be skipped if:
* _ USER_PROFILE_AUTO_CREATE is set to False or empty or not set in your settings file
* _ AUTH_PROFILE_MODULE is empty, invalid or not set in your setting file
* _ AUTH_PROFILE_MODULE points to an application and module that is incomplete or misconfigured

5. More to come ... patches & enhancements are welcomed (http://bitbucket.org/un33k/django-bootup)

Usage
=====

A. Install django-bootup:
* _ Make sure you have python 2.6+ and can install from pypi
1. easy_install django-bootup
2. pip install django-bootup
3. git clone http://bitbucket.org/un33k/django-bootup
a. cd django-bootup
b. run python setup.py
4. wget https://github.com/un33k/django-bootup/zipball/master
a. unzip the downloaded file
b. cd into django-bootup-* directory
c. run python setup.py

* _ Stick ``"bootup"`` in ``INSTALLED_APPS``, right after all other Django specific Apps
* _ Follow the instruction in the ``Current Features`` at the top of this file for usage.
* _ Run syncdb and enjoy

ToDo
=====
clean up README
add auto UserProfile deletion when a User is deleted
Add test case for UserProfile Creation
add more goodies

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-bootup-0.6.tar.gz (5.2 kB view details)

Uploaded Source

File details

Details for the file django-bootup-0.6.tar.gz.

File metadata

  • Download URL: django-bootup-0.6.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for django-bootup-0.6.tar.gz
Algorithm Hash digest
SHA256 c28e223d8b90783e26ba1045f360f5289859cddc7e5665a16a9c8642e3f0c999
MD5 95b0b1d3bf9f430b81c7fec2573d11f7
BLAKE2b-256 7129997d7aa9e6483dfced18ec1ef67c32297339719ab84a5aa162fa656aa47a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page