Pages:
Author

Topic: Tutorial: creating a bitcoin instawallet clone with python and django (Read 8923 times)

hero member
Activity: 812
Merit: 1006
I have a question about the directory structure of django-bitcoin-instawallet and django_bitcoin.

I have django_bitcoin installed in the project folder, instawallet and the app wallets inside instawallet.

leo@ubuntu:~/django/instawallet/instawallet$ ls
dev.db             __init__.pyc   settings.pyc   urls.pyc   wsgi.pyc
django_bitcoin  manage.py     templates      wallets
__init__.py      settings.py     urls.py          wsgi.py

My question is can {% load currency_conversions %} from ~/django/instawallet/instawallet/templates/instawallet.html reach ~/django/instawallet/instawallet/django_bitcoin/templatetags/currency_conversions.py given the ~/django/instawallet/instawallet/settings.py file has 'django_bitcoin', in the INSTALLED_APPS?


Today at Bitcoin Hackathon, I started a new project, and fixed some problems with django_bitcoin that only affect new users. These problems were mostly when you used easy_install or pip. I myself have always used cloned repository, so it didn't affect me.

Thanks for your suggestion, I will try again from clean install.

About the qrcode-library, can you please point me in the right direction for this dependancy?

All the requirements are in requirements.txt, you can install them using

pip install -r requirements.txt

or

pip install qrcode
full member
Activity: 178
Merit: 100
I have a question about the directory structure of django-bitcoin-instawallet and django_bitcoin.

I have django_bitcoin installed in the project folder, instawallet and the app wallets inside instawallet.

leo@ubuntu:~/django/instawallet/instawallet$ ls
dev.db             __init__.pyc   settings.pyc   urls.pyc   wsgi.pyc
django_bitcoin  manage.py     templates      wallets
__init__.py      settings.py     urls.py          wsgi.py

My question is can {% load currency_conversions %} from ~/django/instawallet/instawallet/templates/instawallet.html reach ~/django/instawallet/instawallet/django_bitcoin/templatetags/currency_conversions.py given the ~/django/instawallet/instawallet/settings.py file has 'django_bitcoin', in the INSTALLED_APPS?


Today at Bitcoin Hackathon, I started a new project, and fixed some problems with django_bitcoin that only affect new users. These problems were mostly when you used easy_install or pip. I myself have always used cloned repository, so it didn't affect me.

Thanks for your suggestion, I will try again from clean install.

About the qrcode-library, can you please point me in the right direction for this dependancy?
hero member
Activity: 812
Merit: 1006
I have a question about the directory structure of django-bitcoin-instawallet and django_bitcoin.

I have django_bitcoin installed in the project folder, instawallet and the app wallets inside instawallet.

leo@ubuntu:~/django/instawallet/instawallet$ ls
dev.db             __init__.pyc   settings.pyc   urls.pyc   wsgi.pyc
django_bitcoin  manage.py     templates      wallets
__init__.py      settings.py     urls.py          wsgi.py

My question is can {% load currency_conversions %} from ~/django/instawallet/instawallet/templates/instawallet.html reach ~/django/instawallet/instawallet/django_bitcoin/templatetags/currency_conversions.py given the ~/django/instawallet/instawallet/settings.py file has 'django_bitcoin', in the INSTALLED_APPS?


Today at Bitcoin Hackathon, I started a new project, and fixed some problems with django_bitcoin that only affect new users. These problems were mostly when you used easy_install or pip. I myself have always used cloned repository, so it didn't affect me.
full member
Activity: 178
Merit: 100
I have a question about the directory structure of django-bitcoin-instawallet and django_bitcoin.

I have django_bitcoin installed in the project folder, instawallet and the app wallets inside instawallet.

leo@ubuntu:~/django/instawallet/instawallet$ ls
dev.db             __init__.pyc   settings.pyc   urls.pyc   wsgi.pyc
django_bitcoin  manage.py     templates      wallets
__init__.py      settings.py     urls.py          wsgi.py

My question is can {% load currency_conversions %} from ~/django/instawallet/instawallet/templates/instawallet.html reach ~/django/instawallet/instawallet/django_bitcoin/templatetags/currency_conversions.py given the ~/django/instawallet/instawallet/settings.py file has 'django_bitcoin', in the INSTALLED_APPS?
full member
Activity: 178
Merit: 100
I'm stuck with getting the QR code to display.

At the moment the image location is showing as http://10.1.1.14:8000/qrcode/mnooEeJ3GjR8ztUby9Ch9vgrp9BE6at6HV

I guess it needs to lookup the QR code through Google somehow but I have no idea.

Any ideas?
full member
Activity: 178
Merit: 100
Code:
ImportError at /

No module named instawallet.urls

Request Method: GET
Request URL: http://127.0.0.1:8000/
Django Version: 1.4
Exception Type: ImportError
Exception Value:

No module named instawallet.urls

