Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,154,195 members, 7,822,042 topics. Date: Thursday, 09 May 2024 at 03:39 AM

Taofeekdboy's Posts

Nairaland Forum / Taofeekdboy's Profile / Taofeekdboy's Posts

(1) (2) (3) (4) (5) (6) (7) (8) (9) (10) (of 18 pages)

Programming / Re: Built A Pizza Application With React. Added A Custom Pizza Builder. by Taofeekdboy(m): 10:16pm On Jul 23, 2020
tensazangetsu20:
This is still a work in progress. Took inspiration from dodopizza.ng to create https://chinomso1995.github.io/dodosPizza/. Added a custom pizza builder. App was done with react. Still not finished though. Authentication and taking care of orders (a page for displaying orders). Taofeekedboy, devdev and olalekank really helped when I got stuck on the modal.
That's very nice.
Few suggestions tho,
If you can make it more unique than its parent project, you can use filtering method other than the data-target method.
Also limiting items in a single load will be awesome as well, as this will make it look more interactive.
But it is a job well done.
Programming / Re: For Django Developer by Taofeekdboy(m): 6:38pm On Jul 19, 2020
LSarcastic:
I think the OneToOne relationship is a better approach. One thing I've learnt about OOP is the SOLID principle. Responsibilities should be divided across classes and models. Leave the User model to handle core Django features while you have a different model that provides other functionalities for a user. So many things could go wrong with Abstract User.

I understand you perfectly but there are some scenarios where AbstractUser is a better approach as well and based on the example I made earlier, it is a better approach, when you are writing permissions, it is a better approach to inherit from AbstractBaseUser when you know what you are doing. Using User model directly is very tho because if things go wrong then it can be fatal.

1 Like

Programming / Re: For Django Developer by Taofeekdboy(m): 5:02pm On Jul 19, 2020
Donpre:


You work remotely? as a Django or front-end developer?

that aside,
You know that redirect thing nairaland does when you log in, like it'll show a success page and then waits a while before redirecting to the home page. How can it be done with Django?

I've done my due diligence, but can seem to know how to use reverse_lazy, or reverse() to achieve that feature

Thanks!
I'm not working in Nigeria, I am just freelancing as a developer not full time but my main work is different from that.
Well if you need something like that, you will use javascript for that because django only redirect you once, you use setInterval and setTimout in javascript, that's the reason you need to learn javascript to be able to manipulate the Brower and your page.

1 Like

Programming / Re: For Django Developer by Taofeekdboy(m): 3:27pm On Jul 19, 2020
Toppytek:
To some extent I understand what guys are saying but I can’t really fathom is going on.

@Donpre what the the name of the editor you’re using on your phone? Is there something like that for iOS?

@Taofeekdboy come and adopt me please, make me your mentee.
If you need my assistance on it, you can pm me but you will have a lot to do on your side because my company has resumed and our timezone is different.

1 Like

Programming / Re: For Django Developer by Taofeekdboy(m): 7:25am On Jul 18, 2020
Donpre:


It's a typo, my url is correctly written courses:add_synopsis

also I can't remove the str cause the url actually take a course parameter just like the one below it that takes 2 parameters. it's from a reverse() in a get_absolute_url method of the model

funny thing is the code works fine provided the add_synopsis path is above the <str:course>, I just don't know why.

maybe I'll ask advanced Django groups

Thanks for the time
I got you but the way you are writing the URL path is wrong, when you are trying to match a path in django, it will start from the top to bottom to find the actual path but your path is not written in a nice structure...
Example,
You are writing a blog project and when you want to get a detail on a post, you match the path with the slug or pk of the post in your url so that your url will look like domain/blog/slug or pk
When you are receiving a parameter in your url path, your main path should have something to prefix it..
If you are not prefixing your url parameters with anything then your add synopsis must come first before your plain parameter path because it is still the same as empy string without getting the parameter.
Samething applicable when working with router in React.
Programming / Re: For Django Developer by Taofeekdboy(m): 11:57pm On Jul 17, 2020
Donpre:

I got the last part but the first part didn't explain why Django didn't just skip the first three paths, considering I used {% url "course:add_synopsis" %} in my HTML.
I would expect it would just call the view straight up but instead it's matching the second path.
OK, I don't know if you made a mistake, your app name is courses but you are using course in your url, and also the second path is not written well, remove the str from the course and leave only the course because you are not receiving a parameter in your view which you need to match it with...
If you look at the error, it is coming from the second path which means it is matching it with course.
Programming / Re: For Django Developer by Taofeekdboy(m): 11:30pm On Jul 17, 2020
Donpre:
@django developers

I need some explanation as to how url matching works. I've read the documentation but it didn't help.

When I placed my 'add_synopsis' path below the rest (as shown) I get an error (also shown)

Although I fixed it by moving the url path to the second position as recommend by a stack overflow post.

I just want to understand how the url matching works and why my code got that error in the first place, in case of future codes and larger projects

Thanks
In django urls, you have to be wary of the slash, strings and variables you use. In the second url path, you put <str:course> where as you are not getting a parameter for the course.
The only place where urls matching is very strict is your root folder url where admin, Django. Contib.auth has to come before your app urls.

1 Like

Programming / Re: For Django Developer by Taofeekdboy(m): 9:59pm On Jul 17, 2020
Toppytek:


Thanks a lot but really I don’t know what to do, I learnt JavaScript is super important for developers, but Python is my first programming language, and I can tell you that I have a natural proclivity for design and beautification especially in terms of color combinations. I haven’t gone far with Django but I need that mental readiness “what’s next?”

@taofeekdboy.
Your assumption is very right, Javascript is the main deal when it comes to UI/UX, if you are prolific in design and beautification, then you can start out as a frontend developer, with this you need to master Html, CSS and Javascript
Then you can further your backend path later with Django.

You just need to ask yourself which one is more comfortable for you or which one will give you happiness when doing it.
Programming to me is like having fun because whenever I am sitting down with my laptop, the joy I derive from it is second to none.
So go with whatever that gives you the confidence and oxytocin.

1 Like

Programming / Re: Programmers Of Nairaland. I Need Help!!! by Taofeekdboy(m): 9:45pm On Jul 17, 2020
tensazangetsu20:
Thanks to everyone who helped me out. Here is the final code I used https://codepen.io/chinomso1995/pen/mdVzZJE incase anyone else has a similar problem.
Nice bro... More cheers!!!!
Programming / Re: Programmers Of Nairaland. I Need Help!!! by Taofeekdboy(m): 3:45pm On Jul 17, 2020
tensazangetsu20:

Thank you so much for taking your time to go through this with me. God bless you.

Bro, I have worked on it, not really different from the one I did and also you are almost there, I have put some comments in it to get you through,
just make sure you map through or loop, which one you are comfortable.

https://codepen.io/taofeek-adeshina-adebayo/pen/yLeRqjw

1 Like

Programming / Re: Programmers Of Nairaland. I Need Help!!! by Taofeekdboy(m): 2:28pm On Jul 17, 2020
tensazangetsu20:

It is pure CSS no frameworks. What adjustments do you think I should make. The pizzamodal is in the same folder as the pizzas component. The modal is its own class based component. I made it class based to handle some events related to those slider buttons. Scroll down to check.
You need to map or loop through the pizzas state and map it to your Modal component, you don't need to write your Modal return output in Pizza component, you just need the props object from Pizza component, I will copy the code from your codepen and re write it....
Programming / Re: Programmers Of Nairaland. I Need Help!!! by Taofeekdboy(m): 1:28pm On Jul 17, 2020
tensazangetsu20:

https://codepen.io/chinomso1995/pen/mdVzZJE
Bros I tried to use your method but its not displaying the pictures or text. Can you go through the code . Maybe there is something I am not doing right. I already set all the properties on the pizzas array now I want to show a unque property according to each button click on that modal.
I have gone through your code but I noticed where you are passing Modal on Pizza component and you are using PizzaModal which is not getting the props, if you are using PizzaModal for the pizza details, then the component will be the one to get the props, then you can use it in your component.... And one more thing, if you are using css framework, at times the implementation might differ because they have incorporated their own javascript or React element into it because I am seeing Modal that you are passing into Pizza components and it is not a component on its own...
Programming / Re: For Django Developer by Taofeekdboy(m): 9:55am On Jul 17, 2020
Toppytek:
I’ve been hearing a lot about React and Vue but I don’t know which one to go for cos am yet to start my JavaScript journey, that been said, I have a thing for Flutter as well coz i learnt it can be integrated to the DRF.

I’m a Django newbie, started a month ago.
@taofeekdboy @donpre

Well, React is a Javascript library while Vue is a javascript framework, both are used for frontend development.
Vue is easy to learn and grasp and it's documentation is super awesome, on the other hand, React has a steep learning curve compared to Vue and some concepts in React are difficult to digest such as props, life cycle but all can be achieved with consistency.
I will advise beginners to go for Vue because it is easy to setup and learn.
Flutter is used for mobile app development and in creation of desktop apps. It is written in Dart, a language created by Google.
Programming / Re: Programmers Of Nairaland. I Need Help!!! by Taofeekdboy(m): 1:05am On Jul 17, 2020
I have posted it on codepen, you can check it there as well .
https://codepen.io/taofeek-adeshina-adebayo/pen/yLeRqjw
Programming / Re: Programmers Of Nairaland. I Need Help!!! by Taofeekdboy(m): 12:55am On Jul 17, 2020
I am trying to post the code but it is not allowing it here
Programming / Re: Programmers Of Nairaland. I Need Help!!! by Taofeekdboy(m): 12:12am On Jul 17, 2020
tensazangetsu20:

Abeg can you just give me an example.
Yes I am writing one now... Just wait.
Programming / Re: Programmers Of Nairaland. I Need Help!!! by Taofeekdboy(m): 11:59pm On Jul 16, 2020
devdev:

Lol... you open the modal with boolean using setState.... that same setState pass the data of the current item and call it on the modal. Do you need example?
devdev is right, in your setState where you are calling your modal, pass the ID or the pizza data you want to show..
Programming / Re: For Django Developer by Taofeekdboy(m): 8:07am On Jul 14, 2020
Donpre:

It's funny how you painted React in such bright only to recommend Vue at the end

Another question tho, I know I'm getting ahead of myself here but is Vue/React integrated into the django template or you build API with DRF and make calls to that instead?
The reason why I said that was because Vue is easier to learn and can integrate easily, for beginners, you will always go for easier method right grin. I learnt React first, moving to Vue was so super easy that it didn't take me like 3 days to grab everything in Vue.
React has a steep learning curve compared to Vue because of its lifecycle can sometimes f*ck with your head, props and all that, but when you are comfortable with it, you won't leave it for other frameworks.

Back to your question,
You can integrate both Vue and React in django template directly but I won't advise you to do so because it will get messier as you are writing a lot of code, the best thing is build a Restful API and let your frontend consume the API, you can do whatever you want with it in the frontend.
So I build API with DRF and my React app consume the API, making calls, getting data, posting data, deleting data, patching data, updating and so on..

1 Like 1 Share

Programming / Re: For Django Developer by Taofeekdboy(m): 7:56am On Jul 14, 2020
fortifiedng:


Wanna ask a question, Taofeekdboy. When developing your web apps with Django ofcourse, Do you build with Django itself or you build with DRF?
Django web apps can be built without using DRF, the main purpose of DRF is to build a Restful API to consume in your frontend, you can build webs apps with Django, JQuery, bootstrap.

Before learning React and other frontend tools, I built my web apps with Django only but after learning React, Vue, I make use of Django for my backend and React or Vue to consume the API in the frontend.
Building with DRF gives you a lot of advantages:
You can use your API for both web apps and mobile applications. Using React-native, you can consume your Restful API in your React-native projects.

3 Likes

Programming / Re: For Django Developer by Taofeekdboy(m): 9:47pm On Jul 13, 2020
Donpre:

I've been hearing this talk and I don't quite understand how Django and React are soulmates.

Also, how does a Vue-Django combo compare against a React-Django combo

#Newbie
Have worked with Vue-Django and React-Django but I prefer React-Django because React is easy to setup with Django both in development and production. As a newbie, I will advise you to go for Vue as your first javascript framework as it is easy to learn and simple to integrate with any backend language.
Django-React community is more accessible than Vue-Django.

2 Likes

Programming / Re: For Django Developer by Taofeekdboy(m): 8:24pm On Jul 13, 2020
fortifiedng:


How long did it take you to learn react?
It took me like 2 months to learn React fully but up till this moment I am still learning it, now I am at the stage of writing npm packages for resuability in other projects.

2 Likes

Programming / Re: For Django Developer by Taofeekdboy(m): 6:40pm On Jul 13, 2020
fortifiedng:
Undeniable. The blend of React and Django gives a sweet coding savour wink

UI/UX is another different field on it's own. Truly the road long pass trailer
As in, they are made for each other, I enjoy using Django with React a lot..
Programming / Re: For Django Developer by Taofeekdboy(m): 5:03pm On Jul 13, 2020
saheedniyi22:
I have this question to ask,

If I learn html,css, Django/flask. Can I call myself a full stack developer

Not really brother, I will still call that back end developer, Full stack developer knows most of the tools used for designing both the UI/UX and back end.
Though django uses jinja template to output logic on the front end but it is not enough as world has evolved beyond that. You need to have a solid understanding of frond end tools such as html, CSS, JavaScript(This is where you need to choose from different javascript frameworks: angular, react, vue e.t.c... react is just a library grin grin) and back end tools e.g PHP, Rust, C#, Python and so on.

If you are good with Javascript, you can use it for both frontend and backend development using nodejs. There are unlimited resources for you out there and you need to grab it, learn and continue learning as the journey to become a full stack developer long pass trailer.

1 Like

Programming / Re: For Django Developer by Taofeekdboy(m): 12:35am On Jul 13, 2020
ore291:

It's very nice as per more functions what my junior bro does for school now is zoom classes so maybe teachers should be able to create a schedule of classes and when the students logs in ,

he sees the schedule knows when he's to come online ,

he can then click on the subject which redirects to the teachers zoom link ,

Then after the class is done the teacher uploads
Assignment as you already have done .

Does the teacher give assignment individually or by class?
For now, individually, I wanted to make it general but I want a way where the teacher will keep track of the student and can make a report as well. I will buy the idea of the classes, mayb I can use the classes to make it more interactive.
Thanks brother.
Programming / Re: For Django Developer by Taofeekdboy(m): 11:43pm On Jul 12, 2020
http://tlinker.pythonanywhere.com
Two groups of teacher and student, a teacher can set questions for students to answer and also a teacher can prepare assignment for each student, getting the scores of each student and receiving their assignments. I am thinking of more functions to add to it tho
Programming / Re: My First Ever Javascript Webapp by Taofeekdboy(m): 11:34pm On Jul 12, 2020
ore291:
that'll be nice self , if you make it open source I won't mind contributing and I learnt Vue first cause on reddit they were like react has a very steep learning curve and for someone like me who just learnt JavaScript let me not go and injure my brain
It has been a long time... I think I told you about the project related to school management.
Well, I am done with the first part. If you don't mind you can check it up on
http://tlinker.pythonanywhere.com
Two groups of teacher and student, a teacher can set questions for students to answer and also a teacher can prepare assignment for each student, getting the scores of each student and receiving their assignments. I am thinking of more functions to add to it tho.

1 Like

Programming / Re: For Django Developer by Taofeekdboy(m): 2:14pm On Jul 08, 2020
codeigniter:



have u freelanced or work for some one before
Yes, but I mainly program for fun as I have my main job and hopefully I will start applying for IT jobs soon, my work won't permit me to work as a freelancer. During this covid, I worked for people. I freelance majorly in graphic designs.
Programming / Re: For Django Developer by Taofeekdboy(m): 7:12am On Jul 08, 2020
codeigniter:
I finally release the forum on heroku, but it is slow I saw someone saying pythonanywhere is better I will try it out later, I am still having trouble with AWS S3 partial credentials error does anybody know anything about that?

The website is http://Afrikas.herokuapp.com honest reports please and lastly, I am tired of indie development, no jobs its just like I am coding for fun, I saw some guy open a thread on working on open source, I think easy entrancy and free and available resources has made web development lot less available in my opinion, cloud infrastructure are too expensive even if u want to try ur own thing, I don't want to whine but I think the world is going to break soonest
Heroku is slow on first loading because it is on free plan and it goes to sleep after 30 minutes of inactivity, you can buy more dynos if you don't want it to be slow, I think it is $5 per month.
Pythonanywhere is good as well but both of them have their pros and cons
Pros
Pythonanywhere is fast and easy to setup.
Pythonanywhere manage your static and media files on their server without an external cloud server.
Pythonanywhere uses MySQL but you have to pay if you want to use postgresql

Heroku is easy to setup with heroku cli
Heroku has so many add-ons like redis and the likes which makes it easier for your deployment.
Heroku allows you to add your custom domain without additional charges.
Heroku uses postgresql without additional charges.
Cons
Pythonanywhere is not free for postgresql.
Pythonanywhere does not allow free custom domain unless you are going for a paid plan.
Pythonanywhere only avail your project for 3 months and you have to refresh after that or risk being removed from their server.

Heroku is very slow on first load and you have to buy more dynos to be able to enjoy the speed.
Heroku is complicated when working with database like moving from old one to new one or adding more tables to the database.
Heroku only manage your static files but your media files need to be hosted on external cloud server such as AWS, Azure e.t.c

I use both depending on the kind of project, I am working on.
Concerning the AWS partial credential error,
Make sure you include you aws secret key and ID in django project settings.

All skills are saturated, you just have to be the best to be able to get a job, it is based on experience, portfolio, ideas you have going on.
It is not easy bro, but you just have to continue as you will get soon.
Build a strong portfolio with amazing projects, then they will come looking for you.

3 Likes

Programming / Re: For Django Developer by Taofeekdboy(m): 6:53am On Jul 08, 2020
nosagold:
Hi guys, check this out!
http://limitless-garden-30512.herokuapp.com
Nice one bro, you need to work on the images because you have stretched them and the mobile responsiveness as well. You used only django right?
Programming / Re: I'm Encountering Error As A Newbie On Python Language by Taofeekdboy(m): 6:24pm On Jul 07, 2020
SPOLO:
good evening sirs.
please i started learning programming recently which i chose pyton as my main focus with the help a pdf and video for tutorials.

but i keep getting an error while i input this sets of numbers

>>>{x:x**2 for x in (2,4,6))}

where can i detect the error
Programming / Re: For Django Developer by Taofeekdboy(m): 12:36pm On Jul 06, 2020
EmZsquare:



Good work....try developing a fully functional e-commerce app and am sure you'll add more to your knowledge
Thank you bro, I have done that and it really did.
http://taadesina.pythonanywhere.com

I am working on a school management app now and it has added more to my knowledge as well.
you keep learning new things everyday
Programming / Re: For Django Developer by Taofeekdboy(m): 9:37am On Jul 05, 2020
env folder can be created manually, but it is '.env' folder not ordinary folder as this is used to hide some files you don't want to show in your git/github repository. The '. env' folder is added to .gitignore files. JustDjango teaches you as if you are a pro, he doesn't go in-dept with some terminologies.

You can read more on env folder.

(1) (2) (3) (4) (5) (6) (7) (8) (9) (10) (of 18 pages)

(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. 70
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.