Contact Mike Robinson

x Cancel
posted 2 years ago

Big updates to Django HTML5 Boilerplate -- now 3.0

Django HTML5 Boilerplate is a Django project template with HTML5 Boilerplate baked in. I just pushed a big update and tagged version 3.0. It's now set up as a template that you can pass to the django-admin.py startproject command using the --template flag.

Check out the README for more details. Would love to hear your feedback! Also if there are any issues feel free to create an Issue on GitHub or hit me up here.

posted 2 years ago

Bugs caused by browser extensions

I'm finishing up developing a site and have run into a bug that is being caused by an extension in Safari; there is a fairly important feature that doesn't work if the user has AdBlock installed. I'm of the opinion that I can't support extensions, and that the bug is with AdBlock and not the site; however the client says that because a lot of people will have AdBlock that I should figure out how to fix it. I haven't told the client that I can't/won't fix the issue, but that's what I'm leaning towards.

Enter in the complication of not having a contract. I can give you myriad excuses as to why I don't have one, but it doesn't matter in the end. This project has been rather loosey-goosey when it comes to scope and legalities, and as a result I don't have a contract to point to and say "I don't support extensions, and you agreed by signing here".

So what would you folks do in my shoes? Besides get a contract next time (I know I'm treading on thin ice when I choose to do that).

posted 3 years ago

django-html5-boilerplate

https://github.com/mike360/django-html5-boilerplate

This is a skeleton for Django projects with an integrated (and slightly modified version of) HTML5 Boilerplate for the front end. This is the starting point I've been using for all of my Django projects. Thought it was time to get it out into the wild.

Check the README for documentation and setup instructions.

Follow and fork it on Github if you've got suggestions. Hope you like it!

posted 3 years ago

Django command to backup a file to Rackspace Cloud Files

                from django.core.management.base import BaseCommand, CommandError
from django.conf import settings
import cloudfiles

class Command(BaseCommand):
    
    args = '<local_file cloud_file>'
    help = 'Uploads a local backup file to the Rackspace Cloud'
    
    def handle(self, *args, **options):
        
        if len(args) != 2:
            raise CommandError('2 arguments required: local_file cloud_file') 
        else:
            conn = cloudfiles.get_connection(settings.CLOUD_FILES_USER, settings.CLOUD_FILES_API_KEY)
            cont = conn.get_container(settings.CLOUD_CONTAINER_NAME)
            obj  = cont.create_object(args[1])
            
            local_file = open(args[0], 'r+')
            
            for line in local_file:
                obj.write(line)
                
Raw

Here's a Django management command that uploads a local file to Rackspace Cloud Files. This is one bit from a larger collection of scripts that I wrote to dump an app's data to a json file, tarball the json, and upload the tarball to Rackspace Cloud Files.

It's pretty quick 'n dirty at this point, not a lot of error checking going on, so there's room for improvement. But it does what I needed it to do. Thought I'd pass it on.

A couple implementation notes:

  • Drop it in your_app_folder/management/commands/backup_to_cloud.py
  • Execute: ./manage.py backup_to_cloud local_file_name cloud_file_name
  • Requires CLOUD_FILES_USER, CLOUD_FILES_API_KEY and CLOUD_CONTAINER_NAME to be in your site's settings.py file.
  • Requires python-cloudfiles
  • Requires a Rackspace Cloud Files account ;)
posted 3 years ago

Profile site design

Hey Forrst folk. I'm a newbie here, just joined after the new version launched. Nice digs you've got here. :)

This is for my personal profile site. I hesitate to call it my portfolio any more because I'm not going to be displaying work on it - just contact methods. Reason being is that I'm not seeking new work, and have a full time job coding stuff that I usually can't post publicly. So I just need something that'll encompass ways people can follow/stalk/get in touch with me.

I'm not a designer so I'd appreciate any design tips - even the nittiest of the picky.

Props to @Matin for the icon set!

Hey Forrst folk. I'm a newbie here, just joined after the new version launched. Nice digs you've got here. :)

This is for my personal profile site. I hesitate to call it my portfolio any more because I'm not going to be displaying work on it - just contact methods. Reason being is that I'm not seeking new work, and have a full time job coding stuff that I usually can't post publicly. So I just need something that'll encompass ways people can follow/stalk/get in touch with me.

I'm not a designer so I'd appreciate any design tips - even the nittiest of the picky.

Props to @Matin for the icon set!