20👍
✅
Depending on what you need:
>>> import rest_framework
>>> print rest_framework.VERSION
'3.1.3'
Or:
$ pip freeze
...
djangorestframework==3.1.3
...
- Django sub-applications & module structure
- Django media files not showing with Debug = False on production – Django 1.10
- How to embed matplotlib graph in Django webpage?
2👍
if you have to install pip in the project then run this command and check the version
pip show djangorestframework
you can see in the picture
- How can i change django admin to rtl style
- How do I get a "debug" variable in my Django template context?
1👍
In Python you can use variable __version__
or VERSION
(check source):
>>> import rest_framework
>>>
>>> rest_framework.__version__
'3.9.2'
>>> rest_framework.VERSION
'3.9.2'
In your shell you can use combination of pip and grep:
$ pip freeze | grep djangorestframework==
djangorestframework==3.9.2
👤jozo
- Django queryset __contains case sensitive?
- How to test (using unittest) the HTML output of a Django view?
- Django filter a ForeignKey field when it is null
- How to properly query a ManyToManyField for all the objects in a list (or another ManyToManyField)?
Source:stackexchange.com