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
MAIL_SERVER = '' | |
USERNAME = '' | |
PASSWORD = '' | |
MAILBOX = 'Spam' | |
MAX_DAYS = 7 # Deletes messages older than a week | |
import imaplib | |
import datetime | |
today = datetime.date.today() |
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
from restoran.models import * | |
from django.contrib import admin | |
class DishIngredientInline(admin.StackedInline): | |
model = Dish.ingredients.through | |
extra = 1 | |
def formfield_for_foreignkey(self, db_field, request=None, **kwargs): | |
field = super(DishIngredientInline, self).formfield_for_foreignkey(db_field, request, **kwargs) |
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
/** | |
* Auto Delete All Facebook Messages | |
* | |
* You can run this code from the console, but the best way to run it is by | |
* saving it as bookmark in your bookmark bar. Look at the gists comments for | |
* instructions on how to save it as a bookmark. | |
* | |
* @link http://matthewdunham.net | |
* @link http://linkedin.com/in/matthewdunham | |
* @author Matthew Dunham <[email protected]> |