Michael van Tellingen
aafcc8a901
flake8
9 лет назад
Michael van Tellingen
8c32aaf3d9
Replace last occurences of django-dynamic-fixture with factory-boy
10 лет назад
David Winterbottom
2b94a8fc1e
Rework how addresses are cleaned
Plus reorganise tests
12 лет назад
Izidor Matušov
019598deab
Validate postcodes based on the country
Validation is based on wikipedia list of postal codes [1]. Formats were
converted into regexes for countries.
1: http://en.wikipedia.org/wiki/List_of_postal_codes
Fixes #753
12 лет назад
David Winterbottom
a9f7622e1b
Fix Django 1.5 tests caused by using wrong User model
12 лет назад
David Winterbottom
e462f04fd2
Ensure user addresses are unique per user
This change adds a uniqueness constraint on user addresses to prevent
duplicates. A few changes follow:
- The user address forms in account and checkout are modified to take a
user as a constructor arg so uniqueness can be checked.
- The assignment of a user when creating a new address has been moved
into the form.
12 лет назад
David Winterbottom
40c79bec07
Moar unit tests for the UserAddress model
Also I moved the generate_hash fn up to the Address superclass as it's
possible that it might be used in other Address classes.
12 лет назад
David Winterbottom
f13df6ff65
Reorganise address tests
12 лет назад