djangorestframework-api-key
                                
                                
                                
                                    djangorestframework-api-key copied to clipboard
                            
                            
                            
                        Explore swappable API key model functionality
This is an illustration of a possible resolution for #180.
- Allows users to define a default API key model they'd like to use.
 - If "a default API key model" does not make sense for their use case (e.g. maybe they have multiple custom API key models), then the default 
APIKeymodel would still get created. I'm not sure there's a sensible way out of this, because allowing dropping the model midways, e.g. viaAPI_KEY_MODEL = None, would add migration questions for existing apps. - However, this PR also proposes to not 
register()any API key models by default, meaning at least they wouldn't see it in the admin. It's possible we want this to be a separate, isolated PR. 
This would be a fully backwards-compatible change, as the default behavior would match the existing APIKey-based behavior — except for the admin dropout, which we'd need to document as a change.
cc @virogenesis What do you think about this?
Codecov Report
Merging #191 (5f20bf9) into master (dd806cf) will decrease coverage by
0.66%. The diff coverage is78.94%.
@@            Coverage Diff             @@
##           master     #191      +/-   ##
==========================================
- Coverage   96.55%   95.88%   -0.67%     
==========================================
  Files          22       22              
  Lines         522      535      +13     
==========================================
+ Hits          504      513       +9     
- Misses         18       22       +4     
| Impacted Files | Coverage Δ | |
|---|---|---|
| src/rest_framework_api_key/models.py | 96.00% <75.00%> (-4.00%) | 
:arrow_down: | 
| src/rest_framework_api_key/admin.py | 76.00% <100.00%> (-0.93%) | 
:arrow_down: | 
| src/rest_framework_api_key/permissions.py | 94.73% <100.00%> (ø) | 
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update dd806cf...5f20bf9. Read the comment docs.