Skip to content

Commit

Permalink
Added some fresh screenshots
Browse files Browse the repository at this point in the history
  • Loading branch information
palewire committed Feb 6, 2015
1 parent 78660c8 commit 8db22e1
Show file tree
Hide file tree
Showing 41 changed files with 50 additions and 38 deletions.
Binary file modified docs/_build/doctrees/environment.pickle
Binary file not shown.
Binary file modified docs/_build/doctrees/index.doctree
Binary file not shown.
Binary file added docs/_build/html/_images/hello-admin-columns.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_build/html/_images/hello-admin-filter.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_build/html/_images/hello-admin-list.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_build/html/_images/hello-admin-login.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_build/html/_images/hello-admin-module.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_build/html/_images/hello-admin-noconfig.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_build/html/_images/hello-admin-search.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_build/html/_images/hello-django.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
26 changes: 15 additions & 11 deletions docs/_build/html/_sources/index.txt
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ inside its sealed space. You only need to create the virtualenv once, but you'll

Make a new directory and move into it.

Use ``pip`` on the command line to install `Djang <https://www.djangoproject.com/>`_, a Python "framework"
Use ``pip`` on the command line to install `Django <https://www.djangoproject.com/>`_, a Python "framework"
we'll use to put together our website.

.. code-block:: bash
Expand Down Expand Up @@ -235,7 +235,7 @@ Fire up Django's built-in web server.

Visit `localhost:8000 <http://localhost:8000>`_ in your browser to see Django in action. Here's what you should see.

.. image:: /_static/hello-django.png
.. image:: /_static/hello-django.jpg

Congratulations. You've installed Django and got a blank site started up and working. Now the real work begins.

Expand Down Expand Up @@ -559,11 +559,11 @@ Then fire up the Django test server.

And visit `localhost:8000/admin/ <http://localhost:8000/admin/>`_ and log in using the credentials you just created.

SCREENSHOT HERE
.. image:: /_static/hello-admin-login.png

Without any additional configuration you will see administration panels for the apps installed with Django by default.

SCREENSHOT HERE
.. image:: /_static/hello-admin-noconfig.png

Adding panels for your own models is done in the ``admin.py`` file included with each app. Open ``academy/admin.py`` to start in.

Expand All @@ -574,14 +574,18 @@ Adding panels for your own models is done in the ``admin.py`` file included with

admin.site.register(Invite)

Now reload `localhost:8000/admin/ <http://localhost:8000/admin/>`_ and you'll see it in action.
Now reload `localhost:8000/admin/ <http://localhost:8000/admin/>`_ and you'll see it added to the index app list.

SCREENSHOT
.. image:: /_static/hello-admin-module.png

Click on "Invite" and you'll see all the records we loaded into the database a list.

.. image:: /_static/hello-admin-list.png

Configure the columns that appear in the list.

.. code-block:: python
:emphasize-lines: 3-7
:emphasize-lines: 4-7

from django.contrib import admin
from academy.models import Invite
Expand All @@ -591,7 +595,7 @@ Configure the columns that appear in the list.

admin.site.register(Invite, InviteAdmin)

SCREENSHOT
.. image:: /_static/hello-admin-columns.png

Add a filter.

Expand All @@ -607,12 +611,12 @@ Add a filter.

admin.site.register(Invite, InviteAdmin)

SCREENSHOT
.. image:: /_static/hello-admin-filter.png

And now a search.

.. code-block:: python
:emphasize-lines: 8
:emphasize-lines: 7

from django.contrib import admin
from academy.models import Invite
Expand All @@ -624,7 +628,7 @@ And now a search.

admin.site.register(Invite, InviteAdmin)

SCREENSHOT
.. image:: /_static/hello-admin-search.png

