flask-geoip2 my first open source project!

I’ve finally gone and done it. My first open source project is now live on github: https://github.com/mattharley/flask-geoip2

This code makes it super simple to create your own geoip server based on the brilliant MaxMind database and python libraries. Clone it, fork it (fork me? fork you!), pull request and do whatever you like to it.

* This product includes GeoLite2 data created by MaxMind, available from http://www.maxmind.com

Getting npm, d3, nvd3, django-bower, django-bower-nvd3 and Heroku to play nicely together!

Wiki:

https://github.com/mattharley/matt/wiki/Django-nvd3-Heroku

Bit of a pain!

But here’s a simple way to do it…

Use django-nvd3 and django-bower

pip install django-nvd3 django-bower
pip freeze > requirements.txt
git add .
git commit -m "don't forget your requirements.txt!"

Use a multi-buildpack

heroku config:set BUILDPACK_URL=https://github.com/ddollar/heroku-buildpack-multi.git

Use the Node and Python buildpacks together

# ./.buildpacks
https://github.com/heroku/heroku-buildpack-nodejs.git
https://github.com/amanjain/heroku-buildpack-python-with-django-bower.git

Download bower using npm

# ./package.json
{"private": true,"dependencies": {"bower": "1.4.1"}}

User django-bower to collect its assets

# ./bin/post_compile
# install bower components
./manage.py bower_install

Tell django where to find bower

# settings.py
...
import os

APPLICATION_DIR = os.path.dirname(globals()['__file__'])
HEROKU = bool(os.environ.get('DATABASE_URL'))

BOWER_COMPONENTS_ROOT = os.path.join(APPLICATION_DIR, 'components')

# where to find your local bower
BOWER_PATH = '/usr/local/bin/bower'

if HEROKU:
    BOWER_PATH = '/app/node_modules/bower/bin/bower'

BOWER_INSTALLED_APPS = (
    'd3#3.3.13',
    'nvd3#1.7.1',
)
...

Credits

Notes from Reverse Takeover Morning Startup

Morning Startup – Perth
Wednesday, March 25 at 7:30 AM

Is Back Door Listing your startup on the ASX a good idea? (Expert Panel) – Hear from those that do it, and have done it – The whys and wherefores …

Details: http://www.meetup.com/Morning-Startup-Perth/events/219930098/

400M-1M a year plus upfront to be on the ASX
Investor relations
Accountants
Lawyers
CEO willing to take phone calls
Continuous news/deal flow. Otherwise “gravity” kicks in

Elements:
Value of the shell
Value of the vendor
Due diligence on both – vendor has to be audited

The trifecta:
Money
Exciting
Learn

Raising – $4-20M

Advantages
IPO – 300 shareholders on the register
RTO – existing shareholders
RTO – seed capital gets existing shares. Takes around 6 months
IPO – lose the $150ish K in the seed. Takes around 3 months.

An RTO is NOT an exit
All shareholders in the vendor can’t sell for 2 years. You usually won’t get cash back as a founder, usually equity. Best to base this on reaching milestones.

Be very careful about the directors selling shares – it will attract media attention

You want the cash/benefits of being a public company. You won’t remain a nimble startup

After an RTO: directors have around 12 months to execute

RTOs are unusual overseas – especially the USA. In Aus there’s a lack of money and education, plus there’s a higher share holding rate. Mining tends to be creative in how they raise money. In Perth there’s a history of people making money going from mining – tech – mining – etc.

IPOs are making a comeback but there’s plenty of mining shell companies and they are getting cheaper. It’s a great time given the mining slowdown.

Wanna build an app?

Here’s my standard email reply to someone wanting to build an app in Perth:
You’re right, there’s a bunch of different pricing out there and it all comes down to how much work it is to specify, design, build and test your app. The way that you can help reduce the price (and the pain!) is to prototype or “wireframe” all of the functionality of the app using good old pen and paper or something like https://balsamiq.com/
Here’s some pointers I can give you:
1) As a general guide, you’d be looking at $10k+ for a custom app for both the iOS and Android platforms. We generally advise to go with one platform to begin with (usually iOS) so that you can test the market
2) There are companies out there that may consider offering you a discounted rate in exchange for equity in the idea. Search around in the local startup community.
3) Don’t try to fit too much functionality into your initial app build. Think about the minimum feature set that allows your app to accomplish its goals. If the idea catches on, it will be easier to find funding/motivation to build out more features in the future
4) If your app fits into a problem set which has already been tackled by another app company, but you just want to brand or localise it for your specific market, you may be able to save money by licensing a “white-label” version of someone else’s app. A quick google search will help you find this out. For example, I searched for a white label real estate app and found this: http://home.smarteragent.com/products/broker-white-label/ for $350/month
All the best in your app adventures!

Build Geos and Collectstatic

was originally using these buildpacks:

https://github.com/GramercyStudios/heroku-geo-buildpack.git#1.1

https://github.com/heroku/heroku-buildpack-python.git#v40

got this error when i pushed: Collectstatic configuration error. To debug, run …..

when i ran: heroku run …. collectstatic everything was fine!!!

so i had to patch the python buildpack: https://github.com/mattharley/heroku-buildpack-python/commit/807ac1344b01daa8ccc5da0774adeb55fae3b6f5

then i got when i pushed:

—–> Preparing static assets Traceback (most recent call last):

….

django.core.exceptions.ImproperlyConfigured: Could not import user-defined GEOMETRY_BACKEND “geos”.

so i found a newer fork of heroku-geo-buildpack which had two newer commit to fix everything:https://github.com/Tekco/heroku-geo-buildpack/commits/master

Thanks

To this stack overflow post Heroku/Django: Could not import user-defined GEOMETRY_BACKEND “geos”