Using squashmigrations
is a fucking pain.
Just delete all migration files
rm project/**/migrations/00*.py
Run makemigrations
and fake migrate
the database:
Using squashmigrations
is a fucking pain.
Just delete all migration files
rm project/**/migrations/00*.py
Run makemigrations
and fake migrate
the database:
from xmlrpc.client import ServerProxy | |
class Aria2(ServerProxy): | |
def __init__(self, *args, **kwargs): | |
url = "http://aria2-host:6800/rpc" | |
super().__init__(url, *args, **kwargs) | |
def _ServerProxy__request(self, methodname, params): | |
params = ("token:rpc_secret_token", *params) |
Consider three branches:
master
feature
If due to some changes in master
, a conflict arises in feature
, the same conflict will also reflect in sub-feature
.
Do this to retain the commit history of feature
in sub-feature
for seamless branching.
import re | |
import json | |
PRIMITIVE_DATA_GROUPER = r"(?P<initiator>\{|)(\s|)(?P<key>\w+):(\"|)(?P<value>(\B|[\w\s:-]+|\w+\((\"|)\w+(\"|)\)|function\(\)\{[\s\w\"\?\=:-]+\}))(\"|)(?P<terminator>,|\}|\},|\s,)" | |
OBJECT_DATA_GROUPER = r"(?P<key>\w+):(?P<identifier_token>(\{|\[))" | |
def get_data(): | |
with open("data") as f: | |
content = f.read() |
# If you come from bash you might have to change your $PATH. | |
# export PATH=$HOME/bin:/usr/local/bin:$PATH | |
# Path to your oh-my-zsh installation. | |
export ZSH=/home/vikas/.oh-my-zsh | |
# Set name of the theme to load. Optionally, if you set this to "random" | |
# it'll load a random theme each time that oh-my-zsh is loaded. | |
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes | |
ZSH_THEME="terminalparty" |
"***************************************************************************** | |
"" Vim-PLug core | |
"***************************************************************************** | |
if has('vim_starting') | |
set nocompatible " Be iMproved | |
endif | |
let vimplug_exists=expand('~/.vim/autoload/plug.vim') | |
let g:vim_bootstrap_langs = "javascript,python" |
from django.test import TestCase | |
from notify.signals import notify | |
from notify.models import Notification | |
from django.contrib.auth.models import User | |
from .models import Post | |
class NotificationCreateTestCase(TestCase): | |
def setUp(self): |