Skip to content

Instantly share code, notes, and snippets.

View supawaza's full-sized avatar

Mon Sucher supawaza

  • Minneapolis, MN
View GitHub Profile
@supawaza
supawaza / ST2 - Exclude files.json
Created December 17, 2013 17:37
Hide hidden files inside Sublime Text such as .DS_Store or any cache files. Hit Cmd+, to open up the setting and paste the following line in. Source: https://coderwall.com/p/znswpq --- #snippet #SublimeText
{
"file_exclude_patterns":
[
"*.svn",
"*.git",
"*.hg",
"CVS",
"*tmp/cache",
"*._*",
"*.DS_Store"
@supawaza
supawaza / wagtail_hooks.py
Last active November 15, 2019 18:15
Django / Wagtail: send password reset email after creating user. This will automatically sends a password reset email once a user has been successfully created in wagtail or django admin. You can also check the type of user and send the specific the email depending on the type of user. This is useful for when you are adding user inside the Admin…
from django.contrib.auth.forms import PasswordResetForm
from wagtail.core import hooks
# Totally can use the same thing for django signal as well
@hooks.register('after_create_user')
def send_reset_password_email(request, user):
reset_password_form = PasswordResetForm(
data={'email': user.email}
)