Act 5: Hello newsroom
---------------------
Expand Down
Binary file added docs/_build/html/_static/hello-admin-columns.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_build/html/_static/hello-admin-columns.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_build/html/_static/hello-admin-filter.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_build/html/_static/hello-admin-filter.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_build/html/_static/hello-admin-list.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_build/html/_static/hello-admin-list.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_build/html/_static/hello-admin-login.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_build/html/_static/hello-admin-login.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_build/html/_static/hello-admin-module.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_build/html/_static/hello-admin-module.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_build/html/_static/hello-admin-noconfig.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_build/html/_static/hello-admin-noconfig.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_build/html/_static/hello-admin-search.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_build/html/_static/hello-admin-search.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_build/html/_static/hello-django.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/_build/html/_static/hello-django.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 18 additions & 16 deletions docs/_build/html/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ <h3>Python<a class="headerlink" href="#python" title="Permalink to this headline
</pre></div>
</div>
<p>Make a new directory and move into it.</p>
<p>Use <tt class="docutils literal"><span class="pre">pip</span></tt> on the command line to install <a class="reference external" href="https://www.djangoproject.com/">Djang</a>, a Python &#8220;framework&#8221;
<p>Use <tt class="docutils literal"><span class="pre">pip</span></tt> on the command line to install <a class="reference external" href="https://www.djangoproject.com/">Django</a>, a Python &#8220;framework&#8221;
we&#8217;ll use to put together our website.</p>
<div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>pip install Django
</pre></div>
Expand All @@ -221,13 +221,13 @@ <h3>Python<a class="headerlink" href="#python" title="Permalink to this headline
</pre></div>
</div>
<p>Visit <a class="reference external" href="http://localhost:8000">localhost:8000</a> in your browser to see Django in action. Here&#8217;s what you should see.</p>
<img alt="_images/hello-django.png" src="_images/hello-django.png" />
<img alt="_images/hello-django.jpg" src="_images/hello-django.jpg" />
<p>Congratulations. You&#8217;ve installed Django and got a blank site started up and working. Now the real work begins.</p>
</div>
<div class="section" id="act-2-hello-models">
<h2>Act 2: Hello models<a class="headerlink" href="#act-2-hello-models" title="Permalink to this headline"></a></h2>
<p>Now we create our app. In Django terms, an app is a collection of files that do something, like publish a blog or store public records. A project, like we made above, collects those apps and organizes them into a working website.</p>
<p>You can create a new app with Django&#8217;s <a href="#id1"><span class="problematic" id="id2">``</span></a>startapp` command. Since we are aiming to make a list of people invited to join the academy, naming this one isn&#8217;t too hard.</p>
<p>You can create a new app with Django&#8217;s <a href="#id2"><span class="problematic" id="id3">``</span></a>startapp` command. Since we are aiming to make a list of people invited to join the academy, naming this one isn&#8217;t too hard.</p>
<div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>python manage.py startapp academy
</pre></div>
</div>
Expand Down Expand Up @@ -376,7 +376,7 @@ <h2>Act 2: Hello models<a class="headerlink" href="#act-2-hello-models" title="P
</span></pre></div>
</div>
<p>Congratulations, you&#8217;ve written your first model. But it won&#8217;t be created as a real table in your database until you run what Django calls a &#8220;migration.&#8221; That&#8217;s just a fancy word for syncing our models files.</p>
<p>Make sure to save your <a href="#id3"><span class="problematic" id="id4">``</span></a>models.py``file. Then design the migration for your new model.</p>
<p>Make sure to save your <a href="#id4"><span class="problematic" id="id5">``</span></a>models.py``file. Then design the migration for your new model.</p>
<div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>python manage.py makemigrations academy
</pre></div>
</div>
Expand Down Expand Up @@ -481,29 +481,31 @@ <h2>Act 4: Hello admin<a class="headerlink" href="#act-4-hello-admin" title="Per
</pre></div>
</div>
<p>And visit <a class="reference external" href="http://localhost:8000/admin/">localhost:8000/admin/</a> and log in using the credentials you just created.</p>
<p>SCREENSHOT HERE</p>
<img alt="_images/hello-admin-login.png" src="_images/hello-admin-login.png" />
<p>Without any additional configuration you will see administration panels for the apps installed with Django by default.</p>
<p>SCREENSHOT HERE</p>
<img alt="_images/hello-admin-noconfig.png" src="_images/hello-admin-noconfig.png" />
<p>Adding panels for your own models is done in the <tt class="docutils literal"><span class="pre">admin.py</span></tt> file included with each app. Open <tt class="docutils literal"><span class="pre">academy/admin.py</span></tt> to start in.</p>
<div class="highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">django.contrib</span> <span class="kn">import</span> <span class="n">admin</span>
<span class="kn">from</span> <span class="nn">academy.models</span> <span class="kn">import</span> <span class="n">Invite</span>

<span class="n">admin</span><span class="o">.</span><span class="n">site</span><span class="o">.</span><span class="n">register</span><span class="p">(</span><span class="n">Invite</span><span class="p">)</span>
</pre></div>
</div>
<p>Now reload <a class="reference external" href="http://localhost:8000/admin/">localhost:8000/admin/</a> and you&#8217;ll see it in action.</p>
<p>SCREENSHOT</p>
<p>Now reload <a class="reference external" href="http://localhost:8000/admin/">localhost:8000/admin/</a> and you&#8217;ll see it added to the index app list.</p>
<img alt="_images/hello-admin-module.png" src="_images/hello-admin-module.png" />
<p>Click on &#8220;Invite&#8221; and you&#8217;ll see all the records we loaded into the database a list.</p>
<img alt="_images/hello-admin-list.png" src="_images/hello-admin-list.png" />
<p>Configure the columns that appear in the list.</p>
<div class="highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">django.contrib</span> <span class="kn">import</span> <span class="n">admin</span>
<span class="kn">from</span> <span class="nn">academy.models</span> <span class="kn">import</span> <span class="n">Invite</span>
<span class="hll">
</span><span class="hll"><span class="k">class</span> <span class="nc">InviteAdmin</span><span class="p">(</span><span class="n">admin</span><span class="o">.</span><span class="n">ModelAdmin</span><span class="p">):</span>

