littlepea / django-docs Goto Github PK
View Code? Open in Web Editor NEWAllows to serve Sphinx generated docs from django.
License: BSD 3-Clause "New" or "Revised" License
Allows to serve Sphinx generated docs from django.
License: BSD 3-Clause "New" or "Revised" License
Django 2.1 depreciated contrib.auth.views.login() causing an error in docs\views.py", line 14 import
after checking my project by "manage.py check" I've found this warning
/usr/local/lib/python2.7/dist-packages/docs/urls.py:6: RemovedInDjango110Warning: django.conf.urls.patterns() is deprecated and will be removed in Django 1.10. Update your urlpatterns to be a list of django.conf.urls.url() instances instead.
url(r'^(?P.*)$', serve_docs, name='docs_files'),
resolution - https://docs.djangoproject.com/en/1.9/ref/urls/#django.conf.urls.url
Using django 1.8 and 1.9
i followed steps do i need to generate sphinx docs from sphinx tool before this package serves it?
because now it says does not exist?
Hey, is there any way you can update pypy so we can install this using pip?
Also most of the issues with Django 2.0 seem to be resolved which means many of the issues currently can be closed.
This happens using sphinx autodoc in docs/views.py", line 18, see traceback:
WARNING: autodoc: failed to import module 'urls' from module 'project'; the following exception was raised:
Traceback (most recent call last):
File "~/.virtualenvs/project/lib/python3.6/site-packages/sphinx/ext/autodoc/importer.py", line 70, in import_module
return importlib.import_module(modname)
File "/usr/lib/python3.6/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 994, in _gcd_import
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 678, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "~/Sync/Laptop/zzp/go2people/local/project/src/project/project/urls.py", line 74, in <module>
path(settings.DOCS_URL, include('docs.urls')),
File "~/.virtualenvs/project/lib/python3.6/site-packages/django/urls/conf.py", line 34, in include
urlconf_module = import_module(urlconf_module)
File "/usr/lib/python3.6/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 994, in _gcd_import
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 678, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "~/.virtualenvs/project/lib/python3.6/site-packages/docs/urls.py", line 2, in <module>
from docs.views import DocsRootView, serve_docs, DOCS_DIRHTML
File "~/.virtualenvs/project/lib/python3.6/site-packages/docs/views.py", line 18, in <module>
if float(django.get_version())>=3:
ValueError: could not convert string to float: '3.2.16'
When I click on Module Index it hits http://127.0.0.1/docs/py-modindex.html and gives me error py-modindex.html does not exist
Page not found (404) Request Method: GET Request URL: http://127.0.0.1:8000/docs/py-modindex.html Raised by: docs.views.serve_docs "/media/goutom/working/workspace/python/fanvault/bin/fanvault/_build/html/py-modindex.html" does not exist
py-modindex.html was not created in my html folder.
I am following this tutorial https://madradavid.com/documenting-your-django-application-sphinx/
Thanks in advance.
Is there internationalization?
This error happens with django 4+ as the 'django.conf.urls' id depreciated
from django.conf.urls import url
from docs.views import DocsRootView, serve_docs
urlpatterns = [
url(r'^$', DocsRootView.as_view(permanent=True), name='docs_root'),
I have a bunch of projects. Each of them uses sphinx, I'd like to serve their documentation in my django application. Is this project suited for such use case?
I installed django-docs via pip3 such as mentioned in the readme.md but getting an import error:
No module named 'django.core.urlresolvers'
I guess this is caused by the change of this library from django.core.urlresovers to django.urls, where also other changes has taken place. Before I dive Into this modules code I want to ask if django2 is (going to be) supported by this modul otherwise i'll look for another way. Cannot waste too much time on hacking around with documentation serving.
The screenshot in the README is 404
The mentioned error appears when running python3.10 and Django4.0.
Error in the following 17th line of views.py:
from django.utils.translation import ugettext as _
'ugettext_lazy' has been deprecated for django 3+.
Using 'gettext_lazy' instead without 'u', works fine.
Hi. We have 0.0.1 and 0.02 versions. How to manage multiple versions of documentation with django-docs Sphinx?
Hello everyone,
login_required - docs are visible only to authenticated users.
Is it possible to show few pages to admin user's only and the rest of docs to public?
Thanks
Suresh
I am using this package and I want request object on index.html so that I can have username(under request) on the generated documentation and I could use {{ request.user }} on index.html
Need to update the tox.ini
to have:
envlist = {py27,py35}-django{18,110,-trunk}
And make it pass...
Exception:
NoReverseMatch at /
Reverse for 'docs' with arguments '()' and keyword arguments '{}' not found. 0 pattern(s) tried: []
Using url in template:
<a href="{% url 'docs' %}"><h3>Documentation</h3></a>
urls.py:
url(r'^$', TemplateView.as_view(template_name='webdisplay/start.html'), name='start'),
url(r'^docs/', include('docs.urls'), name='docs'),
Access via direct link works ok:
http://localhost:8000/docs/index.html
Hi, Do you plan to support multiple projects ?
It's problem for pip install django-docs.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.