Re: [pylons-devel] Re: pcreate: Uppercase version of the package name?
2014-11-25 17:14 GMT+01:00 Jonathan Vanasco jonat...@findmeon.com: I would create an Issue and propose it on the Github. One of the core maintainers will say something like Great!, Maybe... or No way. I've seen (and personally gotten) a lot more No Way than Okay for proposed changes. This is such an edge case though, that I don't know if they'll go for it as-is. Why would other people need or use this? I don't see it getting added unless you can come up with a compelling reason. Jonathan , Thank you for your answer. As Michael writes there is no need for me to change anything in the pcreate command. -- You received this message because you are subscribed to the Google Groups pylons-devel group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-devel+unsubscr...@googlegroups.com. To post to this group, send email to pylons-devel@googlegroups.com. Visit this group at http://groups.google.com/group/pylons-devel. For more options, visit https://groups.google.com/d/optout.
Re: [pylons-devel] Re: pcreate: Uppercase version of the package name?
AFAIK all of the things you are asking for are possible using the (documented) scaffolding API. You basically just subclass ``PyramidTemplate`` and override ``pre`` to mutate the ``vars`` and add what you like. http://docs.pylonsproject.org/projects/pyramid/en/1.5-branch/narr/scaffolding.html http://docs.pylonsproject.org/projects/pyramid/en/1.5-branch/api/scaffolds.html#pyramid.scaffolds.PyramidTemplate.pre On Tue, Nov 25, 2014 at 10:14 AM, Jonathan Vanasco jonat...@findmeon.com wrote: I would create an Issue and propose it on the Github. One of the core maintainers will say something like Great!, Maybe... or No way. I've seen (and personally gotten) a lot more No Way than Okay for proposed changes. This is such an edge case though, that I don't know if they'll go for it as-is. Why would other people need or use this? I don't see it getting added unless you can come up with a compelling reason. This is purely a guess - but I think you might have better luck proposing it as some sort of hook for pcreate. i.e., if there was some way to pass in other template variables to pcreate. -- You received this message because you are subscribed to the Google Groups pylons-devel group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-devel+unsubscr...@googlegroups.com. To post to this group, send email to pylons-devel@googlegroups.com. Visit this group at http://groups.google.com/group/pylons-devel. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups pylons-devel group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-devel+unsubscr...@googlegroups.com. To post to this group, send email to pylons-devel@googlegroups.com. Visit this group at http://groups.google.com/group/pylons-devel. For more options, visit https://groups.google.com/d/optout.
[pylons-devel] Re: pcreate: Uppercase version of the package name?
You might be able to use the Project variable, if you pass in a Capitalized form $ pcreate --scaffold starter Foo 'project': Foo, 'package': foo, Note that this doesn't Capitalize the name. it keeps it as-is: $ pcreate --scaffold starter FooBarBash 'project': FooBarBash, 'package': foobarbash, Otherwise you'd have to patch or monkeypatch pcreate.py in order to do that: https://github.com/Pylons/pyramid/blob/master/pyramid/scripts/pcreate.py#L106-L112 -- You received this message because you are subscribed to the Google Groups pylons-devel group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-devel+unsubscr...@googlegroups.com. To post to this group, send email to pylons-devel@googlegroups.com. Visit this group at http://groups.google.com/group/pylons-devel. For more options, visit https://groups.google.com/d/optout.
[pylons-devel] Re: pcreate: Uppercase version of the package name?
To be precise as the initial subject is wrong. I need the capitalized form of the package name. So the package name foo becomes Foo. Am Mittwoch, 5. November 2014 13:06:12 UTC+1 schrieb Torsten Irländer: Hi all, I am using scaffolds to create templates for application extensions. While rendering the scaffold I create some classes in a model file. For this it would be nice to have the package name ( {{package}} ) available not only in a lowercase version but also in a capitalised form. Before creating an issue and maybe a patch on github: Is there a chance to get such a behavior added to the pcreate command? Maybe make the value available under the name {{Package}}? Or do you know a good workaround for this? Torsten -- You received this message because you are subscribed to the Google Groups pylons-devel group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-devel+unsubscr...@googlegroups.com. To post to this group, send email to pylons-devel@googlegroups.com. Visit this group at http://groups.google.com/group/pylons-devel. For more options, visit https://groups.google.com/d/optout.