Skip to content

Commit

Permalink
Deployed 9b73f7d with MkDocs version: 1.6.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Karl Wooster committed Aug 30, 2024
1 parent c748a1d commit 0a59e16
Show file tree
Hide file tree
Showing 2 changed files with 276 additions and 4 deletions.
278 changes: 275 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,11 @@
<label class="md-overlay" for="__drawer"></label>
<div data-md-component="skip">


<a href="#django-rubble" class="md-skip">
Skip to content
</a>

</div>
<div data-md-component="announce">

Expand Down Expand Up @@ -192,6 +197,19 @@
<input class="md-nav__toggle md-toggle" type="checkbox" id="__toc">





<label class="md-nav__link md-nav__link--active" for="__toc">


<span class="md-ellipsis">
Home
</span>


<span class="md-nav__icon md-icon"></span>
</label>

<a href="." class="md-nav__link md-nav__link--active">

Expand All @@ -203,6 +221,112 @@

</a>



<nav class="md-nav md-nav--secondary" aria-label="Table of contents">






<label class="md-nav__title" for="__toc">
<span class="md-nav__icon md-icon"></span>
Table of contents
</label>
<ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>

<li class="md-nav__item">
<a href="#description" class="md-nav__link">
<span class="md-ellipsis">
Description
</span>
</a>

</li>

<li class="md-nav__item">
<a href="#features" class="md-nav__link">
<span class="md-ellipsis">
Features
</span>
</a>

</li>

<li class="md-nav__item">
<a href="#installation" class="md-nav__link">
<span class="md-ellipsis">
Installation
</span>
</a>

<nav class="md-nav" aria-label="Installation">
<ul class="md-nav__list">

<li class="md-nav__item">
<a href="#from-pypi" class="md-nav__link">
<span class="md-ellipsis">
From PyPI
</span>
</a>

</li>

<li class="md-nav__item">
<a href="#from-github-for-development" class="md-nav__link">
<span class="md-ellipsis">
From GitHub (for development)
</span>
</a>

</li>

</ul>
</nav>

</li>

<li class="md-nav__item">
<a href="#usage" class="md-nav__link">
<span class="md-ellipsis">
Usage
</span>
</a>

</li>

<li class="md-nav__item">
<a href="#contact" class="md-nav__link">
<span class="md-ellipsis">
Contact
</span>
</a>

</li>

<li class="md-nav__item">
<a href="#license" class="md-nav__link">
<span class="md-ellipsis">
License
</span>
</a>

</li>

<li class="md-nav__item">
<a href="#contributing" class="md-nav__link">
<span class="md-ellipsis">
Contributing
</span>
</a>

</li>

</ul>

</nav>

</li>


Expand Down Expand Up @@ -521,6 +645,103 @@






<label class="md-nav__title" for="__toc">
<span class="md-nav__icon md-icon"></span>
Table of contents
</label>
<ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>

<li class="md-nav__item">
<a href="#description" class="md-nav__link">
<span class="md-ellipsis">
Description
</span>
</a>

</li>

<li class="md-nav__item">
<a href="#features" class="md-nav__link">
<span class="md-ellipsis">
Features
</span>
</a>

</li>

<li class="md-nav__item">
<a href="#installation" class="md-nav__link">
<span class="md-ellipsis">
Installation
</span>
</a>

<nav class="md-nav" aria-label="Installation">
<ul class="md-nav__list">

<li class="md-nav__item">
<a href="#from-pypi" class="md-nav__link">
<span class="md-ellipsis">
From PyPI
</span>
</a>

</li>

<li class="md-nav__item">
<a href="#from-github-for-development" class="md-nav__link">
<span class="md-ellipsis">
From GitHub (for development)
</span>
</a>

</li>

</ul>
</nav>

</li>

<li class="md-nav__item">
<a href="#usage" class="md-nav__link">
<span class="md-ellipsis">
Usage
</span>
</a>

</li>

<li class="md-nav__item">
<a href="#contact" class="md-nav__link">
<span class="md-ellipsis">
Contact
</span>
</a>

</li>

<li class="md-nav__item">
<a href="#license" class="md-nav__link">
<span class="md-ellipsis">
License
</span>
</a>