Exception Location: /usr/lib/python2.7/site-packages/django/utils/importlib.py in import_module, line 35
Python Executable: /usr/bin/python2.7
Python Version: 2.7.2
Python Path:

['/TESTSITE/django-bitcoin-instawallet',
 '/usr/lib/python27.zip',
 '/usr/lib/python2.7',
 '/usr/lib/python2.7/plat-linux2',
 '/usr/lib/python2.7/lib-tk',
 '/usr/lib/python2.7/lib-old',
 '/usr/lib/python2.7/lib-dynload',
 '/usr/lib/python2.7/site-packages',
 '/usr/lib/portage/pym']

Any idea why do I get "No module named instawallet.urls"

In settings.py change ROOT_URLCONF from 'instawallet.urls' to just 'urls'
hero member
Activity: 812
Merit: 1006
I just had an idea. Make an instawallet with a "Double or Nothing" button. Just a huge irresistible button that either doubles your balance or takes it all. Take a 1% or whatever fee by giving only 49.5% odds. Have to publish the max amount you can handle covering, maybe make it dynamic. If someone actually wants to do this I could probably put up some cash.

Well, creating a gambling site with django_bitcoin is trivial. It could be of course an anonymous gambling site as well - just deposit your bitcoins to this address, and then you have gambling functionalities there.

eg. "double or nothing" pseudocode:

Code:
import random
from django_bitcoin import Wallet

def double_or_nothing(request, uuid):
    main_wallet=Wallet.objects.get(id=1) # the main wallet, where the site's bitcoins are kept
    user_wallet=Wallet.objects.get(uuid=uuid)
    if random.random()<0.49:
         main_wallet.send_to_wallet(user_wallet, user_wallet.total_balance())
    else:
         user_wallet.send_to_wallet(main_wallet, user_wallet.total_balance())

I just wrote the code directly here, so perhaps it doesn't work Cheesy But anyway, the basic idea is very simple. Then of course, if you want to implement more complex gambling functionalities, it is easy.

I'm not implementing this, since I think it doesn't fit well with wallet... But the library itself could be used as well for gambling sites, or almost anything.
donator
Activity: 2772
Merit: 1019
I just had an idea. Make an instawallet with a "Double or Nothing" button. Just a huge irresistible button that either doubles your balance or takes it all. Take a 1% or whatever fee by giving only 49.5% odds. Have to publish the max amount you can handle covering, maybe make it dynamic. If someone actually wants to do this I could probably put up some cash.

You really need to see a specialist about your gambling addiction. Smiley 

Lol, I want to own it not to use it. Does that mean I'm in the clear or is that just worse?

haha. worse, you're in denial.
legendary
Activity: 1246
Merit: 1016
Strength in numbers
I just had an idea. Make an instawallet with a "Double or Nothing" button. Just a huge irresistible button that either doubles your balance or takes it all. Take a 1% or whatever fee by giving only 49.5% odds. Have to publish the max amount you can handle covering, maybe make it dynamic. If someone actually wants to do this I could probably put up some cash.

You really need to see a specialist about your gambling addiction. Smiley 

Lol, I want to own it not to use it. Does that mean I'm in the clear or is that just worse?
legendary
Activity: 910
Merit: 1000
Quality Printing Services by Federal Reserve Bank
In more serious note.
Feature request #1 : Additional module for tipping aka "Bitcoin me" URI
Generate a special URL, that can me used for only receiving a tip. I personally like the "Bitcoin me" URI idea:

Code:
 
(remove the " ' ")

This starts your bitcoin client and you can complete the payment.
Obviously, this can be redesigned/reversed so that your web based wallet is opened, authentication is requested and payment is made.
Something like "Tip me from 'service name' "

Code:

Feature request #2:
To add another layer of security, wallet service user must select/upload a "security image" for his/her account.
This image is always displayed when he logs in to his account or starts to complete the tip payment. If someone has lured a user to a fake phishing site, image is missing or is not correct. User with a half a brain must notice this and stop. This actually requires a FR #3

Feature Request #3 Transactions or any changes to users account can not be completed without "PIN". PIN number is generated to user when account is first created.
legendary
Activity: 910
Merit: 1000
Quality Printing Services by Federal Reserve Bank
I just had an idea. Make an instawallet with a "Double or Nothing" button. Just a huge irresistible button that either doubles your balance or takes it all. Take a 1% or whatever fee by giving only 49.5% odds. Have to publish the max amount you can handle covering, maybe make it dynamic. If someone actually wants to do this I could probably put up some cash.

You really need to see a specialist about your gambling addiction. Smiley 
legendary
Activity: 1246
Merit: 1016
Strength in numbers
I just had an idea. Make an instawallet with a "Double or Nothing" button. Just a huge irresistible button that either doubles your balance or takes it all. Take a 1% or whatever fee by giving only 49.5% odds. Have to publish the max amount you can handle covering, maybe make it dynamic. If someone actually wants to do this I could probably put up some cash.
legendary
Activity: 910
Merit: 1000
Quality Printing Services by Federal Reserve Bank
Code:
ImportError at /

