{"id":73,"date":"2019-04-17T18:13:56","date_gmt":"2019-04-17T18:13:56","guid":{"rendered":"https:\/\/r0b3rt.com\/andr-web\/?p=73"},"modified":"2019-04-17T18:14:03","modified_gmt":"2019-04-17T18:14:03","slug":"url-demo-project","status":"publish","type":"post","link":"http:\/\/r0b3rt.com\/andr-web\/url-demo-project\/","title":{"rendered":"URL Demo Project"},"content":{"rendered":"<h2 id=\"a-demo-project\">A demo project<\/h2>\n<p>Let us create a small <code class=\"highlighter-rouge\">django project<\/code> to uderstand how URL shortening work. You may fork my project <a href=\"https:\/\/github.com\/anandjoshi91\/url-shortener\" target=\"_blank\" rel=\"noopener noreferrer\">url-shortener<\/a> from the GitHub.<\/p>\n<p>After forking the above repo, change the log path in <code class=\"highlighter-rouge\">shorturl\/settings.py<\/code> and run the application by typing the following command<\/p>\n<div class=\"highlighter-rouge\">\n<div class=\"highlight\">\n<pre class=\"highlight\"><code>python manage.py runserver\r\n<\/code><\/pre>\n<\/div>\n<\/div>\n<p>This will create the <code class=\"highlighter-rouge\">shorturl\/db.sqlite3<\/code> file. After this run the DB migrations to create the required tables by using the following command.<\/p>\n<div class=\"highlighter-rouge\">\n<div class=\"highlight\">\n<pre class=\"highlight\"><code>python manage.py migrate\r\n<\/code><\/pre>\n<\/div>\n<\/div>\n<h3 id=\"this-is-how-the-home-page-looks\">This is how the home page looks.<\/h3>\n<p><img decoding=\"async\" src=\"https:\/\/anandjoshi.me\/img\/url-shortener-home.PNG\" alt=\"url-shortener-home\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>A demo project Let us create a small django project to uderstand how URL shortening work. You may fork my project url-shortener from the GitHub. After forking the above repo, change the log path in shorturl\/settings.py and run the application by typing the following command python manage.py runserver This will create the shorturl\/db.sqlite3 file. After &hellip; <a href=\"http:\/\/r0b3rt.com\/andr-web\/url-demo-project\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;URL Demo Project&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[],"class_list":["post-73","post","type-post","status-publish","format-standard","hentry","category-computer-it"],"_links":{"self":[{"href":"http:\/\/r0b3rt.com\/andr-web\/wp-json\/wp\/v2\/posts\/73","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/r0b3rt.com\/andr-web\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/r0b3rt.com\/andr-web\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/r0b3rt.com\/andr-web\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/r0b3rt.com\/andr-web\/wp-json\/wp\/v2\/comments?post=73"}],"version-history":[{"count":1,"href":"http:\/\/r0b3rt.com\/andr-web\/wp-json\/wp\/v2\/posts\/73\/revisions"}],"predecessor-version":[{"id":74,"href":"http:\/\/r0b3rt.com\/andr-web\/wp-json\/wp\/v2\/posts\/73\/revisions\/74"}],"wp:attachment":[{"href":"http:\/\/r0b3rt.com\/andr-web\/wp-json\/wp\/v2\/media?parent=73"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/r0b3rt.com\/andr-web\/wp-json\/wp\/v2\/categories?post=73"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/r0b3rt.com\/andr-web\/wp-json\/wp\/v2\/tags?post=73"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}