Skip to content

Instantly share code, notes, and snippets.

View hannylicious's full-sized avatar
🏠
Working from home

Hanny hannylicious

🏠
Working from home
View GitHub Profile
import logging
import os
import discord
from discord.ext import commands
TOKEN = os.getenv("DISCORD_BOT_TOKEN")
#DEBUG, INFO, WARNING, DANGER, CRITICAL
logger = logging.getLogger('discord')
logger.setLevel(logging.INFO)
@hannylicious
hannylicious / Add_Attributes_To_Django_Template_Elements.md
Last active January 4, 2019 12:59
A simple tag to add attributes to elements in Django

To use this - add add_attr.py to you your Django project in the templatetags directory.

Structure would look something like this:

  • Project Dir
    • App Dir
      • templatetags
        • add_attr.py

In the view where you want to add an attribute to something - you would load it at the top of the file with

@hannylicious
hannylicious / README.md
Created November 21, 2016 14:11 — forked from hofmannsven/README.md
My simply Git Cheatsheet