No module named instawallet.urls

Request Method: GET
Request URL: http://127.0.0.1:8000/
Django Version: 1.4
Exception Type: ImportError
Exception Value:

No module named instawallet.urls

Exception Location: /usr/lib/python2.7/site-packages/django/utils/importlib.py in import_module, line 35
Python Executable: /usr/bin/python2.7
Python Version: 2.7.2
Python Path:

['/TESTSITE/django-bitcoin-instawallet',
 '/usr/lib/python27.zip',
 '/usr/lib/python2.7',
 '/usr/lib/python2.7/plat-linux2',
 '/usr/lib/python2.7/lib-tk',
 '/usr/lib/python2.7/lib-old',
 '/usr/lib/python2.7/lib-dynload',
 '/usr/lib/python2.7/site-packages',
 '/usr/lib/portage/pym']

Any idea why do I get "No module named instawallet.urls"
legendary
Activity: 2324
Merit: 1125
Thanks for the reply. It is true I have installed Django-bitcoin by pulling it from git and I have subsequently run the setup (sudo python setup.py install) which led to the directory structure you describe.

So the structure is (under Django_projects in my home directory):

ubuntu@ubuntu-VirtualBox:~/django_projects/instawallet$ ls
dev.db          __init__.pyc  settings.py   templates  wallets
django-bitcoin  manage.py     settings.py~  urls.py
__init__.py     README.html   settings.pyc  urls.pyc
ubuntu@ubuntu-VirtualBox:~/django_projects/instawallet$ cd django-bitcoin/
ubuntu@ubuntu-VirtualBox:~/django_projects/instawallet/django-bitcoin$ ls
build  django_bitcoin  README.markdown  setup.py
ubuntu@ubuntu-VirtualBox:~/django_projects/instawallet/django-bitcoin$ cd ..
ubuntu@ubuntu-VirtualBox:~/django_projects/instawallet$ cd wallets
ubuntu@ubuntu-VirtualBox:~/django_projects/instawallet/wallets$ ls
forms.py   __init__.py   models.py   tests.py  views.pyc
forms.pyc  __init__.pyc  models.pyc  views.py
ubuntu@ubuntu-VirtualBox:~/django_projects/instawallet/wallets$ cd ..
ubuntu@ubuntu-VirtualBox:~/django_projects/instawallet$ cd templates/
ubuntu@ubuntu-VirtualBox:~/django_projects/instawallet/templates$ ls
instawallet.html  instawallet.html~

Note that I have both cloned Django-bitcoin and django-bitcoin-instawallet from git (django-bitcoin-instawallet is renamed to instawallet) because I wanted to be sure I wasn't doing anything wrong myself. Of course I did make the necessary changes as described in the tutorial.

And as a final note on your set of languages. Anything is better than Perl! Tongue I have seen some garbage code in that language like you wouldn't believe (all supported with: but it's short, no?).

And as I said I really don't have enough experience with Django (hardly any) to judge it one way or another. I just really like explicitly specifying things for readability/maintainability Smiley
hero member
Activity: 812
Merit: 1006
One small addition: actually in the tutorial the library is installed via setup.y, so that isn't the problem.... Hmm, have to think about it.
hero member
Activity: 812
Merit: 1006
I am having this issue: https://github.com/kangasbros/django-bitcoin-instawallet/issues/1

'currency_conversions' is not a valid tag library

Note I know nothing about Django other than it seems to be one of those convention over specification languages that make me fringe Tongue

I'm trying it out for the sole purpose of using this library.

I'll paste some extra info for you to help me.

For some reason, django can't find the currency_conversions tag library, which should reside in django_bitcoin/templatetags/currency_conversions.py

Check that django_bitcoin is properly installed (if you fetch it from git, it should be linked in a way so that django_bitcoin can be found by python, eg.:

django-bitcoin/ <- git repo
django_bitcoin <- links to django-bitcoin/django_bitcoin

This isn't normal convention, but since I haven't yet released django_bitcoin 0.1, it can't be installed easier (or maybe can, I don't know much about python library packagin).

Note I know nothing about Django other than it seems to be one of those convention over specification languages that make me fringe Tongue

Well, in my programming career I have done something bigger at least with following technologies:

- Perl + CGI
- PHP/MySQL/PostgreSQL etc
- ASP.NET/C#
- Ruby on Rails
- Django

So far, I have found django the best in the longer term. Of course it has it quirks, and not everything is always so easy, but to get shit done fast, while still keeping some kind of maintainability it is the best I have found so far. However this is a very debatable and subjective issue, of course Smiley
legendary
Activity: 2324
Merit: 1125
I am having this issue: https://github.com/kangasbros/django-bitcoin-instawallet/issues/1

'currency_conversions' is not a valid tag library

Note I know nothing about Django other than it seems to be one of those convention over specification languages that make me fringe Tongue

