Ibnu Afdel's Dev Diary


Kanal geosi va tili: ko‘rsatilmagan, ko‘rsatilmagan
Toifa: ko‘rsatilmagan


My coding Journey

Связанные каналы

Kanal geosi va tili
ko‘rsatilmagan, ko‘rsatilmagan
Toifa
ko‘rsatilmagan
Statistika
Postlar filtri


🎉 Laravel 🎉

Starting from tomorrow I will share my daily laravel journey. From the absolute beginning Insha'Allah.

I was playing with it this two days and it's kinda similar with Django..

I will try to :

- Write what I learnt
- what I love or hate compared to Django
- What I loved / hated the most

The materials I will use will be Vedio course from Laracast ( laravel 11 ) and I have one good laravel 10 book( I will share both materials here ). I would like you to start learning with me.

Who's gone be Web Artisan with me ? In the comment 👇🏼 💪🏼 😄


Reusable Components : In Django, there are a lot of things out of the box but for things that it doesn't support, you are supposed to take multiple steps, that's what I encountered.

To make custom tags, you have to make

1, make ' templatetags' directory in your app
2, make init.py
3, make your tags , for me it was nav_tags.py

Then in your template, load them and use them..

{% load nav_tags %}
...

- form attribute in Burton tags : If you have a button inside a form and the button is supposed to trigger another form since you can't have form inside a form, what are you supposed to do?

In the button add attribute called form

Delete
Then outside this form, creat the form of your need, in this case delete form and add id with the same name, you might also need to add hidden input with the same name in name attribute.






- Edit and delete in one logic: I found it's more convenient to not have separate logic to implement simple delete logic.

To make Django know what I wanted to do, I made hidden input in the delete form with the name attribute.

To know more about custome tags

Search : how to make Custom Tags

And read your own choice 🤗

If anything is unclear or if there is bad implementation, let me know




#Django_project
#side_project

Reusable Components in Django

It took me about 3hrs to do this simple website. I tried to make custom tags and it was not beginner friendly. The features that led for that much hrs ( features I learned)

- Reusable Custom Tags
- Delete logic inside Edit..
- form attribute of button

I will write about what they are and how I use them. More screenshots of the web will be posted and comments are appreciated 👍🏼

almost all are HyperUI tailwindscss components, HyperUI.dev


Welcome, My name is Ibnu Afdel. I am in my way to become Website developer, previously i used to learn python for data science but for some reasons i changed to web dev like 5 - 6 months ago with a little HTML,CSS,JS then started to focus on Django, so.. yeah i am junior in the field and since many senior developers recommend newbies to show there progress and documenting about it might help for the future, i will do that starting from today ( or maybe Monday 😭)

I will focus on Django and Laravel, Insha'Allah , I will start to learn Laravel in the near future (this Saturday - Monday max) and will compare the both and document what i learn in the day before sleeping. I will showcase my projects and just everything i get related to this 2 languages, i will try to share it here.. and that's what you will get if you join the channel.

I wont use any AI in my writings so, i would like to apologize for my broken English in this text and the upcoming ones.

5 ta oxirgi post ko‘rsatilgan.

8

obunachilar
Kanal statistikasi