Bitcoin Forum
December 05, 2016, 12:45:57 PM *
News: Latest stable version of Bitcoin Core: 0.13.1  [Torrent].
 
   Home   Help Search Donate Login Register  
Pages: « 1 [2]  All
  Print  
Author Topic: Tutorial: creating a bitcoin instawallet clone with python and django  (Read 7912 times)
EskimoBob
Legendary
*
Offline Offline

Activity: 910


Quality Printing Services by Federal Reserve Bank


View Profile
April 22, 2012, 07:55:27 AM
 #21

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 

While reading what I wrote, use the most friendliest and relaxing voice in your head.
BTW, Things in BTC bubble universes are getting ugly....
1480941957
Hero Member
*
Offline Offline

Posts: 1480941957

View Profile Personal Message (Offline)

Ignore
1480941957
Reply with quote  #2

1480941957
Report to moderator
1480941957
Hero Member
*
Offline Offline

Posts: 1480941957

View Profile Personal Message (Offline)

Ignore
1480941957
Reply with quote  #2

1480941957
Report to moderator
1480941957
Hero Member
*
Offline Offline

Posts: 1480941957

View Profile Personal Message (Offline)

Ignore
1480941957
Reply with quote  #2

1480941957
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1480941957
Hero Member
*
Offline Offline

Posts: 1480941957

View Profile Personal Message (Offline)

Ignore
1480941957
Reply with quote  #2

1480941957
Report to moderator
1480941957
Hero Member
*
Offline Offline

Posts: 1480941957

View Profile Personal Message (Offline)

Ignore
1480941957
Reply with quote  #2

1480941957
Report to moderator
EskimoBob
Legendary
*
Offline Offline

Activity: 910


Quality Printing Services by Federal Reserve Bank


View Profile
April 22, 2012, 08:30:23 AM
 #22

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:
<a href="bitcoin:'bitcoin address here'?amount='amount here'&label='label here' ">bitcoin me!</a>
 
(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:
<a href="https://:wallet_serviceURL?amount='amount here'&label='Tip for the article' ">Bitcoin tip!</a>

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.

While reading what I wrote, use the most friendliest and relaxing voice in your head.
BTW, Things in BTC bubble universes are getting ugly....
FreeMoney
Legendary
*
Offline Offline

Activity: 1246


Strength in numbers


View Profile WWW
April 23, 2012, 01:16:20 AM
 #23

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?

Play Bitcoin Poker at sealswithclubs.eu. We're active and open to everyone.
molecular
Donator
Legendary
*
Offline Offline

Activity: 2128



View Profile
April 23, 2012, 09:06:33 AM
 #24

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.

PGP key molecular F9B70769 fingerprint 9CDD C0D3 20F8 279F 6BE0  3F39 FC49 2362 F9B7 0769
kangasbros
Hero Member
*****
Online Online

Activity: 811



View Profile
April 23, 2012, 06:27:25 PM
 #25

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.

dadj
Full Member
***
Offline Offline

Activity: 175


View Profile WWW
June 29, 2012, 04:44:07 AM
 #26

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'

https://monerodice.net/ play dice privately and securely
dadj
Full Member
***
Offline Offline

Activity: 175


View Profile WWW
June 29, 2012, 06:47:55 AM
 #27

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?

https://monerodice.net/ play dice privately and securely
dadj
Full Member
***
Offline Offline

Activity: 175


View Profile WWW
June 29, 2012, 07:01:06 AM
 #28

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?

https://monerodice.net/ play dice privately and securely
kangasbros
Hero Member
*****
Online Online

Activity: 811



View Profile
July 14, 2012, 10:44:40 AM
 #29

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.

dadj
Full Member
***
Offline Offline

Activity: 175


View Profile WWW
July 14, 2012, 02:18:56 PM
 #30

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?

https://monerodice.net/ play dice privately and securely
kangasbros
Hero Member
*****
Online Online

Activity: 811



View Profile
July 14, 2012, 03:19:28 PM
 #31

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

Pages: « 1 [2]  All
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!