Comments (5)
You should be able to override provider/authorize.html
template with the vanilla Django template override mechanisms. IIRC, the rest of the views simply return redirects or HTTP error codes, so there isn't much point in customizing those templates.
Please note that this project is dead - use Django OAuth Toolkit if you can. I am on mobile so please forbive me for any spelling errors and for not linking to DOT.
from django-oauth2-provider.
I found a way, overriding url and specifing my own template.
This line must be placed before oauth urls
url(r'^oauth2/authorize/confirm/?$', login_required(Authorize.as_view(template_name='oauth2/authorize.html'))), # This one overrides template.
url(r'^oauth2/', include('provider.oauth2.urls', namespace='oauth2')), # OAuth URLs
Actually I'm planning to switch to Oauth Toolkit since it has some options I need, I didn't know this project has dead. I'm using this since I found it in tastypie cookbook section.
from django-oauth2-provider.
Yep, that is the vanilla Django template override mechanism. π
Do you remember which section of the Tastypie, cookbook section that linked here? Sounds like their documentation could use an update.
Also, the Tastypie author has expressed some concerns with the future of Tastypie, so you may want to consider using an alternative REST framework like DRF or Restless.
from django-oauth2-provider.
Oh, I didn't know it's called "vanilla Django template override mechanism", good to know π
And about cookbok, they refer to an old tutorial here
Actually we're planning to migrate to django rest framework. But I'm still making some changes using old libraries meanwhile since project owner needs to show a demo soon.
from django-oauth2-provider.
It's not really called that, it's just the normal way to override templates with Django. I'll see what I can do about updating that documentation to point elsewhere. The fewer links to this (dead) project, the better.
And if anybody has the proper access, this issue can be closed.
from django-oauth2-provider.
Related Issues (20)
- authorize endpoint doesn't seem to support "token" response type (implicit grant) HOT 7
- Timing Leaks in authenticate() HOT 1
- [QUESTION] Support for this project HOT 2
- Django 1.8 migrations are broken HOT 1
- Curl doesn't return access token HOT 1
- Django 1.8.6 migration error HOT 1
- Cannot get refresh token
- oauth2_provider_application
- provider.oauth2 seems not to appear when added from pip on settings.py HOT 4
- Needs an Update
- not working with django>=1.9 HOT 3
- Error messages translation
- django next url γError: invalid_request Missing client_id parameter.γ
- Invalid grant
- Refresh token not returned HOT 1
- "Invalid credentials given" -> How can I set this message?
- There should be a way to keep user logged in at one device only.
- Project is Dead. Need a Migration Plan HOT 1
- Premature pull request and more updates incoming
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-oauth2-provider.