Wykres commitów

176 Commity (master)

Autor SHA1 Wiadomość Data
Nick Moreton cfd2df17e0
Deals with the deprecation of request.site in wagtail 2.9 (#488) 2023-08-13 09:17:47 +01:00
Nick Moreton 7d4c22ca64
Developer docs update (#487)
* Add .nvmrc file to longclaw/client to keep us all on the same version of node

It's also inline with the version of node that is used in the github actions workflow

* Adding some further documentation to the README.md

It should help people to understand the current status of the project and
how to get started with development.

* Let github actions run on all branches
2023-07-10 11:53:55 +02:00
Nick Moreton 33f02445ef
Initial testing fixes (#485)
* Test py 37,38,39 (#1) dj 22 wt 211,212,213

* Fixes the template include issue with the lock/unlock menu item

* Pin the upper bound of the supported Wagtail version to 2.13 and Django to 2.2

* Add some initial documentation for development setup
2023-07-07 15:00:12 +02:00
patagoniapy 2873f51c8c
Update utils.py (#343)
Co-authored-by: James Ramm <JamesRamm@users.noreply.github.com>
2021-10-25 14:32:03 +02:00
Blake Gilmore f8d4de7eac
Remove duplicate FieldPanel (#345)
Co-authored-by: James Ramm <JamesRamm@users.noreply.github.com>
2021-10-25 14:31:28 +02:00
jan-capek 9178fb990a
fix: AppConfig full paths (#394)
Co-authored-by: Jan Capek <jan@webtune.net>
Co-authored-by: James Ramm <JamesRamm@users.noreply.github.com>
2021-10-25 14:27:47 +02:00
Brady 1dfb817ecb Jinja2 Tag Support (#268)
* first stab at adding jinja2 tag support

* prefer relative imports
2019-11-30 10:42:07 +01:00
thenewguy 85e4cfed61 Issue 219 calculated rates base class (#230)
* add test for get_shipping_cost with a basket rate

* add fields to allow us to tie shipping rate to a basket & address

* add test for testing specified address and basket

* add migration for new shipping rate fields

* add missing import

* fix name errors

* add shipping possibilities based on shipping address and basket id

* test basket, shipping address, & basket+shipping address rate assignment

* return correct rates for basket and address rate cases

* rename shipping rate address for clarity (origin/destination)

* send basket modified signal when basket is modified via api endpoints

* test address only rate

* remove basket rates when the basket_modified signal is sent

* show response content on error

* print response content on failure for more tests and include more 200
statuses for put

* getting different status codes back from our endpoints, check success

* clear shipping rates based on destination address when address modified

* allow get params

* return cost and rate options for more cases (test not complete)

* fix mock

* return applicable shipping options and test some combinations

* stub the rate processor interface

* add fk from rate to processor that created it

* set rate basket and destination

* shipping processor instance can apply to more than one country

* run processor get_rates if configured

* let child models handle assignment

* add some initial testing for processor

* rename _get_rates() to process_rates()

* allow disabling the success check

* test country shipping option with processor requires destination

* test that the endpoint calls get_rate on the processor

* test that multiple processors are called once

* add shipping_origin fk to site settings

* add default cache key based on origin, destination, & basket items

* test a trivial rate processor implementation is used

* test cost endpoint returns the processed rate

* pin version requirement

* fix wagtail version

* start vagrant config

* get tox to run

* install nvm for vagrant user

* add instructions to move npm deps off shared folder for speed

* compact into a shell script for ease of use

* add some more examples as temporary documentation

* tests require dev reqs

* clean this up a little

* add migrations for productrequest app to fix test runner

* raise exception on error instead of returning error response

* test exception raised when country and country code specified

* test for destination address does not exist

* test exception when country and country code are not supplied

* set request.site as it is expected

* test get_shipping_cost_kwargs with only country code

* check the basket id and the settings

* value passed for country is supposed to be PK

* test with country specified

* write test so we can test with iso as string of known value

* tes destination is respected

* test with destination and country code

* test shipping_rate_name is set as name

* move models

* rename models.py

* rename to be consistent with rates being plural

* move serializers

* move models

* ignore private vagrant subdir

* move code around to fix circular imports to allow top level imports

* move address serializer import to top level

* ws

* ws
2019-11-06 13:46:07 +01:00
thenewguy 98d39540fe add migrations for productrequest app to fix test runner (#259) 2019-10-06 11:16:20 +02:00
JamesRamm 2594246221 Fixes #256, Fixes #248 2019-09-22 12:33:34 +02:00
JamesRamm 44b49e07f4 Bump version: 1.0.1 → 1.0.2 2019-03-28 21:12:42 +01:00
JamesRamm 4c59050350 Bump version: 1.0.0 → 1.0.1 2019-03-28 20:13:58 +01:00
JamesRamm b4f552860d Documentation updates 2019-01-16 07:35:27 +01:00
James Ramm 9188b3e10c
Fixes #210
Bump the version
2019-01-08 20:32:38 +01:00
JamesRamm 7f9648546d Product index with price 2019-01-06 19:12:45 +01:00
JamesRamm cd64f01ba7 Improve project template HTML starters 2019-01-06 15:37:28 +01:00
JamesRamm eb4215cc53 Correct name of template in project setup 2019-01-06 12:13:03 +01:00
JamesRamm b0238018ad Update project template to show images 2019-01-05 22:45:56 +01:00
James Ramm 356833b484 Add explicit checks for existence of JS. Fixes #165 2018-12-28 15:52:37 +01:00
James Ramm fdacf23803 Gitbook setup 2018-12-28 11:05:31 +01:00
jamesramm 52ee54d9e6
GitBook: [master] 8 pages modified 2018-12-28 09:46:53 +00:00
James Ramm 4a33b63d4c Fixes #130 2018-12-28 09:55:57 +01:00
James Ramm 8ff51b9274
Longclaw 1.0 (#205)
* Compatibility with Wagtail 2 and Django 2
* Fixes #154 

Wagtail 2 compatibility:

* Fixes references to Wagtail packages which use the `wagtail.wagtail*` naming scheme. Wagtail 2 removes the redundancy.
* Wraps imports in `try`/`except` blocks to maintain compatibility with Wagtail 1.

Django 2 comaptibility:

Included because Wagtail 2 adds support for Django 2.

* Adds `on_delete` to all `ForeignKey` model fields, which is now required by Django 2.

* Updates for wagtail 2

* rename modules

* Longclaw v2: Rename and new migrations

* Longclaw 2: Reduce fails to 2 errors

* Longclaw v2: All tests passing

* Update travisconf

* Travis: Enable py37

* Update project template for v2

* longclawv2: update project template

* Fix migrations for longclaw 2

* Corrections in project template for longclaw1.0

* Correct location of templates and update docs

* Automatically load shipping countries

* Add loadcountries command

* Add info on loading country data
2018-12-26 12:58:05 +01:00
Samuel Murillo a3493a6293 Fix #164 (#171) 2018-06-02 13:36:30 +02:00
Sidney F. Guaro 5db44a30c3 [FIX] RE: quantity in api.BasketViewSet.destroy gets unicode instead of int (#170)
* [FIX] quantity in api.BasketViewSet.destroy gets unicode instead of int

* from rest_framework.decorators import detail_route, list_route
from rest_framework import permissions, status, viewsets
from rest_framework.response import Response
from longclaw.longclawbasket.models import BasketItem
from longclaw.longclawbasket.serializers import BasketItemSerializer
from longclaw.longclawbasket import utils
from longclaw.utils import ProductVariant

class BasketViewSet(viewsets.ModelViewSet):

* [FIX] RE: quantity in api.BasketViewSet.destroy gets unicode instead of int
2018-05-30 18:59:31 +02:00
Sidney F. Guaro ee5ae8ebe8 [FIX] quantity in api.BasketViewSet.destroy gets unicode instead of int (#168) 2018-05-22 21:19:59 +02:00
JamesRamm 22538ee331 Reverse argument ordering for py34. #146 2018-03-24 07:49:18 +01:00
JamesRamm d7f5bd46a9 Bump version: 0.2.0 → 0.2.1 2018-03-23 22:15:50 +01:00
JamesRamm 9e3edccf00 Switch to en-gb, en-us might not be recognized. #146 2018-03-23 22:11:09 +01:00
JamesRamm 5c224d8aff Fixes #96 and drops django 1.9 2018-03-23 22:08:34 +01:00
JamesRamm 6c239d7b9f Pin wagtail version to last 1.x release to get latest bugs for travis tests 2018-03-23 22:06:45 +01:00
JamesRamm b9747a3a9b Fixing errors from travis. #146 2018-03-23 21:50:38 +01:00
BenSturmfels f498ac084c Fix orders not showing up in admin. (#153)
This change anchors the longclaworders API URLs with a '^' to ensure they can't
confusingly match 'ANYTHING/api/order/...'. Also forces the order loading
JavaScript to use an absolute URL.

I'm not sure that this is the best architectural solution, but it resolves the
issues I'm having at least.

Fixes #131.
2018-03-23 19:56:57 +01:00
JamesRamm bcc0c3edfc Migration 2017-12-19 11:35:50 +01:00
Alex 1881e4b9ed Correct date return month_start, month_end (#107)
Changes solve the problem of the incorrect date to "def current_month()". The error occured due to incorrect date format month_start.
2017-12-04 15:00:25 +01:00
JamesRamm 5392ff6a12 Adds an api method for replacing the basket contents, for #75 2017-10-21 19:21:15 +02:00
JamesRamm 6864f5842d fixes 2017-10-15 19:06:21 +02:00
James Ramm 048e716db1 Product Requests (#95)
* Fixes #49
2017-10-10 19:49:56 +01:00
JamesRamm d790fecf1e Triple quotes on docstrings are pep257 2017-10-01 12:19:37 +02:00
JamesRamm d0f789df6c Test for remove_stale_baskets 2017-10-01 12:11:47 +02:00
James Ramm 944c887306 Order refunds (#93)
Basic refund mechanism. Fixes #40
2017-10-01 12:01:40 +02:00
JamesRamm b0a85b8ee4 Test and correction for ctx processor 2017-09-30 00:11:46 +02:00
JamesRamm 1d05882d46 Test for daily sales 2017-09-30 00:08:58 +02:00
JamesRamm 9cdae9b19e Test for daily sales 2017-09-30 00:07:00 +02:00
JamesRamm f3f9e5f853 Rewrite migration history for tests 2017-09-29 19:26:50 +02:00
James Ramm 966831f589 Fixes #71 (#92) 2017-09-29 19:00:37 +02:00
JamesRamm dcde8102a2 Fixes #90 2017-09-29 18:48:52 +02:00
JamesRamm 1c8238d747 Update reqs for project template 2017-09-29 16:28:46 +02:00
JamesRamm 9ab146f594 Update migration for new products app 2017-09-22 16:32:08 +02:00
JamesRamm 8c9d69b16f Correct migration in project template 2017-09-22 16:24:07 +02:00