In your models.py put:
from django.db import models
@classmethod
def model_field_exists(cls, field):
    try:
        cls._meta.get_field(field)
 return TrueIn your models.py put:
from django.db import models
@classmethod
def model_field_exists(cls, field):
    try:
        cls._meta.get_field(field)
 return True2015-01-29 Unofficial Relay FAQ
Compilation of questions and answers about Relay from React.js Conf.
Disclaimer: I work on Relay at Facebook. Relay is a complex system on which we're iterating aggressively. I'll do my best here to provide accurate, useful answers, but the details are subject to change. I may also be wrong. Feedback and additional questions are welcome.
Relay is a new framework from Facebook that provides data-fetching functionality for React applications. It was announced at React.js Conf (January 2015).
##ubuntu 13.10 and later , you need to install openoffice 4.1.1
###1. uninstall libreoffice and openoffice
sudo apt-get remove libreoffice* openoffice*
sudo apt-get autoremove
###2. install Apache OpenOffice 4.1.1 on 64 bit Ubuntu
wget sourceforge.net/projects/openofficeorg.mirror/files/4.1.1/binaries/en-GB/Apache_OpenOffice_4.1.1_Linux_x86-64_install-deb_en-GB.tar.gz
| <?php | |
| namespace Codeception\Module; | |
| class CakePHPHelper extends \Codeception\Module | |
| { | |
| public function __construct() | |
| { | |
| define('APP_DIR', 'app'); | |
| define('DS', DIRECTORY_SEPARATOR); | |
| define('ROOT', getcwd()); | 
Let's say alice is a github.com user, with 2 or more private repositories repoN.
For this example we'll work with just two repositories named repo1 and repo2
https://github.com/alice/repo1
https://github.com/alice/repo2
You need to be to pull from these repositories without entering a passwords probably on a server, or on multiple servers.
| #!/bin/bash | |
| ### | |
| # | |
| # forked from https://gist.github.com/1264701/08f93534ba177f173b9382b53c419cd0de5b07ea | |
| # | |
| # Ubuntu 14.04 based web server installation script | |
| # Run this by executing the following from a fresh install of Ubuntu 14.04 server: | |
| # | |
| # bash -c "$(curl -fsSL https://gist.githubusercontent.com/simkimsia/4a3808cd109dbd1a3913/raw/d0a9799cdbf0857043b7b59a489361388c09fc4a/install-cake3-ubuntu-14-04.sh)" <mysqlPassword> | 
| class edict(dict): # Similar to bunch, but less, and JSON-centric | |
| # based on class dotdict(dict): # from http://stackoverflow.com/questions/224026/dot-notation-for-dictionary-keys | |
| __setattr__= dict.__setitem__ # TBD: support assignment of nested dicts by overriding this? | |
| __delattr__= dict.__delitem__ | |
| def __init__(self, data): | |
| if type(data) in ( unicode, str ): | |
| data = json.loads( data) | |
| import logging | |
| from traceback import format_exc | |
| import datetime | |
| from schedule import Scheduler | |
| logger = logging.getLogger('schedule') | 
It's a common pattern in React to wrap a component in an abstraction. The outer component exposes a simple property to do something that might have more complex implementation details.
We used to have a helper function called transferPropsTo. We no longer support this method. Instead you're expected to use a generic object helper to merge props.
render() {
 return Component(Object.assign({}, this.props, { more: 'values' }));(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.