Posts

How to Debuging in Wordpress website to Find Errors

Warning : trigger_error() expects parameter 2 to be int, object given in  /home2/apnkishore/public_html/wp-includes/functions.php  on line  4713 Warning : trigger_error() expects parameter 2 to be int, object given in  /home2/apnkishore/public_html/wp-includes/functions.php  on line  4713 Warning : Cannot modify header information - headers already sent by (output started at /home2/apnkishore/public_html/wp-includes/functions.php:4713) in  /home2/apnkishore/public_html/wp-includes/pluggable.php  on line  1281 Warning : Cannot modify header information - headers already sent by (output started at /home2/apnkishore/public_html/wp-includes/functions.php:4713) in  /home2/apnkishore/public_html/wp-includes/pluggable.php  on line  1284 cretical error in your website, please reslove it How to Slove? first login into your cpanel go to filne file manager go to your  public_html in  wp-c...

How to Write Management commands In Python/Django Applicaton

First we need to create project as well as app Inside the app >  we write the management commands. >Project    >Project    >App       > managements            > commands               >__init__.py              > FIlename.py             >__init__.py       >migrations             >__init__.py             >views.py             >models.py Inside the Filename.py we write the code. as per the below strutuer. from django.core.management.base import BaseCommand def add():   pass def sum():   pass clas...

Vuejs Add POPup MOdel for view File

<template>   <b-row>     <b-col cols="12" xl="12">       <transition name="slide">       <b-card header-tag="header" footer-tag="footer">         <div slot="header">           <strong>Materials</strong>           <router-link to="/addmaterial" v-if="is_sfe_trainer || is_course_trainer">             <button type="button" class="btn btn-primary" style="float:right" data-toggle="tooltip"               data-placement="left" title="Add a Material">                 <i class="icon-plus"></i>       ...

query Parameters

We define in endpoint.js export const BASE_URL = 'http://localhost:8000'; export const STATEID = `${BASE_URL}/api/stateid/`; After we use Without Endpoint: url='http://127.0.0.1:8000/api/stateid/?stateid='${this.id}''; With Endpoint: import { STATEID } from '../endpoints'; url= `${STATEID}?stateid='${this.id}'`

How to get Full URL or get absolute url In Django

this is use full to get full url for images or files. getting: [     {          "id" :  1 ,          "photo_url" :  "/media/media/11_sUhP0CC.png"     } ] Need: (after apply below process we get full url) [     {          "id" :  1 ,          "photo_url" :  "http://localhost:8000/media/media/11_sUhP0CC.png"     } ] Existing code: models.py class Car ( models . Model ): name = models . CharField ( max_length = 255 ) price = models . DecimalField ( max_digits = 5 , decimal_places = 2 ) photo = models . ImageField ( upload_to = 'cars' ) serializers.py class CarSerializer ( serializers . ModelSerializer ): class Meta : model = Car fields = ( 'id' ...

Reactjs Login with Google

// import React, { Component } from 'react'; // class App extends Component { //     componentDidMount() { //         this.googleSDK(); //         console.log('sfsfd'); //     } //     prepareLoginButton = () => { //     console.log(this.refs.googleLoginBtn); //     this.auth2.attachClickHandler(this.refs.googleLoginBtn, {}, //         (googleUser) => { //         let profile = googleUser.getBasicProfile(); //         console.log('Token || ' + googleUser.getAuthResponse().id_token); //         console.log('ID: ' + profile.getId()); //         console.log('Name: ' + profile.getName()); //   ...