- Update HISTORY.rst
- Commit the changes:
git add HISTORY.rst
git commit -m "Changelog for upcoming release 0.1.1."
- Update version number (can also be patch or major)
bumpversion minor
git add HISTORY.rst
git commit -m "Changelog for upcoming release 0.1.1."
bumpversion minor
''' | |
adminreverse from here http://djangosnippets.org/snippets/2032/ | |
changed for working with ForeignKeys and updated for Django 1.8 | |
via: https://gist.github.com/joshkel/d051b329501273967506 | |
''' | |
''' | |
reverseadmin | |
============ | |
Module that makes django admin handle OneToOneFields in a better way. |
#!/bin/bash | |
############################################################################## | |
# Install system packages # | |
############################################################################## | |
xcode-select --install | |
sudo installer -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg -target / | |
# install homebrew |
from django.utils import six | |
from django.utils.encoding import force_str | |
class ReadOnlyFieldsMixin(object): | |
readonly_fields = () | |
def __init__(self, *args, **kwargs): | |
super(ReadOnlyFieldsMixin, self).__init__(*args, **kwargs) | |
self.define_readonly_fields(self.fields) |
# -*- coding: utf-8 -*- | |
import time | |
import concurrent.futures | |
import tornado.web | |
import tornado.gen | |
import tornado.httpserver | |
import tornado.ioloop | |
>>> from decimal import Decimal | |
>>> Decimal('2.14999').quantize(Decimal('0.00')) | |
Decimal('2.15') |
""" | |
Test (data) migrations in Django. | |
This uses py.test/pytest-django (the `transactional_db` fixture comes from there), | |
but could be easily adopted for Django's testrunner: | |
from django.test.testcases import TransactionTestCase | |
class FooTestcase(TransactionTestCase): | |
def test_with_django(self): |
import sys | |
from suds import client | |
from suds.wsse import Security, UsernameToken | |
from suds.sax.text import Raw | |
from suds.sudsobject import asdict | |
from suds import WebFault | |
''' | |
Given a Workday Employee_ID, returns the last name of that employee. |
PyCharm has support for virtual environment.
But there are two problems:
postactivate
file.This gist is the solution I found to resolve these two problems.
The use of __main__.py
to create executables
myprojectfolder/
|_ __main__.py
|_ __init__.py
Being __main__.py
:
print("Hello")