Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions layouts/page/community-feeds.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<h1 class="title text-red">Feeds</h1>
<p>Subscribe to the Google Group, <a
href="https://groups.google.com/forum/#!forum/pylons-discuss">pylons-discuss</a>.
Follow us on Twitter <a href="https://twitter.com/PylonsProject">@PylonsProject</a>. Chat with us in
Follow us on X <a href="https://x.com/PylonsProject">@PylonsProject</a>. Chat with us in
<a href="https://web.libera.chat/#pyramid">#pyramid on IRC</a>.
</p>
<div class="row">
Expand All @@ -18,9 +18,9 @@ <h3 class="title text-red"><span class="fa fa-google fa-3x"></span> Google Group
</div>
<div class="row">
<div class="col-md-12">
<h3 class="title text-red"><span class="fa fa-twitter fa-3x"></span> Twitter</h3>
<h3 class="title text-red"><span class="fa fa-twitter fa-3x"></span> X</h3>
<div class="col-md-8 col-md-offset-2">
<a href="https://twitter.com/PylonsProject" class="twitter-timeline" data-height="800">Tweets by
<a href="https://x.com/PylonsProject" class="twitter-timeline" data-height="800">Posts by
PylonsProject</a>
<script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script>
</div>
Expand Down
73 changes: 12 additions & 61 deletions layouts/page/community.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ <h2 class="title text-red">Help</h2>
Stack Overflow <a href="https://stackoverflow.com/questions/tagged/pyramid">questions tagged with
"Pyramid"</a> have over 600 followers.
</p>
<p>Developers (150-250 participants) are also generally available on the <a
<p>Developers can be reached on the <a
href="https://discord.gg/2SZcvUVXbr">Pylons Project Discord</a>.
Some may also linger on the <a
href="https://web.libera.chat/#pyramid">#pyramid</a> channel on the Libera.Chat IRC
Network.
</p>
Expand All @@ -64,6 +66,12 @@ <h2 class="title text-red">Participate</h2>
<dd>
<p>Report <a href="https://github.com/Pylons/pyramid/issues">general issues</a> on GitHub.</p>
</dd>
<dt class="text-red">
Future Development
</dt>
<dd>
<p>Discuss ideas and future development in <a href="https://github.com/Pylons/pyramid/discussions">GitHub Discussions</a>.</p>
</dd>
<dt>
<a href="https://github.com/Pylons/pyramid/blob/main/contributing.md">
Contributing
Expand All @@ -78,67 +86,10 @@ <h2 class="title text-red">Participate</h2>
</dl>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<h2 class="title text-red">Publications</h2>
<p>A few of the mummies and pharaohs who publish articles about Pyramid.</p>
<ul>
<li><a href="http://plope.com/">Chris McDonough</a></li>
<li><a href="http://be.groovie.org/categories/python.html">Ben Bangert</a></li>
<li><a href="http://cd34.com/blog/category/framework/">Chris Davies</a></li>
<li><a href="http://pieceofpy.com/category/python/">Wayne Witzel III</a></li>
<li><a href="http://michael.merickel.org/">Michael Merickel</a></li>
<li><a href="http://www.stevepiercy.com/tag/pyramid.html">Steve Piercy</a></li>
<li><a href="https://metaclassical.com/">Jon Rosebaugh</a></li>
<li><a href="http://blog.delaguardia.com.mx/">Carlos de la Guardia</a></li>
</ul>
</div>
<div class="col-sm-6">
<h2 class="title text-red">Tools</h2>
<div class="media">
<div class="media-body">
<h4 class="media-heading">
<a href="https://www.jetbrains.com/pycharm/">
<strong>PyCharm</strong>
</a>
</h4>
<p>
<a href="https://www.jetbrains.com/pycharm/">PyCharm</a> is an
integrated development environment for Python from
<a href="https://www.jetbrains.com/">JetBrains</a>. PyCharm
Professional Edition includes Pyramid as one of its Python web
frameworks, making it easy to create, debug, and run
Pyramid projects.
</p>
<p>
Core developers in Pyramid and any other project under the Pylons Project are eligible to receive a
renewable one-year free and open source software license for all <a
href="https://www.jetbrains.com/">JetBrains</a> products, including
<a href="https://www.jetbrains.com/pycharm/">PyCharm</a>, at no cost. Contact user
<code>stevepiercy</code> in the
<code>#pyramid</code> IRC channel on <code>irc.libera.chat</code>.
</p>
</div>
<div class="media-right media-middle">
<p>
<a href="https://www.jetbrains.com/pycharm/">
<img class="media-object" src="img/pycharm-logo.png" alt="PyCharm" width="80px">
</a>
</p>
<p>
<a href="https://www.jetbrains.com/">
<img class="media-object" src="img/jetbrains-logo.png" alt="JetBrains" width="80px">
</a>
</p>
</div>
</div>

