Techy Prasad is a technical blog here you can learn about technologies like computer tips and tricks and much more about technology like python, php, javascript, django & projects:)
How To Create News Website Using News API In Js ?
Get link
Facebook
X
Pinterest
Email
Other Apps
Hello guys In this post I have created a news website using JavaScript news API. You can download this code by click on below button.
aggregate() - It is a terminal clause for a queryset that, when invoked, return dictionary name-value pair. Required Module: django.db.models import Avg, Min, Max, Sum, Count Open views.py file and write this code e.g. def home(request): stud_data=Student.objects.all(); average=stud_data.aggregate(average('marks')) total=stud_data.aggregate(Sum('marks')) minimum=stud_data.aggregate(Min('marks')) maximum=stud_data.aggregate(Max('marks')) totalCount=stud_data.aggregate(Count('marks')) context { 'students':stud_data,'average':average,'total':total,'minimum':minimum,'maximum':maximum,'totalCount':totalCount }
Technologies Used : Frontend: Html, CSS, JS, Bootstrap Backend : Php, MongoDB Database Software Requirement : Xampp, MongoDB Installation Guide Steps: 1) Download Xampp Web Server Version 7.4.16 from this link :> https://www.apachefriends.org/download.html 2)Download MongoDB Community Version from this link :> https://www.mongodb.com/try/download/community 3)After Downloading this two software install this software 4)After installing download "php_ mongodb.dll " file from this link :> https://bit.ly/3g3G91w and paste the downloaded file in " C:xampp/php/ext/ folder " 5)after pasting the file go to in " C:\xampp\php " folder and open " php.ini file " and search the name " extension=mysqli " and add this line " extension=php_ mongodb.dll " after " extension=mysqli " and save that file and restart your xampp server 6)after restarting server c...
Just add this line into your django project urls.py file admin.site.site_header = 'E-Shop Admin' admin.site.site_title = 'E-Shop Admin Panel' admin.site.index_title = 'Welcome To E-Shop Admin Panel' Warning: make sure, below line is included at top. from django.contrib import admin
Comments
Post a Comment
Comment Rules :
1. Do not post Adult/illegal Links.
2. Try to comment in only मराठी / English Language.
3. Do not post other website's links which are useless.
4. Your Comment should be based on the Topic for other queries.
5. Do not use Abusive Language.
6. Respect each other.
Thank You for following the rules. Please Comment....