This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
|# vim: set ft=python :|
|from __future__ import print_function|
|from redis import StrictRedis as Redis|
|r = Redis()|
|print("Module readline not available.")|
|if 'libedit' in readline.__doc__:|
|readline.parse_and_bind("bind ^I rl_complete")|
|from app import models|
|from django.conf import settings|
|print("\nCould not import Django modules.")|
|print("\nImported Django modules.")|
|from dateutil.parser import parse as parse_date|
|print("\nCould not import dateutil.")|
Sep 11, 2014
@Wilfred Yep, I have (and I use ipython even with this .pythonrc). I say, why press up when it can be automatic?
Dec 14, 2014
Very nice. I didn't know this either, and I agree with you on that it's easier and faster. Thanks for sharing.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Have you considered ipython? That would let you just typing in
import djthen press up, and you can see all the previous imports you've done that start with that string.
If you install ipython,
manage.py shellwill use it automatically.