₦airaland Forum

Welcome, Guest: RegisterLoginWith GoogleTrendingRecentNew

Stats: 3,325,108 members, 8,420,373 topics. Date: Thursday, 04 June 2026 at 05:59 PM

Toggle theme

Castrosteve's Posts

Nairaland ForumCastrosteve's ProfileCastrosteve's Posts

1 2 3 (of 3 pages)

FoodRe: What Does Locust Beans Add To Food? by castrosteve: 4:34pm On May 15
Iru is rich in B complex vitamins such as Riboflavin and Folic Acid
PhonesRe: What Is Wrong With Airtel Network Lately?! by castrosteve: 4:29pm On May 15
Airtel VOLTE has been wonderful for me here in Ibadan around Lagos ibadan toll gate to be precise... i hope what you guys are complaining doesn't reach my side oo
CrimeRe: How I Almost Lost My Phone To A Thief by castrosteve: 9:22am On May 11
Lucky you..it happened to me around March this year... they driver distracted me with an impossible price to my destination which I was busy arguing while a guy sitting next to me picked my pocket while supporting me that the price the driver called was ridiculous..when I said I won't go anymore I was quickly dropped and the moment I checked my shorts pocket phones was gone they had already speed off....I chased with bike but I couldn't locate them cos the mixed with other keke ...
Jobs/VacanciesRe: CDCFIB Releases Names Of Successful Applicants by castrosteve: 9:59am On Nov 02, 2025
The site is working now...you can complete your registration and submit
Christianity EtcRe: Plan Your Prayer By Pastor Chris by castrosteve: 6:55am On Jul 28, 2025
The way people only listen to Judge these days goes to show that even if christ were come back he will criticised and crucifed again...know this, No Man is without sin be it the Pope or any General overseer of any church , worry more about the message than the messenger and read the bible for yourself
Christianity EtcRe: Priscilla Ojo Dumps Christianity For Islam because Of A Man! Is He Manipulating Her by castrosteve: 8:21am On Jul 14, 2025
What you people don't understand is that there is a synergy between Islam and white garment churches, come the Ibadan which the the hub of white garment churches , you will realise how they easily marry Muslims,,its very common here and I keep wondering why
NYSCRe: Top 10 NYSC Orientation Camps In Nigeria In 2025 by castrosteve: 9:07am On Jun 12, 2025
Why is iseyin camp oyo state not on the list..that camp is dope and spacious
RomanceRe: Ladies (Aged 30-38 Years) How To Get Married In 2025/2026 by castrosteve: 5:45am On Jun 10, 2025
Trust me, Nairaland isn’t the right place for this thread. Your real audience is on Instagram, TikTok, Snapchat, and Twitter — that’s where you’ll find the full-blown witches in their 30s, ready to drop responses that’ll make you realize just how little hope there is for healthy relationships in our generation.
FoodRe: Dangote Moves To Crash Rice Price After Rabiu's Pledge by castrosteve: 6:05am On May 27, 2025
Bag of rice is actually 62k as of yesterday when I priced it in the market here in Ibadan. I don't know if it because of dangote but price rice is actually coming down..let's see how far down it can go and for how long
HealthRe: Have Just Been Diagnosed With Herpes by castrosteve: 4:19pm On Jun 20, 2023
Pls herpes zoster is different from herpes simplex... the former causes chicken pox and the latter is an STD
HealthRe: Have Just Been Diagnosed With Herpes by castrosteve: 4:07pm On Jun 20, 2023
Once upon a time typhoid and malaria had no cure , they were killer diseases.... very soon viral diseases will be conquered
Jobs/VacanciesRe: Npower: Deployment Have Started, Please Check Your NASIMS Portal by castrosteve: 3:24pm On Aug 31, 2021
ezenwaez:
Where is that guy that was abusing that there is no Physical Verification
He has gone for physical verification
Technology MarketRe: All Offerup, Letgo, Craigslist, 5miles, Ebay, Amazon Deals.*READ FIRST PAGE* by castrosteve: 1:21pm On Mar 18, 2021
[quote author=Keeyzoh post=98203682][/quote]Sorry to derail
But I got a Samsung note 4 for sale everything but the back camera is working good.
Call me on 08140661223
PhonesRe: My Experience Using The Umidigi A7 Pro by castrosteve: 1:14pm On Mar 18, 2021
Richnero:
Do you still need the screen?
Yes I need the screen
PhonesRe: My Experience Using The Umidigi A7 Pro by castrosteve: 1:11pm On Mar 18, 2021
Is the phone screen still available?
I'm looking to get umidigi A7 screen mine is not blank but its not touching something like the calibration and the engineer said the screen is bad.
Contact me on 08140661223 if you have useful information or has screen for sale.
Thanks
PhonesRe: The Official Samsung Galaxy A70 Thread by castrosteve: 11:59am On Jul 10, 2020
Pls I want to buy Samsung c9 pro wth 6gig ram 4000mah.Although d andriod version s 7.1..just think this spec suit my budget....any advice
PhonesRe: UMIDIGI DISCUSSION THREAD by castrosteve: 9:25pm On Jun 29, 2020
Hello guys...more reviews needed for A7 pro...how's the phone so far..for those that have gotten it
ProgrammingRe: A Thread For Tutorial On Python Programming by castrosteve: 6:52pm On Apr 14, 2020
Paapii3d:
1. Basics and Introduction to CSS


