'create text for django class without importing all django code
I am writing a desktop application around objects that will be downloaded from a django website. On the desktop application I will load a json file coming from the website. Therefore I need a set of classes in my desktop application , lets call them WClassA, wClassB, .... and a set of classes in my django application DClassA, DClassB. I would like to avoid to write the classes twice.
What is the solution to avoid code duplication? I cannot import Django classes in my application because this would require to import all django. I thought about defining having a "fake django" Model file in my desktop application. But it loos kind of dirty.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
