Commits

Fernando G N Rocha committed a619224

Adicionado ponies

Comments (0)

Files changed (8)

     <h2>Limitações do syncdb</h2>
     <ul>
         <li class="slide" style="font-size: 30px;">O comando <b>manage.py syncdb</b> cria tabelas e carrega fixtures</li>
-        <li class="slide" style="font-size: 30px;">E quando é preciso modificar um campo?</li>
-        <li class="slide">
-            <blockquote style="font-size: 18px;">
-                Syncdb will only create tables for models which have not yet been installed. It will never issue ALTER TABLE statements to match changes made to a model class after installation. Changes to model classes and database schemas often involve some form of ambiguity and, in those cases, Django would have to guess at the correct changes to make. There is a risk that critical data would be lost in the process.<br/>
-                If you have made changes to a model and wish to alter the database tables to match, use the sql command to display the new SQL structure and compare that to your existing table schema to work out the changes.
-            </blockquote>
-            <p>https://docs.djangoproject.com/en/dev/ref/django-admin/#syncdb</p>
+        <li class="slide" style="font-size: 30px;">
+            E quando é preciso modificar um campo?
+            <img src="media/img/sad_pony.jpg" />
         </li>
     </ul>
 </div>
 
 <div class="slide" id="solucao">
     <h2>Solução? South!</h2>
-    <h4>
+    <h4 class="slide">
         Criação automática de migrações:
     </h4>
     <br />
-    <h4>
+    <h4 class="slide">
         O django south consegue ver o que foi mudado no models.py e escrever automaticamente migrações.
     </h4>
+    <div class="slide">
+        <img src="media/img/django-pony.jpg" />
+    </div>
 </div>
 
 <div class="slide" id="">
     <img src="media/img/yeah.png" />
 </div>
 
+<div class="slide" id="yeah">
+    <h2>Arquivo Gerado</h2>
+</div>
+
+
 <div class="slide" id="vantagens_plus">
     <h2>Mais Vantagens</h2>
     <ul>
     <ul>
         <li class="slide">
             Suporte a control de versão (basta adicionar as migrações, há ferramentas para lidar com conflitos) <!-- Mostrar aqui um arquivo de migração -->
+            <span style="float:right; margin-top: 60px;">
+                <img src="media/img/git_mercurial.jpg" />
+            </span>
         </li>
         <li class="slide">
             Facilidade para desenvolvedores e para deploy, só rodar o migrate
 </div>
 
 
