Changes between Version 2 and Version 3 of CookBookScriptsAliases
- Timestamp:
- May 21, 2006, 7:25:12 AM (19 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
CookBookScriptsAliases
v2 v3 17 17 $ less $DJ/docs/overview.txt 18 18 $ djgrep Permissions 19 /usr/lib/python2.4/site-packages/django/contrib/auth/models.py:77: 19 /usr/lib/python2.4/site-packages/django/contrib/auth/models.py:77: (_('Permissions'), {'fields': ('is_staff', 'is_active', 'is_superuser', 'user_permissions')}), 20 20 }}} 21 21 22 Here's another example for those who don't keep their Django tree in {{{PYTHONPATH}}} (e.g. because of using many different Django versions). In this case the magic-removalbranch is located in the user's home directory.22 Here's another example for those who don't keep their Django tree in {{{PYTHONPATH}}} (e.g. because of using many different Django versions). In this case the trunk branch is located in the user's home directory. 23 23 {{{ 24 MRP=/home/akaihola/magic-removal # MRP stands for Magic-RemovalPythonpath25 MR=$MRP/django26 MRBIN=$MR/bin27 alias mradmin='PYTHONPATH=$MRP $MRBIN/django-admin.py'28 mrgrep() {29 grep -r --include="*.py" --include="*.html" $* $ MR24 DJP=/home/akaihola/django-trunk # DJP stands for DJango Pythonpath 25 DJ=$DJP/django 26 DJBIN=$DJ/bin 27 alias djadmin='PYTHONPATH=$DJP $DJBIN/django-admin.py' 28 djgrep() { 29 grep -r --include="*.py" --include="*.html" $* $DJ 30 30 } 31 31 32 32 }}} 33 33 34 And some useful idioms using these shortcuts:34 And some useful mantras using these shortcuts: 35 35 {{{ 36 $ svn up $ MRP37 $ mradmin startproject myproject38 $ $ MRBIN/make-messages.py39 $ PYTHONPATH=$ MRP ipython36 $ svn up $DJP 37 $ djadmin startproject myproject 38 $ $DJBIN/make-messages.py 39 $ PYTHONPATH=$DJP ipython 40 40 In [1]:import django 41 41 In [2]:django.__file__ 42 Out[2]:'/home/akaihola/ magic-removal/django/__init__.pyc'42 Out[2]:'/home/akaihola/django-trunk/django/__init__.pyc' 43 43 }}}