patzilla icon indicating copy to clipboard operation
patzilla copied to clipboard

Improve documentation re. workstation setup vs. development setup

Open papoteur-mga opened this issue 5 years ago • 6 comments

Hello,

I just tried the application patzilla 0.162.0.

As soon I try to open the site, I get a server error. In console message, it seems that templates/urlcleaner.js is claimed but not present. Indeed, I found only templates/urlcleaner.min.js.

I'm on a Mageia distro. I set a virtualenv, then used pip to get the installation. This worked. Then I created a patzilla.ini as development config.

Launching the server is OK.

  File "/home/yves/.venv27/lib/python2.7/site-packages/mako/runtime.py", line 804, in _lookup_template
    raise exceptions.TemplateLookupException(str(compat.exception_as()))
TemplateLookupException: Can not locate template for uri 'patzilla.navigator:templates/'

I never tried it before. Best

papoteur-mga avatar Feb 13 '19 15:02 papoteur-mga

Dear Papoteur,

thanks for writing in. We will try to have look into the issue. In the meanwhile, you might want to try to toggle the configuration setting

# Whether to run the instance in development mode
development_mode    = true

When setting this to true, as in the default of the development configuration, PatZilla will try to acquire templates/urlcleaner.js, right. When setting this to false, it really should go for the templates/urlcleaner.min.js.

Let's check what PatZilla will say after making this change. Maybe this will reveal that more things are missing?

With kind regards, Andreas.

amotl avatar Feb 13 '19 16:02 amotl

Oh, yes, its really better. Thanks Do you need other tests?

papoteur-mga avatar Feb 13 '19 17:02 papoteur-mga

When everything works as expected now, I assume this is a good thing? Please let me know if you need further assistance. Regarding the issue...

Problem scope

It might well be that it's just a documentation / configuration blueprint glitch.

Let me explain: When running in development mode, you are usually running the code directly from the working tree of the source code repository.

On the other hand, when installing PatZilla using pip install patzilla, you are not really in development mode, as the package contains a bundled Javascript frontend already and will install into your Python's site-packages.

Proposal

I conclude the documentation should be enhanced to say that one should reach out to the production.ini then, right? There, development mode would actually be turned off by default through

development_mode    = false

and everything should be fine then. Would this have helped you already?

Conclusion

You already told us that

Then I created a patzilla.ini as development config.

So another question would be whether you actually intended to install PatZilla in development mode? Then, it would be a different story (but probably also to be solved by improving the documentation). Just let us know, thanks in advance!

amotl avatar Feb 13 '19 18:02 amotl

Hi, It was intended that I configure a development mode. I did it because my installation is local and that meant that it will be easier to follow what is done. No other reason. Yes, documentation can be improved by saying what development is intended for and which consequences are implied.

papoteur-mga avatar Feb 13 '19 20:02 papoteur-mga

Thanks for clarifying that. We will try to improve the documentation of

  • https://docs.ip-tools.org/ip-navigator/install/index.html (workstation setup) vs.
  • https://docs.ip-tools.org/ip-navigator/install/sandbox.html (development setup)

amotl avatar Feb 13 '19 20:02 amotl

@think-nice-things recently reported the same thing over at #52. Thank you!

amotl avatar Jun 15 '22 14:06 amotl