Giter Club home page Giter Club logo

python-money's People

python-money's Issues

Division of Money and int results in Decimal instead of Money

What steps will reproduce the problem?
1. m = Money(2, "EUR")
2. m * 2 => EUR  4.00, this is correct
3. m / 2 => Decimal('1') this is NOT correct, type should be Money not Decimal

What is the expected output? What do you see instead?

Division of Money to int/float should also be Money (similar to 
multiplication). Instead the result is Decimal

What version of the product are you using? On what operating system?

Bug was discovered in svn version r25


Original issue reported on code.google.com by [email protected] on 21 Aug 2010 at 4:40

DeprecationWarning

Python26\lib\site-packages\money\django\models\fields.py:43: 
DeprecationWarning: A Field class whose get_db_prep_save method hasn't been 
updated to take a `connection` argument.

What steps will reproduce the problem?
1. Django 1.3
2. Python 2.6

Original issue reported on code.google.com by [email protected] on 29 Aug 2011 at 6:24

import fails in python 3.3

What steps will reproduce the problem?
1. install py-moneyed using pip
2. import moneyed

What is the expected output? What do you see instead?
  Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "c:\Program Files\Python33\lib\site-packages\moneyed\__init__.py", line 1, in <module>
    from classes import *
ImportError: No module named 'classes'

What version of the product are you using? On what operating system?
Python 3.3 on windows 7 64-bit

Please provide any additional information below.

Original issue reported on code.google.com by [email protected] on 19 Feb 2013 at 5:23

no setup.py

There is no setup.py script. This prevents from setup with pip or 
easy_install.

Original issue reported on code.google.com by [email protected] on 16 Mar 2010 at 1:34

Currency selection widget fails to render choices

When a MoneyField is used in a model and rendered on the admin interface in an 
'inline' relationship, it works fine on the first page rendered.  Subsequent 
pages fail to correctly render the field.

Correct on first page load:
<select name="itemprice_set-1-price_currency">
<option value="AUD" selected="selected">Australian Dollar</option>
<option value="EUR">Euro</option>
<option value="USD">US Dollar</option>
</select>

Incorrect subsequent page loads:
<select name="itemprice_set-__prefix__-price_currency">
</select>

Original issue reported on code.google.com by [email protected] on 19 May 2011 at 10:48

Limit django widget currency choices

There are a lot of currencies available to choose from which makes for long 
selection combo boxes.

Add a django settings directive to limit the choices.

Example:

MONEY_CURRENCY_CHOICES = ['USD', 'AUD', 'EUR']


Original issue reported on code.google.com by [email protected] on 18 May 2011 at 6:59

Installation instructions

I downloaded the package and it looks just like the thing I need, but it
provides no installation instructions.. if you could provide instructions
on how to install the module, and integrate with django that would be very
helpfull.

I run ubuntu 8.10, but you should probably try and include more general
instructions.


Original issue reported on code.google.com by [email protected] on 17 Jul 2008 at 4:35

Django exchange rate settings

Add a MONEY_EXCHANGE_RATE directive to the django settings.py to provide some 
initial/static exchange rates.

Each exchange rate will be specified in a currency code, exchange rate tuple.  
The exchange rate will be expressed as a multiple of the DEFAULT_CURRENCY.

eg.

    MONEY_DEFAULT_EXCHANGE_RATE = 'AUD'
    MONEY_EXCHANGE_RATES = [('AUD', 1.0), ('USD', 0.940026321) .... ]

where 1 USD = 0.940026321 AUD

This is the simplest method for supplying exchange rate data for now.  It will 
be desirable to have this editable via the admin interface etc, or possibly 
even live but these may be outside the scope of this project.

Original issue reported on code.google.com by [email protected] on 19 May 2011 at 10:43

Invalid literal for Decimal: ''

What steps will reproduce the problem?
1. Using django-cashflow to create new account.

What is the expected output? What do you see instead?
Expected: Create successfully.
Real: decimal.InvalidOperation: Invalid literal for Decimal: ''

What version of the product are you using? On what operating system?
contrib.Money r5
Ubuntu 8.10

Solution: in Money.py:
115     def __eq__(self, other):
116         if isinstance(other, Money):
117             return (self.amount == other.amount) and (self.currency ==
other.currency)
118         #return (self.amount == Decimal(str(other)))
119         return (self.amount == Decimal(str(other or 0))) # use it
instead to avoid error when other=''


Original issue reported on code.google.com by [email protected] on 31 May 2009 at 4:01

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.