Stats: 3,190,905 members, 7,942,268 topics. Date: Saturday, 07 September 2024 at 05:12 AM |
Nairaland Forum / Science/Technology / Programming / For Django Developer (12775 Views)
Python/django Developer / CI/CD Pipeline For Django Application / Django Developer Plz Help (2) (3) (4)
(1) (2) (3) (4) (5) (6) (7) (8) (9) (Reply) (Go Down)
Re: For Django Developer by Taofeekdboy(m): 6:40pm On Jul 13, 2020 |
fortifiedng:As in, they are made for each other, I enjoy using Django with React a lot.. |
Re: For Django Developer by fortifiedng: 6:45pm On Jul 13, 2020 |
Taofeekdboy: How long did it take you to learn react? |
Re: For Django Developer by Taofeekdboy(m): 8:24pm On Jul 13, 2020 |
fortifiedng: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 |
Re: For Django Developer by Donpre(m): 9:36pm On Jul 13, 2020 |
Taofeekdboy: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 |
Re: For Django Developer by Taofeekdboy(m): 9:47pm On Jul 13, 2020 |
Donpre: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 |
Re: For Django Developer by fortifiedng: 12:32am On Jul 14, 2020 |
Taofeekdboy: Wanna ask a question, Taofeekdboy. When developing your web apps with Django ofcourse, Do you build with Django itself or you build with DRF? |
Re: For Django Developer by Donpre(m): 12:57am On Jul 14, 2020 |
Taofeekdboy: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? |
Re: For Django Developer by Taofeekdboy(m): 7:56am On Jul 14, 2020 |
fortifiedng: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 |
Re: For Django Developer by Taofeekdboy(m): 8:07am On Jul 14, 2020 |
Donpre: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 ![]() 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 |
Re: For Django Developer by Donpre(m): 9:19am On Jul 14, 2020 |
Taofeekdboy:Thanks |
Re: For Django Developer by Toppytek(m): 9:19am On Jul 17, 2020 |
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 |
Re: For Django Developer by Taofeekdboy(m): 9:55am On Jul 17, 2020 |
Toppytek: 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. |
Re: For Django Developer by Donpre(m): 11:12am On Jul 17, 2020 |
Toppytek: Can't help you with the JavaScript because I haven't learnt any too, but it's as @taofeekdboy said. There's no more I can add. For flutter, I'm actually a flutter developer and it's for mobile apps, (desktop and web) but the last two are still terrible to use. All of them(React, Vue and Flutter) can consume REST API from DRF |
Re: For Django Developer by Toppytek(m): 9:32pm On Jul 17, 2020 |
Donpre: 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. |
Re: For Django Developer by Taofeekdboy(m): 9:59pm On Jul 17, 2020 |
Toppytek: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 |
Re: For Django Developer by Donpre(m): 11:14pm On Jul 17, 2020 |
@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
|
Re: For Django Developer by Taofeekdboy(m): 11:30pm On Jul 17, 2020 |
Donpre: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 |
Re: For Django Developer by SUGARSON(m): 11:35pm On Jul 17, 2020 |
EngtTemmy:. I LOVE THE GUY'S TUTORIALS. . 2 Likes |
Re: For Django Developer by Donpre(m): 11:39pm On Jul 17, 2020 |
Taofeekdboy: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. |
Re: For Django Developer by Taofeekdboy(m): 11:57pm On Jul 17, 2020 |
Donpre: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. |
Re: For Django Developer by Donpre(m): 2:46am On Jul 18, 2020 |
Taofeekdboy: 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 |
Re: For Django Developer by Taofeekdboy(m): 7:25am On Jul 18, 2020 |
Donpre: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. |
Re: For Django Developer by Donpre(m): 1:02pm On Jul 18, 2020 |
Taofeekdboy:This is quite insightful... Thanks a lot |
Re: For Django Developer by Toppytek(m): 5:00pm On Jul 18, 2020 |
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. |
Re: For Django Developer by Donpre(m): 8:46pm On Jul 18, 2020 |
Toppytek: It's nothing complex, just ordering of url patterns, I already got some insight as to how to do it tho. the editor is Acode, while I use pydroid3 terminal to run command-line comands... I don't use iOS, but I'm sure a Google search would produce results |
Re: For Django Developer by Taofeekdboy(m): 3:27pm On Jul 19, 2020 |
Toppytek: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 |
Re: For Django Developer by Donpre(m): 3:57pm On Jul 19, 2020 |
Taofeekdboy: 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! |
Re: For Django Developer by Toppytek(m): 4:22pm On Jul 19, 2020 |
Taofeekdboy: PMed you |
Re: For Django Developer by Taofeekdboy(m): 5:02pm On Jul 19, 2020 |
Donpre: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 |
Re: For Django Developer by Heylonmusk: 5:05pm On Jul 19, 2020 |
Can I call myself a BACKEND developer if I have knowledge of Django or flask alone. |
Re: For Django Developer by LSarcastic: 5:18pm On Jul 19, 2020 |
EngtTemmy:Yeah, you can. For details, just quote this message |
Re: For Django Developer by LSarcastic: 5:28pm On Jul 19, 2020 |
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. Taofeekdboy: |
(1) (2) (3) (4) (5) (6) (7) (8) (9) (Reply)
Integrating Your Website With Interswitch Payment Gateway For Beginners / CODELAGOS: 337 Schools To Participate In Coding Competition / My Journey To The Programming World - Newbie
Viewing this topic: 1 guest(s)
(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. 67 |