New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Request for help #4
Comments
I added to the list of middleware_classes which have moved me on to the next error. |
Yes, it is not minimalist - I'd say it is a middle-sized pluggable app, it listed in the category "framework" at django packages site. It has AJAX-forms and read-only display forms, besides grids (datatables), also custom querysets implemented. It also has built-in permission middleware for urls.py. The best way to get used to django-jinja-knockout is to install sample project https://github.com/Dmitri-Sintsov/djk-sample in separate python3 virtualenv. It uses sqlite database thus does not require lots of steps to make it running. It also has working https://github.com/Dmitri-Sintsov/djk-sample/blob/master/djk_sample/settings.py suitable for copy-paste to another Django / Python3 / Jinja projects. Client routes are url names that are injected to Javascript client-side to make AJAX call urls not hardcoded, but dynamically updated when urls.py changes. These are gathered into current request by https://github.com/Dmitri-Sintsov/django-jinja-knockout/blob/master/django_jinja_knockout/middleware.py then actually injected in https://github.com/Dmitri-Sintsov/django-jinja-knockout/blob/master/django_jinja_knockout/context_processors.py and then rendered by https://github.com/Dmitri-Sintsov/django-jinja-knockout/blob/master/django_jinja_knockout/jinja2/base_min.htm (extend or make custom template to change the layout). So both middleware and context processor should be included like it is done in djk-sample https://github.com/Dmitri-Sintsov/djk-sample/blob/master/djk_sample/settings.py Also do not forget that modules, which use django-jinja-knockout should be included into https://github.com/Dmitri-Sintsov/djk-sample/search?l=Python&q=DJK_APPS&type=&utf8=%E2%9C%93 DJK_APPS list that defines which modules will be applied by django-jinja-knockout middleware (django admin modules should not be applied). However you do not have to override (extend) django_jinja_knockout middleware and context processor as it is done in djk-sample. Just using built-in ones in settings.py is enough:
|
Also documentation usually refers to last pypi release, not to git master version of django-jinja-knockout, so it may not always work with master. I try to update documentation only when master is released at pypi. While djk-sample uses Travis CI and Circle CI tests thus is much more stable than documentation samples. |
Hi Dmitri, I'm new to django.
I'm using python 3.6.1 with django 1.11.2 and django_jinja_knockout from git (master).
I am trying to get a simple grid working, the simplest grid as described in the Usage section of the docs.
I am not overriding middleware.py or the context processor.
I have a breakpoint in template_context_process() in your library.
The break point gets hit on requests, such as http://127.0.0.1:8000/admin/
I have defined a url
and the view object is:
visiting the url
http://127.0.0.1:8000/customer/
gives this error:
and the breakpoint on template_context_process() is not being hit.
I have looked and looked for differences between what I'm doing and the sample app, and I can't find the problem. Why is a visit to /customer/ not triggering the breakpoint in template_context_process() ?
The text was updated successfully, but these errors were encountered: