Welcome, Guest: Join Nairaland / LOGIN! / Trending / Recent / New
Stats: 2,743,300 members, 6,507,790 topics. Date: Sunday, 26 September 2021 at 07:10 AM

Let's Build A Simple Blog With Python(django) - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / Let's Build A Simple Blog With Python(django) (6102 Views)

Nairaland Should Switch To Python/django. Opinion / Learn How To Create Websites With Python(Django Web Framework) / Let's Build An App That Can Predict Bet9ja Virtual League (FUN PROJECT) (2) (3) (4)

(1) (2) (3) (Reply) (Go Down)

Let's Build A Simple Blog With Python(django) by olamil34(m): 8:59pm On Sep 25, 2017
for the next two weeks, we will be building a simple blog, with python using django web framework. And we will deploy to heroku or aws(elastic beanstalk)

sponsored by http://www.quickfinda.com/ compare prices from different stores
Re: Let's Build A Simple Blog With Python(django) by olamil34(m): 9:07pm On Sep 25, 2017
first download the latest python 3 from www.python.org and when installing it, install the program for all users, in other to have access to it from the command prompt (windows) , or terminal(for mac users).
Re: Let's Build A Simple Blog With Python(django) by okosodo: 9:39pm On Sep 25, 2017
Why? When wordpress has made life easy
Re: Let's Build A Simple Blog With Python(django) by yorex2011: 9:45pm On Sep 25, 2017
Carry on... Its a good one.. There's a project i wanna undertake soon and i plan to use mean stack...

I don't actually know mean much but it will be a great way to learn, I'd try to share my learning path here if I can

1 Like

Re: Let's Build A Simple Blog With Python(django) by ezzylee(m): 10:09pm On Sep 25, 2017
okosodo:
Why? When wordpress has made life easy

So people can have a feel of python so as to see if they like it angry angry angry angry angry
Re: Let's Build A Simple Blog With Python(django) by greatface(m): 6:54am On Sep 26, 2017
okosodo:
Why? When wordpress has made life easy
WHY

Why use Whatsapp When Facebook Is There

2 Likes

Re: Let's Build A Simple Blog With Python(django) by greatface(m): 6:56am On Sep 26, 2017
Good one.
What features will be implemented?
Re: Let's Build A Simple Blog With Python(django) by olamil34(m): 8:42am On Sep 26, 2017
greatface:
Good one.

What features will be implemented?
sharing post to facebook, twitter and linkedin
Re: Let's Build A Simple Blog With Python(django) by olamil34(m): 8:47am On Sep 26, 2017
now create an empty folder, then open your command prompt or terminal and type cd(change directory), and then drag the file u created to command prompt and press enter.
Re: Let's Build A Simple Blog With Python(django) by olamil34(m): 8:51am On Sep 26, 2017
and type this command python -m venv ll_env it's create a virtual environment of which u can install libraries without conflict with the existing ones
Re: Let's Build A Simple Blog With Python(django) by olamil34(m): 11:27am On Sep 26, 2017
And then activate the virtual environment with this command ll_env/Scripts/activate
Re: Let's Build A Simple Blog With Python(django) by greatface(m): 11:46am On Sep 26, 2017
olamil34:
sharing post to facebook, twitter and linkedin
good one. am following
Re: Let's Build A Simple Blog With Python(django) by Nobody: 4:48am On Sep 27, 2017
Me too
Re: Let's Build A Simple Blog With Python(django) by olamil34(m): 8:05am On Sep 27, 2017
now we download django with the following command(type this command to your command prompt after u have activated it)
> pip3 install django
Re: Let's Build A Simple Blog With Python(django) by escapefromusa(f): 1:35am On Sep 28, 2017
olamil34:
now we download django with the following command(type this command to your command prompt after u have activated it) pip3 install django

You wan suffer Dem.

Start with bottle...
Re: Let's Build A Simple Blog With Python(django) by olamil34(m): 7:01am On Sep 28, 2017
escapefromusa:


You wan suffer Dem.

Start with bottle...
bottle allows u to code in whatever style u want and that is the problem, it allows begineers to write code in an unmaintainable way.
Re: Let's Build A Simple Blog With Python(django) by 2nioshine(m): 7:54am On Sep 28, 2017
olamil34:
bottle allows u to code in whatever style u want and that is the problem, it allows begineers to write code in an unmaintainable way.

Likewise flask and that is the reason i prefer django to these .. Nice one
Re: Let's Build A Simple Blog With Python(django) by bilard(m): 11:41pm On Sep 29, 2017
olamil34:
now we download django with the following command(type this command to your command prompt after u have activated it) pip3 install django

Hi, I tried installing using the steps you described but I got this error message, can you please help cry

Re: Let's Build A Simple Blog With Python(django) by 4kings: 1:10am On Sep 30, 2017
bilard:


Hi, I tried installing using the steps you described but I got this error message, can you please help cry

Open Command Prompt with administrative permission:
click on start button, type cmd, right click and select run as administrator, then run the pip command again.

Also close any python ide or process, cos windows can be crazy sometimes and deny access when another process is running.
Re: Let's Build A Simple Blog With Python(django) by olamil34(m): 3:29pm On Sep 30, 2017
bilard:


Hi, I tried installing using the steps you described but I got this error message, can you please help cry

