why google shows the wrong title for my website

Nowadays many of the website show different title character in google search page ,this is actually done by the hackers, the will replace our original title with Japanese ,Slavic languages, Indo-European languages, East Slavic languages, Balto-Slavic languages any of the languages with our website title this is why google shows the wrong title for my website. Here am going to explain how to remove that hack or spammers and bring back our current title to google search result page.

See below Images google shows the wrong title for my website

why google shows the wrong title for my website

How to remove wrong title for my website

Step 1
Open google and search

site:tutorialshore.com japan **replace tutorialshore.com with yourdomain.com

site:tutorialshore.com Slavic

open the pages code, that listing in the google search result and remove any unwanted code if their that may be done my hackers

Step 2

Open your sitemap.xml page and double confirm all the URL listed in the site map are correct URL in the website, if you find anything regenerate sitemap and resubmit to google webmaster

Step 3

Sort Files by date of modified and find out any new files update without your permission

Step 4

check file permission if any having 444 permission delete that files and upload the same files from your backup.

Step 5

Open google webmaster account

report the hacked pages and remove it with the help of google webmaster

Step 6

Resubmit Sitemap and Recrawl

Open Crawl => Fetch as google =>Fetch and render

See in picture

why google shows the wrong title for my website

NameError name slugify is not defined Django error

Most of the case When you tried to add a slug keyword for page model you will get error NameError: name ‘slugify’ is not defined Django error.Here we are discussing how to solve “NameError: name ‘slugify’ is not defined Django error”

Here is the model

from django.db import models

# Create your models here.
class page(models.Model):
 """Model representing a book (but not a specific copy of a book)."""
 
 page_id = models.AutoField(primary_key=True)
 
 page_title = models.CharField(max_length=200)

 author_name = models.CharField(max_length=100)
 
 page_content = models.TextField(max_length=1000, help_text='Enter your page content')
 
 page_name = models.SlugField(editable=False) # hide from admin

 def save(self):
 if not self.page_id:
 self.page_name = slugify(self.page_title)

 super(page, self).save()

Here is the error

“NameError: name ‘slugify’ is not defined Django error”

 

NameError name slugify is not defined Django error

How to Solve it

Step install  python-slugify module

# pip install python-slugify

Include slugify module in your model
 from slugify import slugify

NameError name slugify is not defined Django error 2

 

Multiselect dropdown with checkboxes demo code in php

Being a developer you may face a situation, have to give multiple select option for the front end user, now it is easy with the help of bootstrap multiselect script we can accomplish that task within 10 minutes. Here am going to explain you Multi select drop down with check boxes demo code in php

here is the Multiselect dropdown with checkboxes demo code in php

Step 1

Files To Include

<script type="text/javascript" src="//code.jquery.com/jquery-1.11.3.min.js"></script>
<link rel="stylesheet" type="text/css" href="//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.0.3/css/bootstrap.min.css">
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.0.3/js/bootstrap.min.js"></script>
<link rel="stylesheet" type="text/css" href="//cdn.rawgit.com/davidstutz/bootstrap-multiselect/master/dist/css/bootstrap-multiselect.css">
<script type="text/javascript" src="//cdn.rawgit.com/davidstutz/bootstrap-multiselect/master/dist/js/bootstrap-multiselect.js"></script>

Step 2

HTML Form

<form id="myForm" method="POST">
<input name="current_select_values" type="hidden" value="" id="current_select_values">
<div class="col-md-12" >
 <select size="5" name="current_select" multiple="multiple" id="current_select">
 <option value="current1">current1</option>
 <option value="current2">current2</option>
 <option value="current3">current3</option>
 <option value="current4">current4</option>
 <option value="current5">current5</option>
 </select>
 </div><div class="col-md-12" style="margin-top:20px;" >
 <input type="submit" value="Submit" ></div>
</form>

Step 3

Script Files

<script>
 $("#myForm").on("change", "input:checkbox", function(){
 $("#myForm").submit();
 });
var data = "<?php echo $slected_current_data; ?>";
var dataarray=data.split(",");
$("#current_select").val(dataarray);
$(function () {
 $('#current_select').multiselect({ 
 buttonText: function(options, select) {
 var labels = [];
 console.log(options);
 options.each(function() {
 labels.push($(this).val());
 });
 $("#current_select_values").val(labels.join(',') + '');
 return labels.join(', ') + '';
 //}
 }

 });
});

</script>

Step 4

Post Action

<?php 
$slected_current_data='';
 if(isset($_POST['current_select_values']))
 {
 $slected_current_data=$_POST['current_select_values']; 
 }
 else
 {
 $slected_current_data="current1"; 
 }

?>

See Demo Code

Multiselect dropdown with checkboxes demo code in php

assertion error python

Assertions is one of the most advanced Exception Handling technique used in python by using the Assert statement,we can create debug message,if anything logically end up with an error.If anything fails logically AssertionError will display and end the process. here we will check assertion error python
When we are working with automatic car project their is a situation of fuel tank is empty that time we have to stop all process and stop the vehicle with an error message “no fuels”

See the syntax here

assert Expression[, Arguments]

Example:
Create a fuel.py file with below function

def fuelLevel(fuel):
   assert (fuel > 0),"Sorry no fuel in the system"
   print(fuel)

   
   
fuelLevel(4)
fuelLevel(0)

Run from command prompt

assertion error python