I'm trying it out for the sole purpose of using this library.

I'll paste some extra info for you to help me.

Code:
TemplateSyntaxError at /wallet/xYkmN3ILm2xVHfaBfKoWPkXdFnLVT4FChdaNfDo8kZo

'currency_conversions' is not a valid tag library: Template library currency_conversions not found, tried django.templatetags.currency_conversions,django.contrib.staticfiles.templatetags.currency_conversions

Request Method: GET
Request URL: http://127.0.0.1:8000/wallet/xYkmN3ILm2xVHfaBfKoWPkXdFnLVT4FChdaNfDo8kZo
Django Version: 1.4
Exception Type: TemplateSyntaxError
Exception Value:

'currency_conversions' is not a valid tag library: Template library currency_conversions not found, tried django.templatetags.currency_conversions,django.contrib.staticfiles.templatetags.currency_conversions

Exception Location: /usr/lib/python2.7/dist-packages/django/template/defaulttags.py in load, line 1043
Python Executable: /usr/bin/python
Python Version: 2.7.2
Python Path:

['/home/ubuntu/django_projects/instawallet',
 '/usr/lib/python2.7',
 '/usr/lib/python2.7/plat-linux2',
 '/usr/lib/python2.7/lib-tk',
 '/usr/lib/python2.7/lib-old',
 '/usr/lib/python2.7/lib-dynload',
 '/usr/local/lib/python2.7/dist-packages',
 '/usr/lib/python2.7/dist-packages',
 '/usr/lib/python2.7/dist-packages/PIL',
 '/usr/lib/python2.7/dist-packages/gst-0.10',
 '/usr/lib/python2.7/dist-packages/gtk-2.0',
 '/usr/lib/pymodules/python2.7',
 '/usr/lib/python2.7/dist-packages/ubuntu-sso-client',
 '/usr/lib/python2.7/dist-packages/ubuntuone-client',
 '/usr/lib/python2.7/dist-packages/ubuntuone-control-panel',
 '/usr/lib/python2.7/dist-packages/ubuntuone-couch',
 '/usr/lib/python2.7/dist-packages/ubuntuone-installer',
 '/usr/lib/python2.7/dist-packages/ubuntuone-storage-protocol']

Server time: Fri, 30 Mar 2012 12:55:00 -0500

Code:
Error during template rendering

In template /home/ubuntu/django_projects/instawallet/templates/instawallet.html, error at line 2
'currency_conversions' is not a valid tag library: Template library currency_conversions not found, tried django.templatetags.currency_conversions,django.contrib.staticfiles.templatetags.currency_conversions
1 {% load i18n %}
[b]2 {% load currency_conversions %}[/b]
3
4
5 {% trans "Bitcoin Instawallet" %}: {{ instawallet.uuid }}
6
7
8

{% trans "Your instawallet" %}: {{ instawallet.uuid }}


9
10 {% if messages %}
11

    12 {% for message in messages %}

Code:
wsgi.version

(1, 0)

wsgi.multiprocess

False

RUN_MAIN

'true'

GNOME_DESKTOP_SESSION_ID

'this-is-deprecated'

SERVER_PROTOCOL

'HTTP/1.1'

SERVER_SOFTWARE

'WSGIServer/0.1 Python/2.7.2+'

SCRIPT_NAME

u''

LESSOPEN

'| /usr/bin/lesspipe %s'

REQUEST_METHOD

'GET'

USER

'ubuntu'

PATH

'/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games'

QUERY_STRING

''

GNOME_KEYRING_CONTROL

'/tmp/keyring-7YctUb'

DISPLAY

':0'

SSH_AGENT_PID

'1565'

LANG

'en_US.UTF-8'

HTTP_ACCEPT_CHARSET

'ISO-8859-1,utf-8;q=0.7,*;q=0.7'

TERM

'xterm'

SHELL

'/bin/bash'

XDG_SESSION_PATH

'/org/freedesktop/DisplayManager/Session0'

XAUTHORITY

'/home/ubuntu/.Xauthority'

SERVER_NAME

'localhost'

SESSION_MANAGER

'local/ubuntu-VirtualBox:@/tmp/.ICE-unix/1503,unix/ubuntu-VirtualBox:/tmp/.ICE-unix/1503'

SHLVL

'1'

MANDATORY_PATH

'/usr/share/gconf/ubuntu-2d.mandatory.path'

wsgi.url_scheme

'http'

REMOTE_ADDR

'127.0.0.1'

WINDOWID

'65011717'

SERVER_PORT

'8000'

GPG_AGENT_INFO

'/tmp/keyring-7YctUb/gpg:0:1'

HOME

'/home/ubuntu'

USERNAME

'ubuntu'

CONTENT_LENGTH

''

HTTP_CONNECTION

'keep-alive'

HTTP_PRAGMA

'no-cache'

CONTENT_TYPE

'text/plain'

SSH_AUTH_SOCK

