Skip to main content

A handy utility app that helps bootup django quick and secure

Project description

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

A custom Django Bootup helps with repetitive tasks of running a clean project.

Current features:
1. Disables syncdb prompting the creation of a superuser
2. Latches on the post_syncdb signal and once syncdb is complete, it starts bootstrapping the site
3. It loads up any fixtures at a specified directory in your setting.py
a. any valid fixture file will be loaded, with or without the initial_ prefix
b. fixture directory is different than that of Django and set by: INITIAL_FIXTURES_DIRS
4. It creates a superuser with pk=1
a. user credentials defined in private or local settings.py
5. It creates four sites, production, integration, localhost and a local_ip
a. site credentials defined in private or local settings.py
6. Auto create a user profile after each user creation

Patches welcome: http://bitbucket.org/un33k/django-bootup

Usage
=====

If you want a worry free django bootup process, then this is for you.

Here what you need to do:

1. Stick ``"bootup"`` in ``INSTALLED_APPS``. After all other Django specific Apps
2. Create the following in your local_settings.py or private_settings.py or settings.py.

# superuser credentials
ADMIN_NAME = "your superuser name"
MAIN_PASS = "your superuser password?"
ADMIN_EMAIL = "your superuser email address"

# few sites you might need
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 (headless vmware!) (optional)
'domain': '192.168.224.128:8080'
}
}

# all valid fixture files in this directory will be loaded up regardless of whether they start with
# initial_ or not
INITIAL_FIXTURES_DIRS = "/some/real/path/to/your/fixtures"

If the following are set and a valid profile.UserProfile class in set:
AUTH_PROFILE_MODULE = True:
USER_PROFILE_AUTO_CREATE = 'profiles.Userprofile'
Then bootup will try to create the a profile for each user creation.
If the above are not set, or on errors, it will quietly skip creation of UserProfile.

That's it.
Run syncdb on an empty database and enjoy

Note: No action is taken on any of the above definitions unless they are found in settings.py
Also: Any existing user at pk=1 will be updated to superuser
Any existing sites might be updated depending of pk of the site object

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.5.tar.gz (4.8 kB view details)

Uploaded Source

File details

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

File metadata

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

File hashes

Hashes for django-bootup-0.5.tar.gz
Algorithm Hash digest
SHA256 eeca92d3845cee26fa2f4da53646745ba8527e202d1a972b13ce11b7e8db3751
MD5 54a7774a4c2e4daca14b603be9a16cc3
BLAKE2b-256 61f1bc26ee321d0a043d81e5b30aa3656b7dfd8f70cc48e67b5d0ff1028a0c3a

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