Posts

Showing posts with the label Python3

2019-Jun Ansible devel branch and random hangs using winrm?

I am posting over at the An sible Project  Google Group. Upgraded ansible to  $ ansible --version ansible 2.9.0.dev0   config file = /Users/tanner/projects/ansible.git/playbooks.git/celadonsystems.com/ansible.cfg   configured module search path = [u'/Users/tanner/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']   ansible python module location = /Users/tanner/projects/ansible.git/ansible/lib/ansible   executable location = /Users/tanner/projects/ansible.git/ansible/bin/ansible   python version = 2.7.10 (default, Feb 22 2019, 21:55:15) [GCC 4.2.1 Compatible Apple LLVM 10.0.1 (clang-1001.0.37.14)] And now random playbooks and tasks just hang in unusual places.  Before the upgrade of ansible this task worked as expected. - name: Install programs (choco) win_chocolatey:   name: "{{ item }}"   state: "present"   when:   - chocolatey_packages is defined   loop: "{{ chocolatey_packages|flatten(levels=1) }}" The abov...

Go Live with Django & Heroku

I was following Justin Mitchels blog post about Going Live with Django and Heroku I need to populate the database with a significant amount of data and I’ve been using python manage.py loaddata --format json arch2json_all.json Installed 221994 object(s) from 1 fixture(s) In development with sqlite3 this works great. Switch to my production branch push things up to Heroku $ git push heroku master $ heroku run python manage.py makemigrations $ heroku run python manage.py migrate Run into problems when I try to load the fixture. $ heroku run bash $ python manage.py loaddata --format json arch2json_all.json django.db.utils.DataError: Problem installing fixture '/app/items/fixtures/arch2json_all.json': Could not load items.Monolithic(pk=None): value too long for type character varying(1024) Looking in the usual locations I find a couple potential answers. https://stackoverflow.com/questions/9036102/databaseerror-value-too-long-for-type-character-varying100 Could it be a  ...

S3 Static & Media Files for Django (more problems)

Trying to setup S3 for static files for my django project but only in Production mode. In local (development) mode I want to use local files. From one of Coding For Entrepreneurs django videos I got this python snippet to support a production environment and a local environment. settings/__init__.py from .base import * from .production import * try: from .local import * except: pass I followed the steps from the  C oding For Entrepreneurs  blog. I did steps #4 , #5 , #6 and I assume step #7 means to put the from <your-project>.aws.conf import * Into the settings/production.py ? And to leave it out of the settings/local.py ? Using the above settings/__init__.py on my local (development) environment the {% static %} template tag is replaced by https://s3.us-east-2.amazonaws.com/ S3 bucket url If I comment out the from .production import * from settings/init.py from .base import * #from .production import * try: from .local import * except: pass I get the local.py STATIC...

S3 Static & Media Files for Django: Suspicious Operation: Attempted access to 'denied' while loading static files

This summary is not available. Please click here to view the post.