</div>
</div>
<div class="row">
<div class="col-sm-6">
<h2 class="title text-red">Podcasts and Videocasts</h2>
<p>When hieroglyphs are not enough, these pharoahs and mummies rise to speak and broadcast.</p>
<p>When hieroglyphs are not enough, these pharaohs and mummies rise to speak and broadcast.</p>
<ul>
<li><a href="https://talkpython.fm/episodes/show/3/pyramid-web-framework">Michael Kennedy/Talk Python to
Me</a></li>
Expand All @@ -164,12 +115,12 @@ <h2 class="title text-red">Podcasts and Videocasts</h2>
href="http://docs.pylonsproject.org/projects/deform/en/latest/">Deform</a>, <a
href="http://www.zodb.org/en/latest/">ZODB</a>, <a
href="http://repozefolder.readthedocs.io/en/latest/">repoze.folder</a>, <a
href="http://docs.repoze.org/catalog/">repoze.catalog</a>, <a
href="https://github.com/repoze/repoze.catalog">repoze.catalog</a>, <a
href="https://web.libera.chat/#pylons">#pylons IRC channel</a>, <a
href="https://pypi.python.org/pypi/Paste">Paste</a>, <a
href="https://modwsgi.readthedocs.io/en/develop/">mod_wsgi</a>, <a
href="https://uwsgi-docs.readthedocs.io/en/latest/">uwsgi</a>, <a
href="http://docs.repoze.org/workflow/">repoze.workflow</a>, <a
href="https://github.com/repoze/repoze.workflow">repoze.workflow</a>, <a
href="http://docs.pylonsproject.org/projects/colander/en/latest/">Colander</a>, <a
href="http://repozetm2.readthedocs.io/en/latest/">repoze.tm2</a>, <a
href="https://github.com/Pylons/pyramid_routehelper">pyramid_routehelper</a>, <a
Expand Down
123 changes: 9 additions & 114 deletions layouts/page/extending-pyramid.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,15 @@ <h3>Contributing add-ons</h3>
Testing Guidelines</a>. All Pylons Project participants should strive to follow our <a
href="https://pylonsproject.org/community-code-of-conduct.html">Code of Conduct</a>.</p>
<p>To add your project to the listing, see <a href="https://github.com/Pylons/trypyramid.com/blob/master/CONTRIBUTING.md#adding-an-add-on-to-extending-pyramid-page">Adding an add-on to "Extending Pyramid" page in CONTRIBUTING.md</a>.</p>
<h3>Making good add-ons</h3>
<p>Add-on packages should be named <code>pyramid_foo</code> where <code>foo</code> describes the functionality
of the package. For example, <code>pyramid_mailer</code> is a great name for something that provides
outbound mail service. If the name you want has already been taken, try to think of another, for example,
<code>pyramid_mailout</code>. If the functionality of the package cannot easily be described with one word,
or the name you want has already been taken and you can't think of another name related to functionality,
use a codename, for example, <code>pyramid_postoffice</code>.</p>
<p>For how to provide configuration hooks for your add-on, see
<a href="https://docs.pylonsproject.org/projects/pyramid/en/latest/narr/extconfig.html">Extending Pyramid Configuration</a>.</p>
<div class="extending-filters">
<select class="filter-multiselect" multiple="multiple">
<optgroup label="Support">
Expand Down Expand Up @@ -81,120 +90,6 @@ <h3>Contributing add-ons</h3>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<h3>Making good add-ons</h3>
<p>Add-on packages should be named <code>pyramid_foo</code> where <code>foo</code> describes the functionality
of the package. For example, <code>pyramid_mailer</code> is a great name for something that provides
outbound mail service. If the name you want has already been taken, try to think of another, for example,
<code>pyramid_mailout</code>. If the functionality of the package cannot easily be described with one word,
or the name you want has already been taken and you can't think of another name related to functionality,
use a codename, for example, <code>pyramid_postoffice</code>.</p>
<p>If your package provides "configuration" functionality, you will be tempted to create your own framework to
do the configuration, like the following:</p>

