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 more goodies
================
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 more goodies
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.7.tar.gz
(5.3 kB
view details)
File details
Details for the file django-bootup-0.7.tar.gz.
File metadata
- Download URL: django-bootup-0.7.tar.gz
- Upload date:
- Size: 5.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e16ff34363469f83a45f4b26cfac06ad037a9f3aa86afa324385daa88c9e37c4
|
|
| MD5 |
38d3f59cf79de51abc009e26f6d79fb4
|
|
| BLAKE2b-256 |
daf09953b22a4205afd06d913af84da4c6a17a35d0535a15afc2a3575993404a
|