Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,149,862 members, 7,806,437 topics. Date: Tuesday, 23 April 2024 at 04:35 PM

Learn How To Create Websites With Python(Django Web Framework) - Programming (4) - Nairaland

Nairaland Forum / Science/Technology / Programming / Learn How To Create Websites With Python(Django Web Framework) (5792 Views)

Python With Django Web Development Training using Real World Projects! / Why Django Is The Best Web Framework For Your Project / Let's Build A Simple Blog With Python(django) (2) (3) (4)

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

Re: Learn How To Create Websites With Python(Django Web Framework) by ColeDrain(m): 12:25am On Aug 04, 2020
KlausMichaelson:
And that was how the story ended??
sad

Hey man. I have been caught up in a lot. We will continue this month... Sorry guys..

1 Like

Re: Learn How To Create Websites With Python(Django Web Framework) by bukxy: 1:37am On Aug 05, 2020
following

1 Like

Re: Learn How To Create Websites With Python(Django Web Framework) by ColeDrain(m): 9:26am On Aug 19, 2020
Men. It's so hard to do a tutorial on Nairaland.
Re: Learn How To Create Websites With Python(Django Web Framework) by pixey(m): 9:57am On Aug 19, 2020
@coledrain Keep up the good work for django beginners ! You are really amazing.
Re: Learn How To Create Websites With Python(Django Web Framework) by pixey(m): 9:59am On Aug 19, 2020
ColeDrain:
Men. It's so hard to do a tutorial on Nairaland.
The next tutorial will be using render,jinja2 templates,templates inheritance and bootstrap.I guess.
Re: Learn How To Create Websites With Python(Django Web Framework) by BoleAndFish: 12:45pm On Aug 19, 2020
Good day guys. Pls I need suggestions on good videos or book on django to download.

Please, help.
Re: Learn How To Create Websites With Python(Django Web Framework) by ColeDrain(m): 4:33pm On Aug 19, 2020
BoleAndFish:
Good day guys. Pls I need suggestions on good videos or book on django to download.

Please, help.

Books:
1. Django 3 by Example
2. Two Scoops of Django

Videos:
Check these guys on YouTube, they have tons of Django videos.
1. Just Django
2. Corey Shafer
3. Dennis Ivy

2 Likes

Re: Learn How To Create Websites With Python(Django Web Framework) by ColeDrain(m): 4:33pm On Aug 19, 2020
pixey:
@coledrain Keep up the good work for django beginners ! You are really amazing.

Thanks man.
Re: Learn How To Create Websites With Python(Django Web Framework) by BoleAndFish: 8:53pm On Aug 20, 2020
ColeDrain:


Books:
1. Django 3 by Example
2. Two Scoops of Django

Videos:
Check these guys on YouTube, they have tons of Django videos.
1. Just Django
2. Corey Shafer
3. Dennis Ivy
Thanks a lot. I really appreciate.

1 Like

Re: Learn How To Create Websites With Python(Django Web Framework) by rastaxarm(m): 9:27pm On Aug 21, 2020
Rate my work.. my first major Flask App
a voting system for schools, organization etc
LINK: https://digitavote.pythonanywhere.com/
SOURCE: https://github.com/xarmzon/digitavote
ADMIN LOGIN FOR TEST
Email: t1@email.com
Pass: pass
������

Re: Learn How To Create Websites With Python(Django Web Framework) by BoleAndFish: 10:41am On Aug 22, 2020
rastaxarm:
Rate my work.. my first major Flask App
a voting system for schools, organization etc
LINK: https://digitavote.pythonanywhere.com/
SOURCE: https://github.com/xarmzon/digitavote
ADMIN LOGIN FOR TEST
Email: t1@email.com
Pass: pass
������
Wow this is really cool and beautiful. What does this false message when you do admin login mean though?

Re: Learn How To Create Websites With Python(Django Web Framework) by BoleAndFish: 10:46am On Aug 22, 2020
Hi ColeDrain, I just installed django through your tutorial and it was successful. Though I got a message when I ran mysite in the command prompt saying

You have 18 unapllied migration(s). your project may not work properly until you apply the migrations for app(s): admin, auth, contenttypes, sessions. Run 'python manage.py migrate' to apply them.

Should I run it?

Re: Learn How To Create Websites With Python(Django Web Framework) by ColeDrain(m): 12:31pm On Aug 22, 2020
BoleAndFish:
Hi ColeDrain, I just installed django through your tutorial and it was successful. Though I got a message when I ran mysite in the command prompt saying

You have 18 unapllied migration(s). your project may not work properly until you apply the migrations for app(s): admin, auth, contenttypes, sessions. Run 'python manage.py migrate' to apply them.

Should I run it?

