From: Radek Czajka Date: Mon, 29 Sep 2014 12:55:33 +0000 (+0200) Subject: Remove Django dep. X-Git-Url: https://git.mdrn.pl/fnpdeploy.git/commitdiff_plain/e2825f40a65aa4e05a9704e3e710df24c4838662 Remove Django dep. --- diff --git a/fnpdeploy/__init__.py b/fnpdeploy/__init__.py index 058accf..dc74699 100644 --- a/fnpdeploy/__init__.py +++ b/fnpdeploy/__init__.py @@ -21,7 +21,6 @@ Then set up some env properties: """ from subprocess import check_output from os.path import abspath, dirname, exists, join -from django.utils.crypto import get_random_string from fabric.api import * from fabric.context_managers import settings from fabric.contrib import files @@ -31,6 +30,14 @@ env.virtualenv = '/usr/bin/virtualenv' env.services = None +def get_random_string(length=12, + allowed_chars='abcdefghijklmnopqrstuvwxyz' + 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'): + from random import SystemRandom + random = SystemRandom() + return ''.join(random.choice(allowed_chars) for i in range(length)) + + @task def setup(): """