GithubHelp home page GithubHelp logo

littlepea / django-docs Goto Github PK

View Code? Open in Web Editor NEW
69.0 69.0 32.0 343 KB

Allows to serve Sphinx generated docs from django.

License: BSD 3-Clause "New" or "Revised" License

Python 9.24% JavaScript 60.27% Makefile 3.65% CSS 14.43% HTML 12.36% Shell 0.06%

django-docs's People

Contributors

adamghill avatar chris104957 avatar derekjamescurtis avatar egilewski avatar fpoulain avatar littlepea avatar martinsvoboda avatar max-pfeiffer avatar memoriadecalculo avatar onegreyonewhite avatar sourcery-ai[bot] avatar stiller avatar sultansgillani avatar sushilshrestha avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

django-docs's Issues

ulrpatterns update

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

Update Django-docs on PyPy

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.

float(django.get_version()) causes ValueError: could not convert string to float: '3.2.16'

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'

py-modindex.html" does not exist

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.

cannot import name 'url' from 'django.conf.urls'

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'),

can I serve multiple _build directories?

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?

using django-docs with django 2.0

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.

Multiple versions

Hi. We have 0.0.1 and 0.02 versions. How to manage multiple versions of documentation with django-docs Sphinx?

How to show few doc pages to admin only?

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

Request object on Index.html

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

Python 3 support

Need to update the tox.ini to have:

envlist = {py27,py35}-django{18,110,-trunk}

And make it pass...

NoReverseMatch

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.