<p>
<pre class="nobs">
<code class="python">class MyConfigurationExtender(object):
def __init__(self, config):
self.config = config

def doit(self, a, b):
self.config.somedirective(a, b)

extender = MyConfigurationExtender(config)
extender.doit(1, 2)</code>
</pre>
</p>
<p>Instead of doing so, use the <code>add_directive</code> method of a configurator as documented at
<a href="https://docs.pylonsproject.org/projects/pyramid/en/latest/narr/extconfig.html#add-directive">Adding
Methods to the Configurator via <code>add_directive</code></a>:</p>

<p>
<pre class="nobs">
<code class="python">def doit(config, a, b):
config.somedirective(a, b)

config.add_directive('doit', doit)</code>
</pre>
</p>
<p>If your add-on wants to provide some default behavior, provide an <code>includeme</code> method in your
add-on's <code>__init__.py</code>, so <code>config.include('pyramid_foo')</code> will pick it up. See
<a
href="https://docs.pylonsproject.org/projects/pyramid/en/latest/narr/advconfig.html#including-configuration">Including
Configuration From External Sources</a>.</p>

<h3>Making Good Development Environments</h3>

<p>If you are creating a higher-level framework atop the Pyramid codebase that contains "template" code
(skeleton code rendered by a user via <code>pcreate -t foo</code>), for the purposes of uniformity with
other "development environment" packages, we offer some guidelines below.</p>
<ul>
<li>It should not be named with a <code>pyramid_</code> prefix. For example, instead of
<code>pyramid_foo</code> it should just be named <code>foo</code>. The <code>pyramid_</code> prefix is
best used for add-ons that plug some discrete functionality in to Pyramid, not for code that simply uses
Pyramid as a base for a separate framework with its own "opinions".</li>
<li>It should be possible to subsequently run <code>pserve development.ini</code> to start any
<code>pcreate</code>-rendered application.</li>
<li><code>development.ini</code> should ensure that the <code>pyramid_debugtoolbar</code> package is active.
</li>
<li>There should be a <code>production.ini</code> file that mirrors <code>development.ini</code> but
disincludes <code>pyramid_debugtoolbar</code>.</li>
<li>The <code>[server:main]</code> section of both <code>production.ini</code> and
<code>development.ini</code> should start <code>paste.httpserver</code> on port 6543:
<p>
<pre class="nobs">
<code class="ini">[server:main]
use = egg:Paste#http
host = 0.0.0.0
port = 6543</code>
</pre>
</p>
</li>
<li><code>development.ini</code> and <code>production.ini</code> should configure logging (see any existing
template).</li>
<li>It should be possible to use <code>pshell development.ini</code> to visit an interactive shell using a
<code>pcreate</code>-rendered application.</li>
<li>Startup/configuration code should live in a function named <code>main</code> within the
<code>__init__.py</code> of the main package of the rendered template. This function should be linked
within a <code>paster.app_factory</code> section in the template's <code>setup.py</code> like so:
<p>
<pre class="nobs">
<code class="ini">entry_points = """\
[paste.app_factory]
main = {{ htmlEscape "{{package}}:main" }}
"""</code>
</pre>
</p>
</li>
<li>This makes it possible for users to use the following pattern (particularly
<code>{{ htmlEscape "use = egg:{{project}}" }}</code>):
<p>
<pre class="nobs">
<code class="ini">{{ htmlEscape "[app:{{project}}]" }}
{{ htmlEscape "use = egg:{{project}}" }}
reload_templates = true
.. other config ..</code>
</pre>
</p>
</li>
<li>WSGI middleware configuration should not be inlined into imperative code within the main function.
Instead, middleware should be configured within a <code>[pipeline:main]</code> section in the
configuration file:
<p>
<pre class="nobs">
<code class="ini">[pipeline:main]
pipeline =
egg:WebError#evalerror
tm
{{ htmlEscape "{{project}}" }}</code>
</pre>
</p>
</li>
</ul>

</div>
</div>
</div>
</section>
</div>
Expand Down
2 changes: 1 addition & 1 deletion layouts/partials/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div class="container">
<div class="row">
<p>
<a href="https://twitter.com/PylonsProject"
<a href="https://x.com/PylonsProject"
class="twitter-follow-button"
data-size="large"
data-lang="en"
Expand Down
Loading