Created
April 16, 2012 18:16
-
-
Save raelmax/2400462 to your computer and use it in GitHub Desktop.
Gera uma lista com todos os atributos de um django model que começa com "f_"
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
def feed_attrs(): | |
feed = Feed() | |
l = () | |
for i in [k for k in dir(feed) if k.startswith('f_')]: | |
l.append((i.lower(), i)) | |
return l |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment