Ticket #1532 (closed enhancement: fixed)

Opened 7 years ago

Last modified 7 years ago

nagare-admin create-app should configure default "static" location

Reported by: rgomes Owned by: apoirier
Priority: minor Component: nagare-admin
Version: 0.4.1 Keywords:


Since "nagare-admin create-app" creates an application skeleton according to Nagare standard directoy layout, it should also configure parameter "static" accordingly, for example:

path = app example
name = example
static = $here/../static
debug = off

Change History

comment:1 Changed 7 years ago by Alain Poirier <alain.poirier@…>

  • Status changed from new to closed
  • Resolution set to fixed

In [372345ecdd542c7515f60123d78a596317787ffc/core]:

Fixes #1532.

The skeleton configuration file created by "nagare-admin create-app" doesn't contain all the possible parameters when their values are optionals.

But with this changeset, the static parameter, like all the others possible parameters, is now correctly available into the config object passed to the set_config() method.

  from nagare import presentation, component, wsgi

  class MyApp(object):

  def render(self, h, *args):
      return 'Hello world!'

  class WSGIApp(wsgi.WSGIApp):
      def set_config(self, filename, config, error):
          super(WSGIApp, self).set_config(filename, config, error)
          print 'Static directory:', config['application']['static']

  app = WSGIApp(lambda: component.Component(MyApp()))
Last edited 7 years ago by apoirier (previous) (diff)
Note: See TracTickets for help on using tickets.