-<div class="slide" id="dificil">
-    <h2>Ou do jeito difícil (nem tão difícil assim..):</h2>
-      <div class="has_code">
-        <div class="inner">
-          
-          <section><div class="highlight"><pre><span class="lineno">1</span> <span class="o">&gt;&gt;&gt;</span> <span class="n">l1</span> <span class="o">=</span> <span class="p">[</span><span class="mi">1</span><span class="p">,</span><span class="mi">2</span><span class="p">,</span><span class="mi">3</span><span class="p">]</span>
-<span class="lineno">2</span> <span class="o">&gt;&gt;&gt;</span> <span class="n">l2</span> <span class="o">=</span> <span class="n">l1</span>
-
-<span class="lineno">3</span> <span class="o">&gt;&gt;&gt;</span> <span class="n">l2</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="mi">2</span><span class="p">)</span>
-<span class="lineno">4</span> <span class="o">&gt;&gt;&gt;</span> <span class="k">print</span> <span class="n">l1</span>
-
-<span class="lineno">5</span> <span class="p">[</span><span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="mi">2</span><span class="p">]</span>
-<span class="lineno">6</span> <span class="o">&gt;&gt;&gt;</span> <span class="k">print</span> <span class="n">l2</span>
-
-<span class="lineno">7</span> <span class="p">[</span><span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="mi">2</span><span class="p">]</span>
-</pre></div>
-</section>
-
-          
-        </div>
-      </div>
-
-</div>
-
-<div class="slide" id="dificil_2">
-    <h2>Ou do jeito difícil (nem tão difícil assim..):</h2>
-      <div class="has_code">
-        <div class="inner">
-<pre><span class="lineno"> 1</span> <span class="o">&gt;&gt;&gt;</span> <span class="k">def</span> <span class="nf">teste</span><span class="p">(</span><span class="n">lista</span><span class="o">=</span><span class="p">[]):</span>
-<span class="lineno"> 2</span> <span class="o">...</span>     <span class="n">lista</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="s">'wtf'</span><span class="p">)</span>
-<span class="lineno"> 3</span> <span class="o">...</span>     <span class="k">return</span> <span class="n">lista</span>
-<span class="lineno"> 4</span> <span class="o">...</span> 
-<span class="lineno"> 5</span> <span class="o">&gt;&gt;&gt;</span> <span class="n">teste</span><span class="p">()</span>
-
-<span class="lineno"> 6</span> <span class="p">[</span><span class="s">'wtf'</span><span class="p">]</span>
-<span class="lineno"> 7</span> <span class="o">&gt;&gt;&gt;</span> <span class="n">teste</span><span class="p">()</span>
-<span class="lineno"> 8</span> <span class="p">[</span><span class="s">'wtf'</span><span class="p">,</span> <span class="s">'wtf'</span><span class="p">]</span>
-
-<span class="lineno"> 9</span> <span class="o">&gt;&gt;&gt;</span> <span class="n">teste</span><span class="p">()</span>
-<span class="lineno">10</span> <span class="p">[</span><span class="s">'wtf'</span><span class="p">,</span> <span class="s">'wtf'</span><span class="p">,</span> <span class="s">'wtf'</span><span class="p">]</span>
-
-<span class="lineno">11</span> <span class="o">&gt;&gt;&gt;</span> <span class="n">teste</span><span class="p">()</span>
-<span class="lineno">12</span> <span class="p">[</span><span class="s">'wtf'</span><span class="p">,</span> <span class="s">'wtf'</span><span class="p">,</span> <span class="s">'wtf'</span><span class="p">,</span> <span class="s">'wtf'</span><span class="p">]</span>
-
-</pre>
-        </div>
-    </div>
-</div>
-
-<div class="slide" id="conclusao">
-    <h2>Portanto:</h1>
-    <ul>
-        <li class="slide">O aluno só 'não sabe o que é ponteiro' se não souber o que é referência.</li>
-        <li class="slide">Se o aluno não sabe o que é referência, não chegou a aprender, porque esbarraria em coisas simples ao trabalhar com objetos mutáveis.</li>
-        <li class="slide">Ao estudar de Algorítmo e Estrutura de Dados com Python é impraticável não saber referências</li>
-        <li class="slide">Em outras linguages a questão é meramente sintática*</li>
-    </ul>
-</div>
-
-<div class="slide" id="conclusao">
-    <h2>Concluindo</h2>
-    <ul>
-        <li>... não só se assemelham, internamente são ponteiros!</li>
-    </ul>
-    <div class="slide has_code">
-        <div class="inner">
-            <pre><span class="lineno"> 1</span> <span class="o">&gt;&gt;&gt;</span> <span class="n">l1</span> <span class="o">=</span> <span class="p">[</span><span class="s">'a'</span><span class="p">,</span> <span class="s">'b'</span><span class="p">]</span>
-<span class="lineno"> 2</span> <span class="o">&gt;&gt;&gt;</span> <span class="nb">id</span><span class="p">(</span><span class="n">l1</span><span class="p">)</span>
-<span class="lineno"> 3</span> <span class="il">3073632844L</span>
-
-<span class="lineno"> 4</span> <span class="o">&gt;&gt;&gt;</span> <span class="n">l2</span> <span class="o">=</span> <span class="n">l1</span>
-<span class="lineno"> 5</span> <span class="o">&gt;&gt;&gt;</span> <span class="nb">id</span><span class="p">(</span><span class="n">l2</span><span class="p">)</span>
-<span class="lineno"> 6</span> <span class="il">3073632844L</span>
-
-<span class="lineno">7</span> <span class="o">&gt;&gt;&gt;</span> <span class="nb">id</span><span class="p">(</span><span class="n">l1</span><span class="p">)</span>
-<span class="lineno">8</span> <span class="il">3073632844L</span>
-</pre>
-        </div>
-    </div>
-</div>
-
-
 <!--
 <a href="#" class="deck-prev-link" title="Previous">&#8592;</a>
 <a href="#" class="deck-next-link" title="Next">&#8594;</a>

media/img/django-pony.jpg

Added
New image

media/img/git_mercurial.jpg

Added
New image

media/img/sad_pony.jpg

Added
New image

media/img/yeah.png

Added
New image

recs/south_syncdb

Binary file added.

recs/south_syncdb_2

Binary file added.

recs/south_syncdb_3

Binary file added.