</li>

<li class="md-nav__item">
<a href="#contributing" class="md-nav__link">
<span class="md-ellipsis">
Contributing
</span>
</a>

</li>

</ul>

</nav>
</div>
Expand All @@ -535,9 +756,60 @@



<h1>Home</h1>


<h1 id="django-rubble">django-rubble</h1>
<p><a href="https://opensource.org/licenses/MIT"><img alt="License" src="https://img.shields.io/badge/license-MIT-blue.svg" /></a></p>
<h2 id="description">Description</h2>
<p>Extend <a href="https://github.com/jazzband/django-model-utils">django-model-utils</a> and <a href="https://github.com/django-extensions/django-extensions">django-extensions</a>.</p>
<blockquote>
<p>Version 0.4.0 code got deleted but still exists on PyPI.</p>
</blockquote>
<h2 id="features">Features</h2>
<ul>
<li>Serialized Number Generation (e.g. PN-0001, PN-0001; MY1, MY2)</li>
<li>Useful Model and Form fields<ul>
<li><code>SimplePercentageField</code></li>
</ul>
</li>
<li>Several Useful Utility Functions<ul>
<li><code>is_number</code>: checks if number could be coerced to a <code>float</code></li>
<li><code>ratio_to_whole</code>: .1 to 10; useful for percentages to "human"</li>
<li><code>whole_to_ration</code>: 10 to .1; useful for "human" to "percentages"</li>
<li>perhaps others, see docs when they're published</li>
</ul>
</li>
</ul>
<h2 id="installation">Installation</h2>
<h3 id="from-pypi">From PyPI</h3>
<p><code>pip install django-rubble</code></p>
<h3 id="from-github-for-development">From GitHub (for development)</h3>
<ol>
<li>Clone the repository: <code>git clone https://github.com/WoosterTech/django-rubble.git</code></li>
<li>Install the dependencies: <code>poetry install</code></li>
</ol>
<h2 id="usage">Usage</h2>
<p>Simply use the functions, fields, models.</p>
<p>The biggest "gotcha" is that <code>NamedSerialNumber</code> needs to be imported in your <code>urls.py</code> file; not actually sure why, perhaps someone can help me with that?</p>
<p>To use the automatic numbering, subclass <code>NumberedModel</code> and make sure to include a <code>number_config = SerialNumberConfig(...)</code> attribute. It will set defaults, but just as a standard integer starting at "1" with no prefix.</p>
<pre><code class="language-python">class PartNumber(NumberedModel):
name = models.CharField(&quot;Part Description&quot;, max_length=100)
number_config = SerialNumberConfig(
initial_value=10, prefix=&quot;PN-&quot;, width=4
)
</code></pre>
<p>Numbers will be generated starting with "PN-0010" (note the padding to make a width of 4) and increment by the default step of "1."</p>
<p>Contributions are welcome! Please follow the guidelines in
<a href="CONTRIBUTING.md">CONTRIBUTING.md</a>.</p>
<p>This project is licensed under the <a href="LICENSE">MIT License</a>.</p>
<h2 id="contact">Contact</h2>
<ul>
<li>Author: Karl Wooster</li>
<li>Email: <a href="&#109;&#97;&#105;&#108;&#116;&#111;&#58;&#107;&#97;&#114;&#108;&#64;&#119;&#111;&#111;&#115;&#116;&#101;&#114;&#116;&#101;&#99;&#104;&#46;&#99;&#111;&#109;">&#107;&#97;&#114;&#108;&#64;&#119;&#111;&#111;&#115;&#116;&#101;&#114;&#116;&#101;&#99;&#104;&#46;&#99;&#111;&#109;</a></li>
<li>Website: <a href="https://woostertech.com">woostertech.com</a></li>
</ul>
<h2 id="license">License</h2>
<p>MIT (see <a href="LICENSE">License</a>)</p>
<h2 id="contributing">Contributing</h2>
<p>See <a href="CONTRIBUTING.md">CONTRIBUTING.md</a></p>



Expand Down
Loading

0 comments on commit 0a59e16

Please sign in to comment.