Posts

Showing posts from February, 2020

How to add Cors Header For Django Rest Framwork

Step-1: Pip install  django-cors-headers == 3.2.1 Step-2:  INSTALLED_APPS = [ 'corsheaders' , ] Step-3: MIDDLEWARE = [ .... 'corsheaders.middleware.CorsMiddleware' , 'django.middleware.common.BrokenLinkEmailsMiddleware' , 'django.middleware.common.CommonMiddleware' , ] Step-4: CORS_ORIGIN_ALLOW_ALL = True

How To Pass Values From Html To Django Through URL

This can be done in three simple steps: 1)  Add item id with  url  tag: {% for item in post %} <tr> <th> {{ item.id }} </th> <td> {{ item.title }} </td> <td> {{ item.body }} </td> <td> <a href = {% url 'edit' id = item.id %} > Edit </a> <a href = {% url 'delete' id = item.id %} > Delete </a> </td> </tr> {% endfor %} 2)  Add path to  urls.py : path ( 'edit \\ /(?P<id>[0-9]+)$ ' , views . edit , name = 'edit' ) path ( ' delete \\ /(?P<id>[0-9]+)$ ' , views . delete , name = 'delete' ) 3)  Use the id on  views.py : def delete ( request , id ): obj = post . objects . get ( id = id ) obj . delete () return redirect ( 'dashboard' ) Html Nunchi Django Application ki url lo value ni ele pass Chayali and Ele update chaye

How to change Grafana Localhost Username and password

How to change Grafana Username and password open Terminal or cmd sudo grafana-cli admin reset-admin-password newPassword  command enter in your terminal then your password is updated, now go to  http://localhost:3000/ username: admin password:  newPassword More question like:' how to change http://localhost:3000/login username and password how to modify username and password in grafana local host

how To ReSolve error mounting for pen drive - Solution

Error mounting /dev/sdb1 at /media/cit246/VVSRR: Command-line `mount -t "exfat" -o "uhelper=udisks2,nodev,nosuid,uid=1000,gid=1000,iocharset=utf8,namecase=0,errors=remount-ro,umask=0077" "/dev/sdb1" "/media/cit246/VVSRR"' exited with non-zero exit status 32: mount: unknown filesystem type 'exfat' How To Fix Error (Unable to access “Volume”) in Linux I had a problem mounting my 64 Giga Byte SD card with my linux systems. The systems gave me an error of "Error Mounting Exfat...". Through the command window prompt I was able to simply download a utility through sudo apt-get repository to add this capability to my ubuntu linux system, and now I am able to mount the access these extend file allocation table and access these very large data drives. or Fix this problems example : ---------------------------- Error mounting system-managed device /dev/sda1: Command-line `mount "/mnt/2ED3B8771DC4D705"' exited ...

GEo Graphana Referance Links

https://amaral.northwestern.edu/blog/getting-long-lat-list-cities https://jupyter-gmaps.readthedocs.io/en/v0.3.2/gmaps.html#setting-the-color-gradient-and-opacity https://www.youtube.com/watch?v=QpBmO35pmVE For start influxbd/grafana Influxbd Query list = https://docs.influxdata.com/influxdb/v1.7/query_language/spec/ http://www.andremiller.net/content/grafana-and-influxdb-quickstart-on-ubuntu http://bicofino.io/2015/12/10/using-grafana-with-influxdb/ https://sysdig.com/blog/prometheus-metrics/ More about Folium Package: https://python-graph-gallery.com/ https://rsandstroem.github.io/GeoMapsFoliumDemo.html youtube channel: Ryan Noonan

How to integrate Python with Influxdb in windows

Image
First of need to download  - https://portal.influxdata.com/downloads/ (v1.7.9) After you will get Influxd - This application is server of influxdb, For every time you need to open  this server otherwise your get error ( means without open this application we cant perform any operation) influx - This appication is used to perform (CRu - create and insert and partial updated operations) So first open Influxd file and then open Influx file. query - >SHOW databases - check list of exising databases > CREATE database database_name > use database_name > select * from database_name  or ( SELECT <stuff> FROM <measurement_name> WHERE <some_conditions>)

pycharm 100 year cracked version software

https://drive.google.com/drive/folders/1x4z7FOC2bLhCbWPeGU70d2ronGnZT7I0

how to install pycharm and open through terminal

1) first download Pycharm IDE from  https://www.jetbrains.com/pycharm/download/#section=linux 2) Then go to the folder and Unzip pycharm download folder. cit246@cit246-ThinkPad-T430:~$ cd Desktop cit246@cit246-ThinkPad-T430:~/Desktop$ cd venkat cit246@cit246-ThinkPad-T430:~/Desktop/venkat$ cd pycharm #cit246@cit246-ThinkPad-T430:~/Desktop/venkat/pycharm$ tar xfz pycharm-professional-2019.3.2.tar.gz cit246@cit246-ThinkPad-T430:~/Desktop/venkat/pycharm$ cd pycharm-2019.3.2/ cit246@cit246-ThinkPad-T430:~/Desktop/venkat/pycharm/pycharm-2019.3.2$ cd bin/ cit246@cit246-ThinkPad-T430:~/Desktop/venkat/pycharm/pycharm-2019.3.2/bin$ sudo chmod +x pycharm.sh [sudo] password for cit246: cit246@cit246-ThinkPad-T430:~/Desktop/venkat/pycharm/pycharm-2019.3.2/bin$ ./pycharm.sh

how to update python on Ubuntu using terminal commands

get link by https://www.python.org/downloads/source/ go thorough the above link and select your needed version and and copy that link address and past in your termainal after Wget (Link), As show in below. wget https://www.python.org/ftp/python/3.6.5/Python-3.6.5.tgz $ tar -xvf Python-3.6.5.tgz $ cd Python-3.6.5/ $ ./configure $ make $ python3