'/tmp/keyring-7YctUb/ssh'

wsgi.multithread

True

GDMSESSION

'ubuntu-2d'

HTTP_CACHE_CONTROL

'no-cache'

HTTP_USER_AGENT

'Mozilla/5.0 (X11; Linux i686; rv:7.0.1) Gecko/20100101 Firefox/7.0.1'

HTTP_HOST

'127.0.0.1:8000'

GNOME_KEYRING_PID

'1494'

XDG_SEAT_PATH

'/org/freedesktop/DisplayManager/Seat0'

LESSCLOSE

'/usr/bin/lesspipe %s %s'

XDG_CURRENT_DESKTOP

'Unity'

DBUS_SESSION_BUS_ADDRESS

'unix:abstract=/tmp/dbus-mdqfvqExnC,guid=384384747a5a9860d09d3d4e000000fa'

_

'/usr/bin/python'

XDG_SESSION_COOKIE

'cb54f6a4f68957845b964efe00000005-1333128275.9951-864149598'

HTTP_ACCEPT

'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8'

DESKTOP_SESSION

'ubuntu-2d'

wsgi.file_wrapper

''

XDG_CONFIG_DIRS

'/etc/xdg/xdg-ubuntu-2d:/etc/xdg'

DEFAULTS_PATH

'/usr/share/gconf/ubuntu-2d.default.path'

UBUNTU_MENUPROXY

'libappmenu.so'

wsgi.run_once

False

CSRF_COOKIE

'YDqzd3rcTjK5JjYpmLyMMUczLaL7l2xf'

OLDPWD

'/home/ubuntu/django_projects/instawallet/django-bitcoin'

GATEWAY_INTERFACE

'CGI/1.1'

HTTP_ACCEPT_LANGUAGE

'en-us,en;q=0.5'

wsgi.input



wsgi.errors

', mode 'w' at 0xb772f0d0>

GTK_MODULES

'canberra-gtk-module:canberra-gtk-module'

XDG_DATA_DIRS

'/usr/share/ubuntu-2d:/usr/share/gnome:/usr/local/share/:/usr/share/'

PWD

'/home/ubuntu/django_projects/instawallet'

DJANGO_SETTINGS_MODULE

'instawallet.settings'

TZ

'America/Chicago'

COLORTERM

'gnome-terminal'

LS_COLORS

'rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lz=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.axa=00;36:*.oga=00;36:*.spx=00;36:*.xspf=00;36:'

REMOTE_HOST

''

HTTP_ACCEPT_ENCODING

'gzip, deflate'

PATH_INFO

u'/wallet/xYkmN3ILm2xVHfaBfKoWPkXdFnLVT4FChdaNfDo8kZo'

Code:
USE_L10N

True

BITCOIND_CONNECTION_STRING

'http://admin:1234@localhost:8332'

USE_THOUSAND_SEPARATOR

False

CSRF_COOKIE_SECURE

False

LANGUAGE_CODE

'en-us'

ROOT_URLCONF

'instawallet.urls'

MANAGERS

(('Jeremias Kangas', '[email protected]'),)

DEFAULT_CHARSET

'utf-8'

STATIC_ROOT

''

MESSAGE_STORAGE

'django.contrib.messages.storage.fallback.FallbackStorage'

EMAIL_SUBJECT_PREFIX

'[Django] '

FILE_UPLOAD_PERMISSIONS

None

URL_VALIDATOR_USER_AGENT

'Django/1.4 (https://www.djangoproject.com)'

STATICFILES_FINDERS

('django.contrib.staticfiles.finders.FileSystemFinder',
 'django.contrib.staticfiles.finders.AppDirectoriesFinder')

SESSION_COOKIE_DOMAIN

None

SESSION_COOKIE_NAME

'sessionid'

ADMIN_FOR

()

TIME_INPUT_FORMATS

('%H:%M:%S', '%H:%M')

DATABASES

{'default': {'ENGINE': 'django.db.backends.sqlite3',
             'HOST': '',
             'NAME': 'dev.db',
             'OPTIONS': {},
             'PASSWORD': u'********************',
             'PORT': '',
             'TEST_CHARSET': None,
             'TEST_COLLATION': None,
             'TEST_MIRROR': None,
             'TEST_NAME': None,
             'TIME_ZONE': 'America/Chicago',
             'USER': ''}}

SERVER_EMAIL

'root@localhost'

FILE_UPLOAD_HANDLERS

('django.core.files.uploadhandler.MemoryFileUploadHandler',
 'django.core.files.uploadhandler.TemporaryFileUploadHandler')

DEFAULT_CONTENT_TYPE

'text/html'

APPEND_SLASH

True

FIRST_DAY_OF_WEEK

0

DATABASE_ROUTERS

[]

YEAR_MONTH_FORMAT

'F Y'

STATICFILES_STORAGE

'django.contrib.staticfiles.storage.StaticFilesStorage'

CACHES

