Finding Help in getting started in Django

60 views
Skip to first unread message

Veronica Ndemo

unread,
May 30, 2023, 10:56:14 AM5/30/23
to Django users
Hi guys I need help.I am just getting started in using Django and I would love to get guidance on how to go about the Django framework

Muhammad Juwaini Abdul Rahman

unread,
May 30, 2023, 10:58:48 AM5/30/23
to django...@googlegroups.com
Getting started by doing. Django official site have their own tutorial that you can follow line by line.

On Tue, 30 May 2023 at 22:55, Veronica Ndemo <ndemov...@gmail.com> wrote:
Hi guys I need help.I am just getting started in using Django and I would love to get guidance on how to go about the Django framework

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/0ef756ca-5641-4cbe-9da5-056e5ed08c0fn%40googlegroups.com.

Bhuvnesh Sharma

unread,
May 30, 2023, 11:07:48 AM5/30/23
to django...@googlegroups.com
Hi Veronica,
  You can start from the official documentation. Django has one of the best documentations in the world , just in case you are lost, here's a link from where you can create your first application : https://docs.djangoproject.com/en/4.2/intro/tutorial01/

Regards,
Bhuvnesh

psyMaster Code

unread,
May 30, 2023, 11:16:22 AM5/30/23
to django...@googlegroups.com
Congratulations, 
You did one of the greatest choice
In the beginning, the documentation of django is awsome and also infinity, 

You can go through the 7 first steps of doc, then get start the django rest framework on


After that you can find out more and more project to try and learn while you're enjoying. 

It is important that during your lessons, you try your ideas too, after a while just do projects alone. 

You can find some UI design or some website and try to make APIs accourding to the logic that you see

Hope It could help you
Best wishes

Message has been deleted
Message has been deleted

DieHardMan 300

unread,
May 31, 2023, 5:00:00 AM5/31/23
to Django users

I'd like to give some advice before start your Django journey and Django project configurations
---------- Before Start Django ----------
1. master Python "class" bacause you might use django class-based view a lot, learn "decorator" and standard library "datetime" and "re"
2. choose "Python version" for your django project, I recommend Python 3.10 or 3.11. You should check current installed Python version
    in your terminal --> py --version
** if you use Unix OS like MacOS or Linux, type "python3" instead of "py"
3. I highly recommend create virtual environment for each django project, install virtualenv with pip
    windows cmd --> py -m pip install virtualenv
        then --> py -m virtualenv app-env
    macos terminal --> python3 -m pip install virtualenv
        then --> python3 -m virtualenv app-env
4. activate virtual environment you just created
    windows cmd --> app-env\Scripts\activate.bat   or   app-env\Scripts\activate
    macos terminal --> source/bin/activate
    to stop virtualenv just type --> deactivate
5. install django latest version via pip (you must activate virtualenv first)
    --> py -m pip install django
---------- Start Django ----------
1. start new django project (don't forget to activate virtualenv first)
    --> django-admin startproject my-app
2. go inside project folder and create "requirements.txt" and type all requirement library for your project
   --- requirements.txt ---
django >= 4.2.0, < 4.3.0
wheel >= 0.4.0
ipython >= 8.11.0                       # python shell for django project
python-decouple >= 3.7.0        # for hiding sensitive data in settings.py before uploading to git
setuptools >= 67.7.0
psycopg >= 3.0.0                       # postgresql database driver. if you use django 4.1 or lower you must install psycopg2 instead of psycopg
 mysqlclient => 2.1.1                # mysql database driver. if you already use postgresql you don't need this
3. install specified dependencies
    --> py -m pip install -r requirements.txt
    for upgrade your dependencies --> py -m pip install --upgrade -r requirements.txt
    by doing this you have more control to your project dependencies
    for example if you specified "django >= 4.2.0, < 4.3.0" it will upgrade django between 4.2.0 to 4.2.* but never 4.3.0
4. in your main project directory it will have 3 files now
    my-app,  manage.py  and  requirements.txt
5. open "settings.py" in "my-app"
    first thing you need to be cautious is SECRET_KEY constant. You must never lose it or expose this to public that's why "python-decouple" library needed
    for more information https://pypi.org/project/python-decouple/
6. in DATABASE section change it to your database
    --- for postgresql ---
DATABASES = {
'default': {
DATABASE_ENGINE='django.db.backends.postgresql'
DATABASE_NAME='mydatabase'
DATABASE_USER='root'
DATABASE_PASSWORD=''
DATABASE_HOST='localhost'
DATABASE_PORT='5432'
}
}
    --- for mysql ---
DATABASES = {
'default': {
DATABASE_ENGINE='django.db.backends.mysql'
DATABASE_NAME='mydatabase'
DATABASE_USER='root'
DATABASE_PASSWORD=''
DATABASE_HOST='localhost'
DATABASE_PORT='3306'
}
add your "user" and "password", both database port above are default port though
7. start your first database migrate
--> py manage.py migrate

Now go for Django Tutorial --> https://docs.djangoproject.com/en/4.2/
I hope this help you avoid some problems in the future.
ในวันที่ วันอังคารที่ 30 พฤษภาคม ค.ศ. 2023 เวลา 21 นาฬิกา 56 นาที 14 วินาที UTC+7 Veronica Ndemo เขียนว่า:

RANGA BHARATH JINKA

unread,
May 31, 2023, 7:58:34 AM5/31/23
to django...@googlegroups.com
Hi, 

Go through this quick start tutorial and understand. You can do this. It is very easy.

https://www.django-rest-framework.org/tutorial/quickstart/

Thanks and Regards

J. Ranga Bharath
Cell: 9110334114
   

    --- for mysql ---
DATABASES = {
'default': {
ALLOWED_HOSTS='localhost'
DATABASE_ENGINE='django.db.backends.mysql'
DATABASE_NAME='mydatabase'
DATABASE_USER='root'
DATABASE_PASSWORD=''
DATABASE_HOST='localhost'
DATABASE_PORT='3306'
}
add your "user" and "password", both database port above are default port though
7. start your first database migrate
--> py manage.py migrate

Now go for Django Tutorial --> https://docs.djangoproject.com/en/4.2/
I hope this help you avoid some problems in the future.
ในวันที่ วันอังคารที่ 30 พฤษภาคม ค.ศ. 2023 เวลา 21 นาฬิกา 56 นาที 14 วินาที UTC+7 Veronica Ndemo เขียนว่า:
Hi guys I need help.I am just getting started in using Django and I would love to get guidance on how to go about the Django framework

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages