Skip to content

Commit

Permalink
fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
Parbhat committed Jan 22, 2018
1 parent 2238785 commit abc0409
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion feeds/all.atom.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom"><title>Parbhat Puri</title><link href="https://parbhatpuri.com/" rel="alternate"></link><link href="https://parbhatpuri.com/feeds/all.atom.xml" rel="self"></link><id>https://parbhatpuri.com/</id><updated>2018-01-22T20:00:00+05:30</updated><entry><title>Switch to Custom image model in a Production Wagtail project</title><link href="https://parbhatpuri.com/switch-to-custom-image-model-in-a-production-wagtail-project.html" rel="alternate"></link><published>2018-01-22T20:00:00+05:30</published><updated>2018-01-22T20:00:00+05:30</updated><author><name>Parbhat Puri</name></author><id>tag:parbhatpuri.com,2018-01-22:/switch-to-custom-image-model-in-a-production-wagtail-project.html</id><summary type="html">&lt;p&gt;This guide will list the steps to switch from Wagtail Default image model to Custom image model in a production Wagtail project.&lt;/p&gt;</summary><content type="html">&lt;p&gt;A software project is always evolving. New requirements can arise at any stage of the project. One example of a new feature required in a production Wagtail project is to store the &lt;code&gt;source&lt;/code&gt; of the Image. This post will list the steps involved to make the migration from Wagtail default Image model to Custom Image model. Therefore it requires some basic understanding of Wagtail. If you heard about the Wagtail for the first time. You should check it at &lt;a href="http://wagtail.io/"&gt;wagtail.io&lt;/a&gt;.&lt;/p&gt;
&lt;h3&gt;Brief description of the feature&lt;/h3&gt;
&lt;p&gt;Wagtail has a wonderful admin which also allows handling images. Internally wagtail has &lt;code&gt;wagtailimages&lt;/code&gt; app which contains the default Image model. But the fields provided in the default Image model may not be sufficient for your project. Like we want to store the &lt;code&gt;source&lt;/code&gt; of every image and display on our site. Source field is not present in Image model. Fortunately, Wagtail allows to switching to custom Image model in which new fields can be added based on the project requirements. In our case, we want to add the source field.&lt;/p&gt;
&lt;p&gt;Wagtail has a wonderful admin which also allows handling images. Internally wagtail has &lt;code&gt;wagtailimages&lt;/code&gt; app which contains the default Image model. But the fields provided in the default Image model may not be sufficient for your project. Like we want to store the &lt;code&gt;source&lt;/code&gt; of every image and display on our site. Source field is not present in Image model. Fortunately, Wagtail allows switching to custom Image model in which new fields can be added based on the project requirements. In our case, we want to add the source field.&lt;/p&gt;
&lt;h3&gt;Implementation&lt;/h3&gt;
&lt;p&gt;Like Django, Wagtail also has a great documentation. It also has documentation on the &lt;a href="http://docs.wagtail.io/en/stable/advanced_topics/images/custom_image_model.html"&gt;Custom image models&lt;/a&gt;. After following the docs, our project will be switched to Custom Image model with new fields like source. But when we open Images section in Wagtail admin, it will be empty. The reason is mentioned in docs:&lt;/p&gt;
&lt;p&gt;When changing an existing site to use a custom image model, no images will be copied to the new model automatically. Copying old images to the new model would need to be done manually with a data migration.&lt;/p&gt;
Expand Down
2 changes: 1 addition & 1 deletion feeds/python.atom.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom"><title>Parbhat Puri - python</title><link href="https://parbhatpuri.com/" rel="alternate"></link><link href="https://parbhatpuri.com/feeds/python.atom.xml" rel="self"></link><id>https://parbhatpuri.com/</id><updated>2018-01-22T20:00:00+05:30</updated><entry><title>Switch to Custom image model in a Production Wagtail project</title><link href="https://parbhatpuri.com/switch-to-custom-image-model-in-a-production-wagtail-project.html" rel="alternate"></link><published>2018-01-22T20:00:00+05:30</published><updated>2018-01-22T20:00:00+05:30</updated><author><name>Parbhat Puri</name></author><id>tag:parbhatpuri.com,2018-01-22:/switch-to-custom-image-model-in-a-production-wagtail-project.html</id><summary type="html">&lt;p&gt;This guide will list the steps to switch from Wagtail Default image model to Custom image model in a production Wagtail project.&lt;/p&gt;</summary><content type="html">&lt;p&gt;A software project is always evolving. New requirements can arise at any stage of the project. One example of a new feature required in a production Wagtail project is to store the &lt;code&gt;source&lt;/code&gt; of the Image. This post will list the steps involved to make the migration from Wagtail default Image model to Custom Image model. Therefore it requires some basic understanding of Wagtail. If you heard about the Wagtail for the first time. You should check it at &lt;a href="http://wagtail.io/"&gt;wagtail.io&lt;/a&gt;.&lt;/p&gt;
&lt;h3&gt;Brief description of the feature&lt;/h3&gt;
&lt;p&gt;Wagtail has a wonderful admin which also allows handling images. Internally wagtail has &lt;code&gt;wagtailimages&lt;/code&gt; app which contains the default Image model. But the fields provided in the default Image model may not be sufficient for your project. Like we want to store the &lt;code&gt;source&lt;/code&gt; of every image and display on our site. Source field is not present in Image model. Fortunately, Wagtail allows to switching to custom Image model in which new fields can be added based on the project requirements. In our case, we want to add the source field.&lt;/p&gt;
&lt;p&gt;Wagtail has a wonderful admin which also allows handling images. Internally wagtail has &lt;code&gt;wagtailimages&lt;/code&gt; app which contains the default Image model. But the fields provided in the default Image model may not be sufficient for your project. Like we want to store the &lt;code&gt;source&lt;/code&gt; of every image and display on our site. Source field is not present in Image model. Fortunately, Wagtail allows switching to custom Image model in which new fields can be added based on the project requirements. In our case, we want to add the source field.&lt;/p&gt;
&lt;h3&gt;Implementation&lt;/h3&gt;
&lt;p&gt;Like Django, Wagtail also has a great documentation. It also has documentation on the &lt;a href="http://docs.wagtail.io/en/stable/advanced_topics/images/custom_image_model.html"&gt;Custom image models&lt;/a&gt;. After following the docs, our project will be switched to Custom Image model with new fields like source. But when we open Images section in Wagtail admin, it will be empty. The reason is mentioned in docs:&lt;/p&gt;
&lt;p&gt;When changing an existing site to use a custom image model, no images will be copied to the new model automatically. Copying old images to the new model would need to be done manually with a data migration.&lt;/p&gt;
Expand Down
10 changes: 5 additions & 5 deletions sitemap.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,35 +5,35 @@ xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">

<url>
<loc>https://parbhatpuri.com/</loc>
<lastmod>2018-01-22T20:39:37-00:00</lastmod>
<lastmod>2018-01-23T00:25:08-00:00</lastmod>
<changefreq>daily</changefreq>
<priority>0.5</priority>
</url>

<url>
<loc>https://parbhatpuri.com/archives.html</loc>
<lastmod>2018-01-22T20:39:37-00:00</lastmod>
<lastmod>2018-01-23T00:25:08-00:00</lastmod>
<changefreq>daily</changefreq>
<priority>0.5</priority>
</url>

<url>
<loc>https://parbhatpuri.com/tags.html</loc>
<lastmod>2018-01-22T20:39:37-00:00</lastmod>
<lastmod>2018-01-23T00:25:08-00:00</lastmod>
<changefreq>daily</changefreq>
<priority>0.5</priority>
</url>

<url>
<loc>https://parbhatpuri.com/categories.html</loc>
<lastmod>2018-01-22T20:39:37-00:00</lastmod>
<lastmod>2018-01-23T00:25:08-00:00</lastmod>
<changefreq>daily</changefreq>
<priority>0.5</priority>
</url>

<url>
<loc>https://parbhatpuri.com/pages/about.html</loc>
<lastmod>2018-01-22T20:39:37-00:00</lastmod>
<lastmod>2018-01-23T00:25:08-00:00</lastmod>
<changefreq>monthly</changefreq>
<priority>0.5</priority>
</url>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ <h2 class="post_title post_detail"><a href="https://parbhatpuri.com/switch-to-cu
<div class="entry-content blog-post">
<p>A software project is always evolving. New requirements can arise at any stage of the project. One example of a new feature required in a production Wagtail project is to store the <code>source</code> of the Image. This post will list the steps involved to make the migration from Wagtail default Image model to Custom Image model. Therefore it requires some basic understanding of Wagtail. If you heard about the Wagtail for the first time. You should check it at <a href="http://wagtail.io/">wagtail.io</a>.</p>
<h3>Brief description of the feature</h3>
<p>Wagtail has a wonderful admin which also allows handling images. Internally wagtail has <code>wagtailimages</code> app which contains the default Image model. But the fields provided in the default Image model may not be sufficient for your project. Like we want to store the <code>source</code> of every image and display on our site. Source field is not present in Image model. Fortunately, Wagtail allows to switching to custom Image model in which new fields can be added based on the project requirements. In our case, we want to add the source field.</p>
<p>Wagtail has a wonderful admin which also allows handling images. Internally wagtail has <code>wagtailimages</code> app which contains the default Image model. But the fields provided in the default Image model may not be sufficient for your project. Like we want to store the <code>source</code> of every image and display on our site. Source field is not present in Image model. Fortunately, Wagtail allows switching to custom Image model in which new fields can be added based on the project requirements. In our case, we want to add the source field.</p>
<h3>Implementation</h3>
<p>Like Django, Wagtail also has a great documentation. It also has documentation on the <a href="http://docs.wagtail.io/en/stable/advanced_topics/images/custom_image_model.html">Custom image models</a>. After following the docs, our project will be switched to Custom Image model with new fields like source. But when we open Images section in Wagtail admin, it will be empty. The reason is mentioned in docs:</p>
<p>When changing an existing site to use a custom image model, no images will be copied to the new model automatically. Copying old images to the new model would need to be done manually with a data migration.</p>
Expand Down

0 comments on commit abc0409

Please sign in to comment.