Skip to content

Instantly share code, notes, and snippets.

@Icaruk
Icaruk / multipleGitProfiles.md
Last active April 18, 2024 12:58
How to have multiple profiles on git

Last update: 30-01-2024
Last view: 30-01-2024

Step 1

Go to your work folder, mine is located at: F:/Work/EnterpriseName/

And then create a .gitconfig-work with the following data:

@mattlong
mattlong / admin.py
Created September 17, 2014 18:26
Add a custom admin page for a model and link to it from the detail page
from functools import update_wrapper
from django.contrib import admin
from django.contrib.admin import ModelAdmin
from django.contrib.admin.templatetags.admin_urls import add_preserved_filters
from django.core.exceptions import PermissionDenied
from django.shortcuts import render
from myapp.models import Widget
from myapp.forms import ManageWidgetForm