Coder Social home page Coder Social logo

Comments (10)

fschulze avatar fschulze commented on June 24, 2024

Take a look at https://github.com/fschulze/devpi-example-theme

from devpi.

zhenzi0322 avatar zhenzi0322 commented on June 24, 2024

Thank you.

from devpi.

zhenzi0322 avatar zhenzi0322 commented on June 24, 2024

There are theme examples, and how can I use them in devpi? Easy to debug operation

from devpi.

fschulze avatar fschulze commented on June 24, 2024

The devpi_example_theme/theme folder can be used with devpi-server --theme when devpi-web is installed. For the other use cases shown in the example you have to install the package and it will work automatically because of this: https://github.com/fschulze/devpi-example-theme/blob/master/devpi_example_theme/__init__.py#L11

from devpi.

zhenzi0322 avatar zhenzi0322 commented on June 24, 2024
devpi-server --theme ./devpi_example_theme

Invalid modification of style.css style

from devpi.

fschulze avatar fschulze commented on June 24, 2024

Use devpi-server --theme ./devpi_example_theme/theme

from devpi.

zhenzi0322 avatar zhenzi0322 commented on June 24, 2024

Use devpi-server --theme ./devpi_example_theme/theme

There will be errors when starting this method.

image

error:

 File "notfound_c8e146b183910da68a9a0290a3fa599d.py", line 239, in render
 - Expression: "request.macros['footer']"
 - Filename:   ... WaY0Jl\lib\site-packages\devpi_web\templates\notfound.pt
 - Location:   (line 14: col 33)
 - Source:     ... al:footer use-macro="request.macros['footer']" />
                                        ^^^^^^^^^^^^^^^^^^^^^^^^
 - Arguments:  view: <function ('notfound',) at 0x1e3d8b48dc0>
               renderer_name: templates/notfound.pt
               renderer_info: <RendererHelper ('None',) at 0x1e3d9fdb430>
               context: <HTTPNotFound ('None',) at 0x1e3da112620>
               request: <Request ('None',) at 0x1e3d9fdb580>
               req: <Request ('None',) at 0x1e3d9fdb580>
               get_csrf_token: <partial ('None',) at 0x1e3da0895d0>
               msg: <HTTPNotFound ('None',) at 0x1e3da112620>
               target_language: <NoneType ('None',) at 0x7ffb9fa687f8>
               repeat: <RepeatDict ('None',) at 0x1e3d9fdb460>
               macroname: request.macros['footer']

versin:

devpi-web: 4.2.0
devpi-server: 6.8.0

from devpi.

fschulze avatar fschulze commented on June 24, 2024

I have to look into that error.

Maybe this is a simpler example:
https://github.com/devpi/devpi.net/tree/master/theme

from devpi.

fschulze avatar fschulze commented on June 24, 2024

There are also some docs: https://devpi.net/docs/devpi/devpi/stable/+d/adminman/web.html#themes

from devpi.

zhenzi0322 avatar zhenzi0322 commented on June 24, 2024

Ok.

from devpi.

Related Issues (20)

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.