{'default': {'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',
             'LOCATION': ''}}

SESSION_COOKIE_PATH

'/'

USE_X_FORWARDED_HOST

False

MIDDLEWARE_CLASSES

('django.middleware.common.CommonMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware')

USE_I18N

True

THOUSAND_SEPARATOR

','

SECRET_KEY

u'********************'

LANGUAGE_COOKIE_NAME

'django_language'

DEFAULT_INDEX_TABLESPACE

''

TRANSACTIONS_MANAGED

False

LOGGING_CONFIG

'django.utils.log.dictConfig'

SEND_BROKEN_LINK_EMAILS

False

TEMPLATE_LOADERS

('django.template.loaders.filesystem.Loader',
 'django.template.loaders.app_directories.Loader')

WSGI_APPLICATION

None

TEMPLATE_DEBUG

True

X_FRAME_OPTIONS

'SAMEORIGIN'

AUTHENTICATION_BACKENDS

('django.contrib.auth.backends.ModelBackend',)

FORCE_SCRIPT_NAME

None

CACHE_BACKEND

'locmem://'

SIGNING_BACKEND

'django.core.signing.TimestampSigner'

SESSION_COOKIE_SECURE

False

CSRF_COOKIE_DOMAIN

None

FILE_CHARSET

'utf-8'

DEBUG

True

SESSION_FILE_PATH

None

DEFAULT_FILE_STORAGE

'django.core.files.storage.FileSystemStorage'

INSTALLED_APPS

('django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.sites',
 'django.contrib.messages',
 'django.contrib.staticfiles',
 'django_bitcoin',
 'wallets')

LANGUAGES

(('ar', 'Arabic'),
 ('az', 'Azerbaijani'),
 ('bg', 'Bulgarian'),
 ('bn', 'Bengali'),
 ('bs', 'Bosnian'),
 ('ca', 'Catalan'),
 ('cs', 'Czech'),
 ('cy', 'Welsh'),
 ('da', 'Danish'),
 ('de', 'German'),
 ('el', 'Greek'),
 ('en', 'English'),
 ('en-gb', 'British English'),
 ('eo', 'Esperanto'),
 ('es', 'Spanish'),
 ('es-ar', 'Argentinian Spanish'),
 ('es-mx', 'Mexican Spanish'),
 ('es-ni', 'Nicaraguan Spanish'),
 ('et', 'Estonian'),
 ('eu', 'Basque'),
 ('fa', 'Persian'),
 ('fi', 'Finnish'),
 ('fr', 'French'),
 ('fy-nl', 'Frisian'),
 ('ga', 'Irish'),
 ('gl', 'Galician'),
 ('he', 'Hebrew'),
 ('hi', 'Hindi'),
 ('hr', 'Croatian'),
 ('hu', 'Hungarian'),
 ('id', 'Indonesian'),
 ('is', 'Icelandic'),
 ('it', 'Italian'),
 ('ja', 'Japanese'),
 ('ka', 'Georgian'),
 ('kk', 'Kazakh'),
 ('km', 'Khmer'),
 ('kn', 'Kannada'),
 ('ko', 'Korean'),
 ('lt', 'Lithuanian'),
 ('lv', 'Latvian'),
 ('mk', 'Macedonian'),
 ('ml', 'Malayalam'),
 ('mn', 'Mongolian'),
 ('nb', 'Norwegian Bokmal'),
 ('ne', 'Nepali'),
 ('nl', 'Dutch'),
 ('nn', 'Norwegian Nynorsk'),
 ('pa', 'Punjabi'),
 ('pl', 'Polish'),
 ('pt', 'Portuguese'),
 ('pt-br', 'Brazilian Portuguese'),
 ('ro', 'Romanian'),
 ('ru', 'Russian'),
 ('sk', 'Slovak'),
 ('sl', 'Slovenian'),
 ('sq', 'Albanian'),
 ('sr', 'Serbian'),
 ('sr-latn', 'Serbian Latin'),
 ('sv', 'Swedish'),
 ('sw', 'Swahili'),
 ('ta', 'Tamil'),
 ('te', 'Telugu'),
 ('th', 'Thai'),
 ('tr', 'Turkish'),
 ('tt', 'Tatar'),
 ('uk', 'Ukrainian'),
 ('ur', 'Urdu'),
 ('vi', 'Vietnamese'),
 ('zh-cn', 'Simplified Chinese'),
 ('zh-tw', 'Traditional Chinese'))

COMMENTS_ALLOW_PROFANITIES

False

STATICFILES_DIRS

()

PREPEND_WWW

False

SECURE_PROXY_SSL_HEADER

None

SESSION_COOKIE_HTTPONLY

True

DEBUG_PROPAGATE_EXCEPTIONS

False

MONTH_DAY_FORMAT

'F j'

LOGIN_URL

'/accounts/login/'

SESSION_EXPIRE_AT_BROWSER_CLOSE

False

