Django-allauth Installation

There is a useful django-allauth video tutorial at Create third party Facebook login in Django. The document below simply follows that but only adds facebook social authentication. Documentation can be found at django-alluth documentation. django-allauth can also be installed by cloning from https://github.com/pennersr/django-allauth I am running Django 1.9.5 and will install django-allauth 0.25.2 Setup a…Read More

Running Python unittests from Command Line

This script will allow a Python unittest to be run from the command line. import unittest import testFile suite = unittest.TestLoader().loadTestsFromModule(testFile) unittest.TextTestRunner().run(suite) testFile.py import unittest from fun import add class test_function(unittest.TestCase): def test_one(self): result = add(2,3) self.assertEquals(result, 5) fun.py def add(a,b): return a+b

Install Mongodb on Fedora 23

To install Mongodb on Fedora 23 go to https://www.mongodb.org/downloads On the Linux tab go to version RHEL 7 Linux 64-bit $ wget https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-rhel70-3.2.3.tgz Untar the tarball $ tar -zxvf mongodb-linux-x86_64-rhel70-3.2.3.tgz $ echo $PATH $ sudo ln -s ~/Downloads/mongodb-linux-x86_64-rhel70-3.2.3/bin/mongo /usr/local/bin/mongod $ mongod –version MongoDB shell version: 3.2.3 $ mongo –version MongoDB shell version: 3.0.8 Make the…Read More