zax4r0
and wrap with 3 backticks
ohh 😯 im new to programming
Agent Q
ohh 😯 im new to programming
The 3 backticks is a markdown feature to denote that its a code block. Like this is wrapped in 3 backticks (`)
zax4r0
├──  api_test │ ├──  init.py │ ├──  pycache │ │ ├──  init.cpython-39.pyc │ │ ├──  admin.cpython-39.pyc │ │ ├──  apps.cpython-39.pyc │ │ ├──  models.cpython-39.pyc │ │ ├──  serializers.cpython-39.pyc │ │ ├──  urls.cpython-39.pyc │ │ └──  views.cpython-39.pyc │ ├──  admin.py │ ├──  apps.py │ ├──  migrations │ │ ├──  0001_initial.py │ │ ├──  0002_auto_20210419_1113.py │ │ ├──  0003_alter_article_detaails.py │ │ ├──  init.py │ │ └──  pycache │ │ ├──  0001_initial.cpython-39.pyc │ │ ├──  0002_auto_20210419_1113.cpython-39.pyc │ │ ├──  0003_alter_article_detaails.cpython-39.pyc │ │ └──  init.cpython-39.pyc │ ├──  models.py │ ├──  serializers.py │ ├──  tests.py │ ├──  urls.py │ └──  views.py ├──  backend │ ├──  init.py │ ├──  pycache │ │ ├──  init.cpython-39.pyc │ │ ├──  settings.cpython-39.pyc │ │ ├──  urls.cpython-39.pyc │ │ └──  wsgi.cpython-39.pyc │ ├──  asgi.py │ ├──  settings.py │ ├──  urls.py │ └──  wsgi.py ├──  db.sqlite3 ├──  manage.py ├──  Procfile ├──  README.md ├──  requirements.txt └──  staticfiles
zax4r0
i did it 🤣
Shubham
in backtics
Mirco
!paste
Doragonsureiyā
Rule 5️⃣: To share code or error tracebacks, use an online pasting service like: - https://del.dog - https://dpaste.org - https://linkode.org - https://hastebin.com - https://bin.kv2.dev If you posted a wall of text, go back and delete it.
zax4r0
├──  api_test │ ├──  __init__.py │ ├──  __pycache__ │ │ ├──  __init__.cpython-39.pyc │ │ ├──  admin.cpython-39.pyc │ │ ├──  apps.cpython-39.pyc │ │ ├──  models.cpython-39.pyc │ │ ├──  serializers.cpython-39.pyc │ │ ├──  urls.cpython-39.pyc │ │ └──  views.cpython-39.pyc │ ├──  admin.py │ ├──  apps.py │ ├──  migrations │ │ ├──  0001_initial.py │ │ ├──  0002_auto_20210419_1113.py │ │ ├──  0003_alter_article_detaails.py │ │ ├──  __init__.py │ │ └──  __pycache__ │ │ ├──  0001_initial.cpython-39.pyc │ │ ├──  0002_auto_20210419_1113.cpython-39.pyc │ │ ├──  0003_alter_article_detaails.cpython-39.pyc │ │ └──  __init__.cpython-39.pyc │ ├──  models.py │ ├──  serializers.py │ ├──  tests.py │ ├──  urls.py │ └──  views.py ├──  backend │ ├──  __init__.py │ ├──  __pycache__ │ │ ├──  __init__.cpython-39.pyc │ │ ├──  settings.cpython-39.pyc │ │ ├──  urls.cpython-39.pyc │ │ └──  wsgi.cpython-39.pyc │ ├──  asgi.py │ ├──  settings.py │ ├──  urls.py │ └──  wsgi.py ├──  db.sqlite3 ├──  manage.py ├──  Procfile ├──  README.md ├──  requirements.txt └──  staticfiles
zax4r0
now
Shubham
you got it.
zax4r0
yeee 🥳
Javad
You can concatenate quotes.
Thank you. That's ok. Correct form is: <script> let base_url="{{baseurl.0.0}}" </script>
Kaushal
Can anyone tell me how to create an sign up and login page for a website
Shubham
although you can create your own custom function for the same. You can also install package for the same, django-allauth
Ibra
Hello, people! I have a question about how to properly organize the paginated loading of a dataset (in my case, the attributes of some objects). Is it possible to make it more effective or better? That is, for example, to divide the sending on the server and send it in parts to the server? At the moment, the requests are implemented on the front, then the front gets a link to the next page.
Shubham
Yes you can import paginator class for the same concern. for more detail, django docs is the best place.
Shubham
https://docs.djangoproject.com/en/3.2/topics/pagination/
IND_
django 3.2 launched
zax4r0
can anyone suggest me a django tutorial in hindi 😅
Shubham
Hindi me bhai tutorial to mil jayega, but aap uspar depend nai hosakte, sirf basics hi milenge
Shubham
I would suggest to search CFE channel
zax4r0
Hindi me bhai tutorial to mil jayega, but aap uspar depend nai hosakte, sirf basics hi milenge
aah mai do teen channel dekha sub me same same h 😂 isleye pucha
Shubham
for small projects, django ORM and MVT is good, when you come to scale, then you need more than django features
Shubham
Specially to connect multiple databases, run Raw sql queries, adding other frameworks with django like Pandas, numpy.
zax4r0
for small projects, django ORM and MVT is good, when you come to scale, then you need more than django features
ohh 😯 im learning 😅 currently .. from start i know some what python 😂 i just wanted to learn #jackOfAlltheTricks master of none 😂
Shubham
you should start with a blog website.
Shubham
Search, denis ivy 's channle
zax4r0
Shubham
Complete his both project, CRUD, and blog.
Shubham
you will get much idea, how all django stuff works.
Shubham
then come to advance.
zax4r0
ohh thanks ☺️
Shubham
best of luck.
zax4r0
Me : i wil make a blog using Angular + django also me : but wait u don't Know python , django ,and ts also me : well hmm 😂😂😂😅🤪
Shubham
Me : i wil make a blog using Angular + django also me : but wait u don't Know python , django ,and ts also me : well hmm 😂😂😂😅🤪
I will suggest to go with react. for frontend, But first concrete your self in html, css and javascript
zax4r0
sure
i dont have collage so im free 20hrs in day 😂
useless_vevo
Go and do it
Shubham
sure, then I would suggest to do what I have mentioned earlier, it is the best time for practice though,
useless_vevo
Stop mememing and start working
zax4r0
Stop mememing and start working
ha 😃 cant laptop screen rip 😭 pink color
useless_vevo
Sad
Anonymous
goo
Neo
i have a field in all the models last_modified_datetime and i want to save the details whenever any updates happened on any models to a separate model called logs, how can i achieve this?
Shubham
i have a field in all the models last_modified_datetime and i want to save the details whenever any updates happened on any models to a separate model called logs, how can i achieve this?
class YourBaseClass(models.Model): created_at = models.DateTimeField(auto_now_add=True) modified_at = models.DateTimeField(auto_now=True)
Neo
class YourBaseClass(models.Model): created_at = models.DateTimeField(auto_now_add=True) modified_at = models.DateTimeField(auto_now=True)
No i mean i want to save the details to another table, whenever an update happens on any tables, like table name, user id ...
Shubham
then you can import logger, our create abstract class for the same to same, After that use signals for the same like post_save signal, to track changes.
Mirco
class YourBaseClass(models.Model): created_at = models.DateTimeField(auto_now_add=True) modified_at = models.DateTimeField(auto_now=True)
by installing django-models-utils this can be achieved by TimeStampedModel and avoid replicating the same if more models need those fields
Zey
can we check that particular variable is present in sessions or not
Zey
if var1 in request.sessions like this
Zey
ok
Shubham
use debug mode for the same.
Zey
ok thanks
s@123
hii i am facing problem, dropdown menu not working, when i add it in base.html anybody help me
s@123
in navbar
Doragonsureiyā
hii i am facing problem, dropdown menu not working, when i add it in base.html anybody help me
Rule 5️⃣: To share code or error tracebacks, use an online pasting service like: - https://del.dog - https://dpaste.org - https://linkode.org - https://hastebin.com - https://bin.kv2.dev If you posted a wall of text, go back and delete it.
Skv
I want to learn django framework is there any site where can i learn it for free
Doragonsureiyā
I want to learn django framework is there any site where can i learn it for free
Looking for Django tutorials? you can follow these three recommended ones: * Official documentation and tutorial * Tutorial from MDN * Tutorial from django-girls
shashikant
I have views in my app directory,and when did I import that views typing...from app_name.views import view_name ...I am getting the error like Import could not be resolved
shashikant
i am getting:ModuleNotFoundError: No module named 'Basic.description_api'
shashikant
i have tried this ..but another error ..usually this does not happen
shashikant
cannot import view from project_name.app_name.....module import error
shashikant
views is in app directory and url is in project directory
jay
views is in app directory and url is in project directory
you haven't imported views, then how can you use it?
jay
if you want to use app's views you should use include() something like this path('flights/', include('flights.urls')),
jay
and include(app_name.url) should contain the app's view
Anonymous
Hi friends i can't load image in js file on Django! why?
Doragonsureiyā
Hi friends i can't load image in js file on Django! why?
What have you tried to do so far to solve that issue? Show your code and explain where and why you're stuck on solving your issue. Read rule 5️⃣ to learn how to show your code
Anonymous
What have you tried to do so far to solve that issue? Show your code and explain where and why you're stuck on solving your issue. Read rule 5️⃣ to learn how to show your code
Ok but i fixed my problem if you can't load the image file in js you must copy js code in script tag on your html and add under code to your address {% static "/static/yourfolder/yourfolder/ %}