TIME_FORMAT

'P'

BITCOIN_MINIMUM_CONFIRMATIONS

0

DATE_INPUT_FORMATS

('%Y-%m-%d',
 '%m/%d/%Y',
 '%m/%d/%y',
 '%b %d %Y',
 '%b %d, %Y',
 '%d %b %Y',
 '%d %b, %Y',
 '%B %d %Y',
 '%B %d, %Y',
 '%d %B %Y',
 '%d %B, %Y')

CSRF_COOKIE_NAME

'csrftoken'

EMAIL_HOST_PASSWORD

u'********************'

PASSWORD_RESET_TIMEOUT_DAYS

u'********************'

CACHE_MIDDLEWARE_ALIAS

'default'

SESSION_SAVE_EVERY_REQUEST

False

ADMIN_MEDIA_PREFIX

'/static/admin/'

NUMBER_GROUPING

0

SESSION_ENGINE

'django.contrib.sessions.backends.db'

CSRF_FAILURE_VIEW

'django.views.csrf.csrf_failure'

CSRF_COOKIE_PATH

'/'

LOGIN_REDIRECT_URL

'/accounts/profile/'

PROJECT_ROOT

'/home/ubuntu/django_projects/instawallet'

LOGGING

{'disable_existing_loggers': False,
 'filters': {'require_debug_false': {'()': 'django.utils.log.RequireDebugFalse'}},
 'handlers': {'mail_admins': {'class': 'django.utils.log.AdminEmailHandler',
                              'filters': ['require_debug_false'],
                              'level': 'ERROR'}},
 'loggers': {'django.request': {'handlers': ['mail_admins'],
                                'level': 'ERROR',
                                'propagate': True}},
 'version': 1}

IGNORABLE_404_URLS

()

LOCALE_PATHS

()

TEMPLATE_STRING_IF_INVALID

''

LOGOUT_URL

'/accounts/logout/'

EMAIL_USE_TLS

False

FIXTURE_DIRS

()

EMAIL_HOST

'localhost'

DATE_FORMAT

'N j, Y'

MEDIA_ROOT

''

DEFAULT_EXCEPTION_REPORTER_FILTER

'django.views.debug.SafeExceptionReporterFilter'

ADMINS

(('Jeremias Kangas', '[email protected]'),)

FORMAT_MODULE_PATH

None

DEFAULT_FROM_EMAIL

'webmaster@localhost'

MEDIA_URL

''

DATETIME_FORMAT

'N j, Y, P'

TEMPLATE_DIRS

('/home/ubuntu/django_projects/instawallet/templates',)

SITE_ID

1

DISALLOWED_USER_AGENTS

()

ALLOWED_INCLUDE_ROOTS

()

DECIMAL_SEPARATOR

'.'

SHORT_DATE_FORMAT

'm/d/Y'

TEST_RUNNER

'django.test.simple.DjangoTestSuiteRunner'

CACHE_MIDDLEWARE_KEY_PREFIX

u'********************'

TIME_ZONE

'America/Chicago'

FILE_UPLOAD_MAX_MEMORY_SIZE

2621440

EMAIL_BACKEND

'django.core.mail.backends.smtp.EmailBackend'

DEFAULT_TABLESPACE

''

TEMPLATE_CONTEXT_PROCESSORS

('django.contrib.auth.context_processors.auth',
 'django.core.context_processors.debug',
 'django.core.context_processors.i18n',
 'django.core.context_processors.media',
 'django.core.context_processors.static',
 'django.core.context_processors.tz',
 'django.contrib.messages.context_processors.messages')

SESSION_COOKIE_AGE

1209600

SETTINGS_MODULE

'instawallet.settings'

USE_ETAGS

False

LANGUAGES_BIDI

('he', 'ar', 'fa')

FILE_UPLOAD_TEMP_DIR

None

INTERNAL_IPS

()

STATIC_URL

'/static/'

EMAIL_PORT

25

USE_TZ

False

SHORT_DATETIME_FORMAT

'm/d/Y P'

PASSWORD_HASHERS

u'********************'

ABSOLUTE_URL_OVERRIDES

{}

CACHE_MIDDLEWARE_SECONDS

600

DATETIME_INPUT_FORMATS

('%Y-%m-%d %H:%M:%S',
 '%Y-%m-%d %H:%M:%S.%f',
 '%Y-%m-%d %H:%M',
 '%Y-%m-%d',
 '%m/%d/%Y %H:%M:%S',
 '%m/%d/%Y %H:%M:%S.%f',
 '%m/%d/%Y %H:%M',
 '%m/%d/%Y',
 '%m/%d/%y %H:%M:%S',
 '%m/%d/%y %H:%M:%S.%f',
 '%m/%d/%y %H:%M',
 '%m/%d/%y')

EMAIL_HOST_USER

''

PROFANITIES_LIST

u'********************'
hero member
Activity: 714
Merit: 500
It turns out that the rpcpassword  are too long...

Thanks for your help, man.

You are doing great contribution to this community.
hero member
Activity: 812
Merit: 1006
hero member
Activity: 714
Merit: 500
Have you checked the credentials you supplied in your bitcoind connection string?

BITCOIND_CONNECTION_STRING = "http://login:password@domain:8332"

I think that changing the version doesn't necessarily help that much...

Example bitcoin.conf:

testnet=1
server=1
rpcuser=TESTUSER
rpcpassword=TESTPW
rpcallowip=*
gen=0

Yes, the BITCOIND_CONNECTION_STRING is correct,
and the bitcoind.conf is correct too, except testnet =1
I've tested it remotely with SafeBit, it's working fine.

This is the traceback.

Code:
Environment:


Request Method: GET
Request URL: http://finway.org:8888/wallet/VSoAMlWrQUPLENYNHRZDsJXHcEp5jwawnh6qIaLY8EM

Django Version: 1.3.1
Python Version: 2.7.2
Installed Applications:
['django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.sites',
 'django.contrib.messages',
 'django.contrib.staticfiles',
 'django_bitcoin',
 'wallets']
Installed Middleware:
('django.middleware.common.CommonMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware')


Template error:
In template /home/finway/instawallet/templates/instawallet.html, error at line 22
   Caught ValueError while rendering: No JSON object could be decoded
   12 :     {% for message in messages %}


   13 :     {{ message }}


   14 :     {% endfor %}


   15 :


   16 : {% endif %}


   17 :


   18 : {% wallet_tagline instawallet.wallet %}



   19 :


   20 : {% trans "Send bitcoins to following address to receive coins" %}:


   21 :


   22 :  {% bitcoin_payment_qr instawallet.wallet.receiving_address %}


   23 :


   24 :

{% trans "Send payments" %}




   25 :


   26 :
{% csrf_token %}


   27 : {{ form.as_p }}


   28 :


   29 :



   30 :


   31 :

{% trans "Transaction log" %}




   32 :


Traceback:
File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py" in get_response
  111.                         response = callback(request, *callback_args, **callback_kwargs)
File "/home/finway/instawallet/wallets/views.py" in wallet
  59.         }, context_instance=RequestContext(request))
File "/usr/local/lib/python2.7/dist-packages/django/shortcuts/__init__.py" in render_to_response
  20.     return HttpResponse(loader.render_to_string(*args, **kwargs), **httpresponse_kwargs)
File "/usr/local/lib/python2.7/dist-packages/django/template/loader.py" in render_to_string
  188.         return t.render(context_instance)
File "/usr/local/lib/python2.7/dist-packages/django/template/base.py" in render
  123.             return self._render(context)
File "/usr/local/lib/python2.7/dist-packages/django/template/base.py" in _render
  117.         return self.nodelist.render(context)
File "/usr/local/lib/python2.7/dist-packages/django/template/base.py" in render
  744.                 bits.append(self.render_node(node, context))
File "/usr/local/lib/python2.7/dist-packages/django/template/debug.py" in render_node
  73.             result = node.render(context)
File "/usr/local/lib/python2.7/dist-packages/django/template/base.py" in render
  915.                     resolved_vars = [var.resolve(context) for var in self.vars_to_resolve]
File "/usr/local/lib/python2.7/dist-packages/django/template/base.py" in resolve
  653.             value = self._resolve_lookup(context)
File "/usr/local/lib/python2.7/dist-packages/django/template/base.py" in _resolve_lookup
  698.                             current = current()
File "/home/finway/instawallet/django_bitcoin/models.py" in receiving_address
  302.         addr=new_bitcoin_address()
File "/usr/local/lib/python2.7/dist-packages/django/db/transaction.py" in inner
  217.                 res = func(*args, **kwargs)
File "/home/finway/instawallet/django_bitcoin/models.py" in new_bitcoin_address
  90.         refill_payment_queue()
File "/home/finway/instawallet/django_bitcoin/models.py" in refill_payment_queue
  409.             bp.address=bitcoind.create_address()
File "/home/finway/instawallet/django_bitcoin/utils.py" in create_address
  47.             for_account or self.account_name, *args, **kwargs)
File "/home/finway/instawallet/django_bitcoin/jsonrpc/authproxy.py" in __call__
  95.         resp = json.loads(httpresp.read(), parse_float=decimal.Decimal)
File "/usr/lib/python2.7/json/__init__.py" in loads
  339.     return cls(encoding=encoding, **kw).decode(s)
File "/usr/lib/python2.7/json/decoder.py" in decode
  366.         obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python2.7/json/decoder.py" in raw_decode
  384.             raise ValueError("No JSON object could be decoded")

Exception Type: TemplateSyntaxError at /wallet/VSoAMlWrQUPLENYNHRZDsJXHcEp5jwawnh6qIaLY8EM
Exception Value: Caught ValueError while rendering: No JSON object could be decoded
Pages:
Jump to: