Comments (7)
I've got an idea to introduce a new setting and load InvoiceCreator
based on it:
OSCAR_INVOICES_INVOICE_CREATOR = getattr(settings, 'OSCAR_INVOICES_INVOICE_CREATOR', 'oscar_invoices.InvoiceCreator')
WDYT @samitnuk @specialunderwear ?
from django-oscar-invoices.
BTW are you guys both having the same idea? Or are you trying to push this feature???
Yeah, I've reviewed again the whole thread and realized that @samitnuk proposed the same at the beginning 😄 .
from django-oscar-invoices.
I think we can add the ability to set custom InvoiceCreator
from settings as we did for custom invoice model.
@sasha0 @specialunderwear WDYT?
from django-oscar-invoices.
You can not use get_class with only 2 namespace levels
Not ideal, but I found a workaround:
get_class("oscar_invoices.utils", "InvoiceCreator")
This way Oscar will try to load class from the local module.
from django-oscar-invoices.
That seems pretty ok to me
from django-oscar-invoices.
Hmm sorry, but how can you override the InvoiceCreator if we import like that?
Should I make a package like:
test/oscar_invoices/utils.py
and put
test.oscar_invoices into INSTALLED_APPS?
from django-oscar-invoices.
Hi we allready use the current method, which works in our stack. I don't think having 2 different methods would be a good idea. BTW are you guys both having the same idea? Or are you trying to push this feature???
from django-oscar-invoices.
Related Issues (9)
- key error when adding new invoice HOT 1
- not possible to use own OSCAR_INVOICES_INVOICE_MODEL HOT 2
- raise Error if create_invoice() does nothing... HOT 1
- Potential race-conditions -> Duplicated Invoice Numbers ??? HOT 5
- Remove `run_concurrently` test util when support for Oscar 1.6 will be dropped
- execution error HOT 1
- Do not depend on psycopg2 HOT 1
- django-oscar-invoices incompatible with latest version of django-oscar
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from django-oscar-invoices.