Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Export djangosphinx/config.py as console_script entrypoint #24

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion djangosphinx/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,9 @@ def relative_path(*args):
'DATABASE_NAME': settings.DATABASE_NAME,
})

print render_to_string(getattr(settings, 'SPHINX_CONFIG_TEMPLATE', 'conf/sphinx.conf'), context)
def main():
print render_to_string(getattr(settings,
'SPHINX_CONFIG_TEMPLATE', 'conf/sphinx.conf'), context)

if __name__ == '__main__':
main()
4 changes: 4 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@
description = 'An integration layer bringing Django and Sphinx Search together.',
packages=find_packages(),
include_package_data=True,
entry_points="""
[console_scripts]
django-sphinx-config=djangosphinx.config:main
""",
classifiers=[
"Framework :: Django",
"Intended Audience :: Developers",
Expand Down