https://www.youtube.com/watch?v=U7Iik_QVlMQ
mr Caleb aka paapi i hail your great work and effort in making the programming language u teach easy to understand.. pls i would like u to continue uploading youtube videos on css and python.. thanks alot bro
ProgrammingRe: Learn How To Create Websites With Python(Django Web Framework) by castrosteve: 1:34pm On Apr 06, 2020
ColeDrain:
Okay the problem is from your mysite/urls.py file.

Change this line:
path('', include('polls.urls')),
to
path('polls/', include('polls.urls')),

And try again from ur browser.
phew... am all good thankss...
ProgrammingRe: Learn How To Create Websites With Python(Django Web Framework) by castrosteve: 10:04am On Apr 06, 2020
mysite/url.py

ProgrammingRe: Learn How To Create Websites With Python(Django Web Framework) by castrosteve: 9:58am On Apr 06, 2020
ColeDrain:
Okay screenshot your polls/urls.py file and mysite/urls.py file.
ok

ProgrammingRe: Learn How To Create Websites With Python(Django Web Framework) by castrosteve: 11:51pm On Apr 05, 2020
ColeDrain:
It should be this instead:
def detail(request, question_id):
return HttpResponse("You're looking at question %s." % question_id)
ok it works but am getting 404 error but the url works with /admin

ProgrammingRe: Learn How To Create Websites With Python(Django Web Framework) by castrosteve: 9:20am On Apr 05, 2020
ColeDrain:
Check line 8 of your polls/views.py. Hope it's like this:
def detail(request, question_id):

If it is like that, then screenshot your views.py file.
its def function
pass detail

ProgrammingRe: Learn How To Create Websites With Python(Django Web Framework) by castrosteve: 6:42pm On Apr 04, 2020
ColeDrain:
Help us to help you. Post screenshots of the error.
ok

ProgrammingRe: Learn How To Create Websites With Python(Django Web Framework) by castrosteve: 11:08am On Apr 04, 2020
ColeDrain:
POST 13

Things we've learned so far: views, urlpatterns, models, how the web works, admin site

Moving back to the views
We said views are functions that take request from the user(browser) and then generates a response
which is sent to the user's browser. For now this is how our views.py looks like except you added any view to it for practice:

from django.shortcuts import render
from django.http import HttpResponse
# Create your views here.

