Django- Admin and Users registration Django by Ravinder Nath Rajotiya - January 9, 2022January 10, 20220 Introduction Well, one of the important part of dynamic sites is to create users so that one can have access to the database to enter data, to delete , edit or update the data, to authorize users to have an access to certain data set. Django provide an admin page by default. This can be accessed just by typing admin after the url i.e. localhost:8000/admin and you will see a page as seen below: But you can't do anything here right now. We have to first create super admin who will be responsible for the overall management and users with the roles to have access to certain pages or data. Let us first create a superuser from the command-line. Creating super user Well, If you
Simple blogApp in Django Django by Ravinder Nath Rajotiya - January 4, 2022January 5, 20220 Steps in creating blogProject Starting virtual environment E:\project\webAppProjects>python –m venv venv E:\project\webAppProjects>venv\Scripts\activate Creating Project (venv) E:\project\webAppProjects>django-admin startproject blogProject (venv) E:\project\webAppProjects>cd blogProj (venv) E:\project\webAppProjects\blogProject>django-admin startapp blogApp Run the Server (venv) E:\project\webAppProjects\blogProj>python manage.py runserver Watching for file changes with StatReloader Performing system checks... January 04, 2022 - 09:31:14 Django version 4.0, using settings 'blogProj.settings' Starting development server at http://127.0.0.1:8000/ Quit the server with CTRL-BREAK. now the server is ready, you can test by typing the url http://127.0.0.1:8000/ in the browser Developing Project in Atom Open the Project folder in Atom, your window will look as: Now modify urls.py and settings.py in blogProj folder Now create url.py in blogApp and update url.py and views.py as shown below: Create a folder template in blogApp and create a index.html
Starting Django Computer Engineering Django by Ravinder Nath Rajotiya - December 29, 20210 Checking if Django is installed and working: Type the following on the command prompt to check whether Django is installed or not C:\Users\ECE>django-admin C:\Users\ECE>'django-admin' is not recognized as an internal or external command, operable program or batch file. It simply is an indication that Django is not installed on your systems. So first of all create a python virtual environment so that you can install Django and start working on the Django environment. Steps for creating virtual environment Example: Go to the Project Folder:- E:\project\webAppProjects Set virtualEnv as : E:\project\webAppProjects>python -m venv venv Activate environment : E:\project\webAppProjects>venv\Scripts\activate Install Django Then install Django in that environment (venv) E:\project\webAppProjects\webProject1>cd \ (venv) E:\>pip install django Now you are ready to start Django for creating web applications Working with Django:- here is the example of