Yeah, that will solve the issue.
Re: Learn How To Create Websites With Python(Django Web Framework) by Daejoyoung: 2:15pm On Aug 22, 2020
BoleAndFish:
Hi ColeDrain, I just installed django through your tutorial and it was successful. Though I got a message when I ran mysite in the command prompt saying

You have 18 unapllied migration(s). your project may not work properly until you apply the migrations for app(s): admin, auth, contenttypes, sessions. Run 'python manage.py migrate' to apply them.

Should I run it?
yes
Re: Learn How To Create Websites With Python(Django Web Framework) by rastaxarm(m): 8:01pm On Aug 22, 2020
BoleAndFish:
Wow this is really cool and beautiful. What does this false message when you do admin login mean though?

Super Admin

Only super admin can see this option

Re: Learn How To Create Websites With Python(Django Web Framework) by BoleAndFish: 1:22pm On Sep 03, 2020
ColeDrain:
POST 9

Now we have created a view

Now let's create some urlpatterns to be matched.

open the mysite/urls.py file and update it as follows...

from django.contrib import admin
from django.urls import path, include

urlpatterns = [
path('admin/', admin.site.urls),
path('', include('polls.urls')),
]


This code path('', include('polls.urls')) from above will redirect everything that comes into 'http://127.0.0.1:8000/' to polls.urls(our app)

The point being that each app has its own url patterns(for now we have only one app).

Go to the polls directory and create a urls.py file, open it in your text editor and add these code..
from django.urls import path
from . import views

urlpatterns = [
path('', views.index, name='index'),
]


So once we have a url that matches the pattern above it calls the index view we created in POST 8(do u remember?)

Go to your command prompt and run the server again by entering:
py manage.py runserver

Then go to your browser and go to http://127.0.0.1:8000/, you should see Hello World. You are doing well as we described in the view function we created.
How do I do this?
Go to the polls directory and create a urls.py file
Re: Learn How To Create Websites With Python(Django Web Framework) by Daejoyoung: 1:39pm On Sep 03, 2020
BoleAndFish:
How do I do this?
Right click on polls, then select New file.
Name it urls.py.

Or go to the folder in your computer where you created the polls application e.g Desktop, Downloads, etc. Under polls, create new file.
Re: Learn How To Create Websites With Python(Django Web Framework) by BoleAndFish: 1:43pm On Sep 03, 2020
Daejoyoung:

Right click on polls, then select New file.
Name it urls.py.

Or go to the folder in your computer where you created the polls application e.g Desktop, Downloads, etc. Under polls, create new file.
When I click on new file, what type do I select? Text file?
Re: Learn How To Create Websites With Python(Django Web Framework) by Daejoyoung: 1:59pm On Sep 03, 2020
BoleAndFish:
When I click on new file, what type do I select? Text file?
python, or you just name it urls.py
Re: Learn How To Create Websites With Python(Django Web Framework) by BoleAndFish: 2:12pm On Sep 03, 2020
Daejoyoung:

python, or you just name it urls.py
No option of python file to choose from. See attached screenshot.

Re: Learn How To Create Websites With Python(Django Web Framework) by ColeDrain(m): 2:56pm On Sep 03, 2020
BoleAndFish:
How do I do this?
What text editor are you using?

Just create a new file from your text editor and save it in the polls folder.
Re: Learn How To Create Websites With Python(Django Web Framework) by Daejoyoung: 3:01pm On Sep 03, 2020
BoleAndFish:
No option of python file to choose from. See attached screenshot.
ok then that doesn't work, then you go back to my first suggestion. Are you using pycharm or vscode? you can click on poles in any text editor like the above, then click on New file.
Re: Learn How To Create Websites With Python(Django Web Framework) by BoleAndFish: 3:47pm On Sep 03, 2020
Daejoyoung:

ok then that doesn't work, then you go back to my first suggestion. Are you using pycharm or vscode? you can click on poles in any text editor like the above, then click on New file.
ColeDrain:

What text editor are you using?

Just create a new file from your text editor and save it in the polls folder.
I'm using sublime text though I also have pycharm. Thanks for the suggestion. It worked.

1 Like

Re: Learn How To Create Websites With Python(Django Web Framework) by KlausMichaelson: 5:29pm On Jan 04, 2021
Coledrain a good job is what you've done here so far.

I have learnt the basics of the use of Django I also have learnt the basics of Css and Xhtml.


How do I combine them all together to start creating a real project?? i.e Xhtml, Css, Django and Python.
Re: Learn How To Create Websites With Python(Django Web Framework) by KlausMichaelson: 11:44pm On Jan 07, 2021
Coledrain Happy New year from this side. I am still anticipating your return... Remain Blessed!

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

Java Programming: Magic Square / Free C++ Reliable UDP Networking Library / Initial Coin Offering (ICO) Script For Sale - Build your own crypto currency

(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 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 27
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.