<span class="hll"><span class="k">class</span> <span class="nc">InviteAdmin</span><span class="p">(</span><span class="n">admin</span><span class="o">.</span><span class="n">ModelAdmin</span><span class="p">):</span>
</span><span class="hll"> <span class="n">list_display</span> <span class="o">=</span> <span class="p">(</span><span class="s">&quot;name&quot;</span><span class="p">,</span> <span class="s">&quot;branch&quot;</span><span class="p">,</span> <span class="s">&quot;gender&quot;</span><span class="p">,</span> <span class="s">&quot;date_of_birth&quot;</span><span class="p">,</span> <span class="s">&quot;race&quot;</span><span class="p">)</span>
</span><span class="hll">
</span><span class="hll"><span class="n">admin</span><span class="o">.</span><span class="n">site</span><span class="o">.</span><span class="n">register</span><span class="p">(</span><span class="n">Invite</span><span class="p">,</span> <span class="n">InviteAdmin</span><span class="p">)</span>
</span></pre></div>
</div>
<p>SCREENSHOT</p>
<img alt="_images/hello-admin-columns.png" src="_images/hello-admin-columns.png" />
<p>Add a filter.</p>
<div class="highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">django.contrib</span> <span class="kn">import</span> <span class="n">admin</span>
<span class="kn">from</span> <span class="nn">academy.models</span> <span class="kn">import</span> <span class="n">Invite</span>
Expand All @@ -515,20 +517,20 @@ <h2>Act 4: Hello admin<a class="headerlink" href="#act-4-hello-admin" title="Per
<span class="n">admin</span><span class="o">.</span><span class="n">site</span><span class="o">.</span><span class="n">register</span><span class="p">(</span><span class="n">Invite</span><span class="p">,</span> <span class="n">InviteAdmin</span><span class="p">)</span>
</pre></div>
</div>
<p>SCREENSHOT</p>
<img alt="_images/hello-admin-filter.png" src="_images/hello-admin-filter.png" />
<p>And now a search.</p>
<div class="highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">django.contrib</span> <span class="kn">import</span> <span class="n">admin</span>
<span class="kn">from</span> <span class="nn">academy.models</span> <span class="kn">import</span> <span class="n">Invite</span>

<span class="k">class</span> <span class="nc">InviteAdmin</span><span class="p">(</span><span class="n">admin</span><span class="o">.</span><span class="n">ModelAdmin</span><span class="p">):</span>
<span class="n">list_display</span> <span class="o">=</span> <span class="p">(</span><span class="s">&quot;name&quot;</span><span class="p">,</span> <span class="s">&quot;branch&quot;</span><span class="p">,</span> <span class="s">&quot;gender&quot;</span><span class="p">,</span> <span class="s">&quot;date_of_birth&quot;</span><span class="p">,</span> <span class="s">&quot;race&quot;</span><span class="p">)</span>
<span class="n">list_filter</span> <span class="o">=</span> <span class="p">(</span><span class="s">&quot;branch&quot;</span><span class="p">,</span> <span class="s">&quot;gender&quot;</span><span class="p">,</span> <span class="s">&quot;race&quot;</span><span class="p">)</span>
<span class="n">search_fields</span> <span class="o">=</span> <span class="p">(</span><span class="s">&quot;name&quot;</span><span class="p">,)</span>
<span class="hll">
</span><span class="n">admin</span><span class="o">.</span><span class="n">site</span><span class="o">.</span><span class="n">register</span><span class="p">(</span><span class="n">Invite</span><span class="p">,</span> <span class="n">InviteAdmin</span><span class="p">)</span>
<span class="hll"> <span class="n">search_fields</span> <span class="o">=</span> <span class="p">(</span><span class="s">&quot;name&quot;</span><span class="p">,)</span>
</span>
<span class="n">admin</span><span class="o">.</span><span class="n">site</span><span class="o">.</span><span class="n">register</span><span class="p">(</span><span class="n">Invite</span><span class="p">,</span> <span class="n">InviteAdmin</span><span class="p">)</span>
</pre></div>
</div>
<p>SCREENSHOT</p>
<img alt="_images/hello-admin-search.png" src="_images/hello-admin-search.png" />
</div>
<div class="section" id="act-5-hello-newsroom">
<h2>Act 5: Hello newsroom<a class="headerlink" href="#act-5-hello-newsroom" title="Permalink to this headline"></a></h2>
Expand Down

0 comments on commit 8db22e1

Please sign in to comment.