Today’s OBjective


  1. Dividing Production and Test version
  2. Introducing about User Model of Django

WHAT WE DID


dviding PRODUCTION and TEST version

    1. simply make two setting.py files and load each version
    2. using Environment Variables
    -   https://gist.github.com/3340018
    -   import os
    -   if os.environ.has_key("PRODUCTION"):
    -       Production version settings
    -   else:
    -        Test(Development) settings

User(Model) class

    1. /Library/Python/2.7/site-packages/django/contrib/auth
    2. User.is_active : represent whether the User activated (vaild)
    -   ex ) default value is false.
    -       User complete the email activation, then set to true.
    3. User.profile
    -   DO NOT subclassing of the User
    -   addtional information to customize

RESULTS


    1. [DIVIDING PRODUCTION and TEST]: https://gist.github.com/3340018
    2. [DIVIDING PRODUCTION and TEST 2]: https://gist.github.com/3340053


Published

13 August 2012