def index(request):
return HttpResponse("Hello World. You are doing well"wink


Our polls website will have the following views:
index view - displays latest questions to users
detail view - displays details about a specific question
results view - displays results for a particular question
vote view - enable user to vote for a specific choice

So basically, once a user comes to our website's home page, he sees latest questions, he can click on a specific
question and vote for a choice and also see the total results.
Update[b] polls/views.py[/b] as follows:

from django.http import HttpResponse

def index(request):
return HttpResponse("Hello, world. You're at the polls index."wink

def detail(request, question_id):
return HttpResponse("You're looking at question %s." % question_id)

def results(request, question_id):
response = "You're looking at the results of question %s."
return HttpResponse(response % question_id)

def vote(request, question_id):
return HttpResponse("You're voting on question %s." % question_id)


please convert the emoji to )

Let me explain some things
So we said views are functions that take request from browser.
but some of the views above take another argument question_id
Okay, let's say the user sends a request to django that he wants question 2, how does django
know the question the user wants to view??
Answer- through question_id(so that's why we have question_id)

So user comes to our homepage sees 4 questions, he clicks on number 2, (request, 2) is sent to
django, to help django know the user wants question 2 and then the detail view returns a response
You're looking at question 2.


Like we normally do, after creating our views we create urlpatterns, so go to polls/urls.py and update as such:
(remove the once you created before, if you did)

from django.urls import path

from . import views

urlpatterns = [
path('', views.index, name='index'),
path('<int:question_id>/', views.detail, name='detail'),
path('<int:question_id>/results/', views.results, name='results'),
path('<int:question_id>/vote/', views.vote, name='vote'),
]


Don't get worried, I will explain. So when a user makes a request he is basically sending a url to django.
You type in nairaland.com/login, you are requesting for nairaland's login page.

So in our polls website, once the user comes to our homepage 127.0.0.1:8000/polls
django will check the mysite/url.py first and if you check your mysite.url/py which is this:

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

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


Django is looking for a urlpattern that matches 127.0.0.1:8000/polls/
once django sees that line[b] path('polls/', include('polls.urls'))[/b] it sees a match then
it goes to the polls/urls.py and then matches path('', views.index, name='index'). You get??

Okay another example to clear things up. A user wants to see question 4, so he clicks it,
this sends 127.0.0.1:8000/polls/4/ to Django, Django starts looking for a match.
It first goes to mysite/urls.py and matches polls and then goes to polls/urls.py and
matches path('<int:question_id>/', views.detail, name='detail')
the <int:question_id>/ matches 4, then Django sends it to the view which then gives a response.

Save the files, then run the server(py manage.py runsever)
Go to your browser and try the following urls:
127.0.0.1:8000.polls/
127.0.0.1:8000.polls/5/
127.0.0.1:8000.polls/5/results/
127.0.0.1:8000.polls/vote/


Always remember user sends a request, a url is sent to the Django, the url contains info
about what the user wants, Django tries to find a match with the urlpatterns it already has,
once a match is found the request is sent to the appropriate view(function) which returns a response to the user.
Something is not right,,,I keep getting syntax error...I copied and pasteed the codes in views.py and url.py..,I also changed the emoji to close bracket..j still don't y am seeing syntax error
ProgrammingRe: Learn How To Create Websites With Python(Django Web Framework) by castrosteve: 10:06pm On Apr 01, 2020
pheww finally am doing well... boss Coledrain fire on.... you are doing well sir

ProgrammingRe: Learn How To Create Websites With Python(Django Web Framework) by castrosteve: 1:05pm On Apr 01, 2020
Good job bro .. I don't really know why am stilstill having error in creating app..and it seems easy Ooo that's y it's annoying ... It's telling me "include "is not defined in polls or so
ProgrammingRe: Learn How To Create Websites With Python(Django Web Framework) by castrosteve: 8:37pm On Mar 30, 2020
Nice one .... Fire on bro
Jobs/VacanciesRe: Kaduna State Government 2019 Recruitment Into Public Service. How To Apply by castrosteve: 5:17pm On Mar 11, 2020
jeffsticky:
Those living within Kd already have information about this recruitment delay. They only chose not to share because of fear of criticism.
Lolz.. This is the best place for legit information ...if you follow those kd residents info you might end up not applying for any kdsg job cos majority of them hate el rufai and don't believe any good thing can come from him base on the rubbish going on with the security of life in the state ..
Jobs/VacanciesRe: Kaduna State Government 2019 Recruitment Into Public Service. How To Apply by castrosteve: 9:52am On Mar 07, 2020
zeenaman:
We are not family members, and you are this serious about my comment? I don't know how to be rude to people. But please, you can ignore my comment
Lolzzz....this zeenaman sef..
Jobs/VacanciesRe: Kaduna State Government 2019 Recruitment Into Public Service. How To Apply by castrosteve: 4:28pm On Mar 05, 2020
Uspic:
Lol. Wat part scares you the most? That's it thw job is not guaranteed because you're called for interview or that the process can take as long as NNPC? Take hear bro Moses grin
Lolz ..it's not even that sef
... It's just that some people have so much negativity in their blood that they can even be immune to the HIV virus....pls oo unless otherwise stated by kdsg, lets just be patient aaaah...
Jobs/VacanciesRe: Kaduna State Government 2019 Recruitment Into Public Service. How To Apply by castrosteve: 3:46pm On Mar 05, 2020
I just dey Kuku observe as some of ona sabi spread fear ....continue spreading the fear..after interview they will spread it...after sppointment letter sef. ..even if salary delay small sef...awon spread fear geng ...now I can imagine what Moses went through with the Israelites ...

1 2 3 (of 3 pages)