- Update CHANGES.rst
- Update version number in
my_project/__init__.py - Update version number in
setup.py - Install the package again for local development, but with the new version number:
python setup.py develop
- Run the tests:
python setup.py test
| def setup_django_env(path): | |
| import imp | |
| import sys | |
| from os.path import join | |
| from django.core.management import setup_environ | |
| f, filename, desc = imp.find_module('settings', [path]) | |
| project = imp.load_module('settings', f, filename, desc) | |
| setup_environ(project) |
| from django.db import models | |
| class M1(models.Model): | |
| title = models.CharField(max_length=100) | |
| img1 = models.ImageField(upload_to="static/") | |
| def __unicode__(self): | |
| return self.title |
| PS1='[\u@\h \W]\$ ' | |
| #better prompt for sudo | |
| SUDO_PS1='[\u@\h \W]\$ ' | |
| export LANG="en_US.UTF-8" | |
| export LC_CTYPE="en_US.UTF-8" | |
| export LC_ALL= | |
| ## Colorize the ls output ## | |
| alias cp='cp -iv' # Preferred 'cp' implementation | |
| alias mv='mv -iv' # Preferred 'mv' implementation |
| UX improvement for Submitt Button | |
| ----------------------------------- | |
| Forked from [Mark Hayes](http://codepen.io/mhayes)'s Pen [qdCAc](http://codepen.io/mhayes/pen/qdCAc/). | |
| A [Pen](http://codepen.io/rafibomb/pen/bGszx) by [Rafi Benkual](http://codepen.io/rafibomb) on [CodePen](http://codepen.io/). | |
| [License](http://codepen.io/rafibomb/pen/bGszx/license). |
my_project/__init__.pysetup.pypython setup.py develop
python setup.py test
Flexible style guide palette demo by the Lincoln Loop team.
Happy Friday!
Forked from Lincoln Loop's Pen Color Palette - Flexbox Friday Demo 2.
A Pen by Christopher Clarke on CodePen.
| class TestStaticSitePaths(TestCase): | |
| def setUp(self): | |
| self.root_page = Page.objects.get(id=1) | |
| # For simple tests | |
| self.home_page = self.root_page.add_child(instance=SimplePage(title="Homepage", slug="home")) | |
| self.about_page = self.home_page.add_child(instance=SimplePage(title="About us", slug="about")) | |
| self.contact_page = self.home_page.add_child(instance=SimplePage(title="Contact", slug="contact")) | |
| # For custom tests |
| # install | |
| # ------- | |
| pip install mandrill | |
| # sending the email | |
| # ---------- | |
| import mandrill | |
| API_KEY = 'valid_api_key' |
| import imaplib, email | |
| import getpass, imaplib, email, sets | |
| def split_addrs(s): | |
| #split an address list into list of tuples of (name,address) | |
| if not(s): return [] | |
| outQ = True | |
| cut = -1 | |
| res = [] |