Inspiration: Deis Commit Style Guide
I often quote Deis in sections below.
It makes going back and reading commits easier. It also allows you to spend less time thinking about what your commit message should be.
Inspiration: Deis Commit Style Guide
I often quote Deis in sections below.
It makes going back and reading commits easier. It also allows you to spend less time thinking about what your commit message should be.
from django.contrib.auth.mixins import LoginRequiredMixin | |
class SetUserMixin(LoginRequiredMixin): | |
""" | |
Automatically add `self.request.user` to a specified `user_field`. `use_field` defaults to "user" | |
""" | |
user_field = "user" |
class BlogForm(GetRequestFromFormMixin, forms.ModelForm): | |
class Meta: | |
model = Blog | |
fields = ("name, description",) | |
def clean(self): | |
print(self.request) # we can now access the request! | |
return super().clean() |
This contains a collection of common errors people make when coding Django apps, and how to fix them.
# | |
# ddcutil https://www.ddcutil.com/ | |
# | |
# If you don't like commands there's a GUI available too: https://www.ddcutil.com/#ddcui | |
# 1 Getting our monitors | |
ddcutil detect | |
# This will return the monitors detected by ddcutil, we need this first in case we only want to change a single monitor |