u did activate the virtual environment
Re: Let's Build A Simple Blog With Python(django) by bilard(m): 12:02am On Oct 02, 2017
olamil34:
u did activate the virtual environment
Well, yes, here is what I did, i tried activating using the command given on this post and it gave an error message, so I went into the folder Scripts, looked for "activate", ran the script then tried installing Django then that error message.
Re: Let's Build A Simple Blog With Python(django) by webstacka: 6:41am On Oct 02, 2017
bilard:

Well, yes, here is what I did, i tried activating using the command given on this post and it gave an error message, so I went into the folder Scripts, looked for "activate", ran the script then tried installing Django then that error message.

make sure that Python "Scripts" directory is included in your system environment variables. Then you can use all those commands. Better still, ditch Windows and install Ubuntu.
Re: Let's Build A Simple Blog With Python(django) by webstacka: 6:53am On Oct 02, 2017
olamil34:
bottle allows u to code in whatever style u want and that is the problem, it allows begineers to write code in an unmaintainable way.

No. It doesn't. I've used bottle and its fun. With Object Oriented programming, you can implement MVC style in bottle, and did I forget to mention that bottle is faster than Django? Yes. It is. Bottle helps you to master python not "batteries-included" django. However, the lacking points in bottle are: form generation and validation, database access, and authentication. You still can implement these using WTForms for form validation, Sqlite3 or psycopg2 for raw data access (or the powerful SQLAlchemy or peewee orms), and open-auth for authentication.
Re: Let's Build A Simple Blog With Python(django) by olamil34(m): 7:28am On Oct 02, 2017
webstacka:


No. It doesn't. I've used bottle and its fun. With Object Oriented programming, you can implement MVC style in bottle, and did I forget to mention that bottle is faster than Django? Yes. It is. Bottle helps you to master python not "batteries-included" django. However, the lacking points in bottle are: form generation and validation, database access, and authentication. You still can implement these using WTForms for form validation, Sqlite3 or psycopg2 for raw data access (or the powerful SQLAlchemy or peewee orms), and open-auth for authentication.
dear friend, bottle is lower level web framework, thank for say that it lacks database access and authentication which is important for any web appilication development, so any beginner that does not understand what mvc means, could write code in slow, nasty, and digusting way.
Re: Let's Build A Simple Blog With Python(django) by olamil34(m): 9:05am On Oct 02, 2017
webstacka:


No. It doesn't. I've used bottle and its fun. With Object Oriented programming, you can implement MVC style in bottle, and did I forget to mention that bottle is faster than Django? Yes. It is. Bottle helps you to master python not "batteries-included" django. However, the lacking points in bottle are: form generation and validation, database access, and authentication. You still can implement these using WTForms for form validation, Sqlite3 or psycopg2 for raw data access (or the powerful SQLAlchemy or peewee orms), and open-auth for authentication.
django is so slow that instagram use it, washingpost nko, and not to forget nasa, mahalo, theonion, pinterest. So u mean to tell me that all this sites are slow.
Re: Let's Build A Simple Blog With Python(django) by Nobody: 6:33pm On Oct 02, 2017
olamil34:
django is so slow that instagram use it, washingpost nko, and not to forget nasa, mahalo, theonion, pinterest. So u mean to tell me that all this sites are slow.

Nginx to serve files. Literally, hundreds of Nginx sessions are spun.

Django sits in the back. Requests are cached and nginx serves files.

Django is slow. It has been proven over and over again.

https://www.youtube.com/watch?v=Niq-HoraNPo


https://www.youtube.com/watch?v=-2X4mB4hyLA

This gives you a place to start. Its not to tell you not to use it. But understand, when to use Django and when not.

Building a small app, why django, building an api, why django
Re: Let's Build A Simple Blog With Python(django) by Nobody: 6:42pm On Oct 02, 2017
bilard:

Well, yes, here is what I did, i tried activating using the command given on this post and it gave an error message, so I went into the folder Scripts, looked for "activate", ran the script then tried installing Django then that error message.

Ditch virtualenv.. download miniconda from the anaconda website install it.

open cmd.exe
run: conda create -n django python=3.5 django
after it installs
start the environment with
activate django
close the environment with
deactivate django.
Re: Let's Build A Simple Blog With Python(django) by crunchyDope(m): 7:21pm On Oct 02, 2017
Op..teach d django...abi we no know if bottle or plate de be4?..d topic clearly stated django not which python framework is better!
Re: Let's Build A Simple Blog With Python(django) by olamil34(m): 10:56pm On Oct 04, 2017
we will now create a project, first what is a project ? Well a project is like container that helps you manage the apps(code) you create it is more like a configuration file for django.

type the following command on your terminal or command prompt.

> django-admin startproject website(or any name you want to give) .
Re: Let's Build A Simple Blog With Python(django) by olamil34(m): 11:07pm On Oct 04, 2017
now we get into the fun stuff grin grin

we will now create an app(this will house most website logic), go into terminal or command prompt and type

> python manage.py startapp blog

this will create a folder called blog inside your home project and will contain views.py(handles the request from the user), models.py(your database), admin.py(cool admin app from the developers of django).

1 Like

Re: Let's Build A Simple Blog With Python(django) by olamil34(m): 10:43am On Oct 07, 2017
any question so far grin
Re: Let's Build A Simple Blog With Python(django) by bukiii(f): 3:20am On Oct 10, 2017
following

(1) (2) (3) (Reply)

Free Research Project/thesis Topics In Computer Science (PART 1) / Create Database Diagram From Oracle Database / Vb.net Crystal Report & Dataset

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2021 Oluwaseun Osewa. All rights reserved. See How To Advertise. 98
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.