Posts By admin (15)

pip2 install using curl

sudo apt update

sudo apt upgrade

sudo add-apt-repository universe

>sudo apt install python2

>sudo apt install curl

>curl https://bootstrap.pypa.io/get-pip.py --output get-pip.py

>sudo apt install python3-pip

How to access remote server with local phpMyAdmin client?

For Window 

Step1: Edit config.inc.php file (c:\xampp\phpMyAdmin\config.inc.php


Step2: Copy and paste below code in config.inc.php

/** 2nd server */

$i++;

/* Authentication type and info */

$cfg['Servers'][$i]['auth_type'] = 'config';

$cfg['Servers'][$i]['user'] = 'xxxxx';

$cfg['Servers'][$i]['password'] = 'xxxxx';

$cfg['Servers'][$i]['extension'] = 'mysqli';

$cfg['Servers'][$i]['AllowNoPassword'] = true;

$cfg['Lang'] = '';

/* Bind to the localhost ipv4 address and tcp */

$cfg['Servers'][$i]['host'] = 'xxxxx';

$cfg['Servers'][$i]['connect_type'] = 'tcp';

Create Product Category Table for ecommerce

CREATE TABLE `master_category` (

`created_datetime` datetime(6) NOT NULL,

`updated_datetime` datetime(6) NOT NULL,

`status` varchar(10) NOT NULL,

`category_id` int NOT NULL,

`category_title` varchar(128) NOT NULL,

`slug` varchar(150) NOT NULL,

`sort_order` int DEFAULT NULL,

`parent_id` int DEFAULT NULL

)


--

-- Dumping data for table `master_category`

--

INSERT INTO `master_category` (`created_datetime`, `updated_datetime`, `status`, `category_id`, `category_title`, `slug`, `sort_order`, `parent_id`) VALUES

('2021-01-18 06:13:46.775498', '2021-01-18 06:13:46.775559', 'Active', 2, 'Indian & Fusion Wear', 'indian-&-fusion-wear', 0, NULL),

('2021-01-18 06:15:04.800319', '2021-01-18 06:15:04.800372', 'Active', 3, 'Ethnic Sets', 'ethnic-sets', 0, 2),

('2021-01-18 06:15:36.076440', '2021-01-18 06:15:36.076519', 'Active', 4, 'Kurta Sets', 'kurta-sets', 0, 3),

('2021-01-18 06:16:04.349098', '2021-01-18 06:16:04.349149', 'Active', 5, 'Ethnic Bottom', 'ethnic-bottom', 0, 3),

('2021-01-18 06:16:26.676249', '2021-01-18 06:16:26.676306', 'Active', 6, 'Western Wear', 'western-wear', 0, NULL),

('2021-01-18 06:16:46.576680', '2021-01-18 06:16:46.576734', 'Active', 7, 'Jumpsuite and Rompers', 'jumpsuite-and-rompers', 0, 6),

('2021-01-18 06:17:05.143047', '2021-01-18 06:17:05.143101', 'Active', 8, 'Dresses', 'dresses', 0, 6),

('2021-01-18 06:17:36.219680', '2021-01-18 06:17:36.219755', 'Active', 9, 'Dress', 'dress', 0, 8),

('2021-01-18 06:17:52.319460', '2021-01-18 06:17:52.319511', 'Active', 10, 'Rompers', 'rompers', 0, 7),

('2021-01-18 06:18:03.693877', '2021-01-18 06:18:03.693929', 'Active', 11, 'Jumpsuite', 'jumpsuite', 0, 7),

('2021-01-19 07:47:34.291383', '2021-01-19 07:47:34.291486', 'Active', 12, 'asd', 'asd', 0, NULL),

('2021-02-12 06:48:53.414654', '2021-02-12 06:48:53.414710', 'Active', 13, 'Jumpsuite', 'jumpsuite-zfwk', 0, 7),

('2021-02-12 06:50:26.829550', '2021-02-12 06:50:26.829603', 'Active', 14, 'Jumpsuite', 'jumpsuite-o7q5', 0, 7),

('2021-02-12 06:52:00.015627', '2021-02-12 06:52:00.015680', 'Active', 15, 'abc', 'abc', 0, 7),

('2021-02-12 06:52:40.197679', '2021-02-12 06:52:40.197767', 'Active', 16, 'Jumpsuite', 'jumpsuite-7nub', 0, 7),

('2021-02-12 06:58:44.859319', '2021-02-12 06:58:44.859377', 'Active', 17, 'abc', 'abc-jd1d', 0, 7),

('2021-02-12 07:03:29.085166', '2021-02-12 07:03:29.085221', 'Active', 18, 'abc', 'abc-5ifn', 0, 7),

('2021-02-23 11:55:01.030882', '2021-02-23 11:55:07.323311', 'Active', 19, 'test', 'kjkjkj', 0, 2),

('2021-02-23 11:57:12.106908', '2021-02-23 11:57:12.106990', 'Active', 20, 'TEST MAP', 'MAP_LUG', 0, 2);


--

-- Indexes for dumped tables

--

--

-- Indexes for table `master_category`

--

ALTER TABLE `master_category` ADD PRIMARY KEY (`category_id`), ADD UNIQUE KEY `slug` (`slug`), ADD KEY `master_category_parent_id_84c7169e_fk_master_ca` (`parent_id`)


--

-- AUTO_INCREMENT for table `master_category`

--

ALTER TABLE `master_category` MODIFY `category_id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=21


--

-- Constraints for table `master_category`

--

ALTER TABLE `master_category`

ADD CONSTRAINT `master_category_parent_id_84c7169e_fk_master_ca` FOREIGN KEY (`parent_id`) REFERENCES `master_category` (`category_id`);




 

Install mysqlclient in python-django

In Ubuntu

>pip install mysqlclient

if you got installation error in window then download whl files from here

https://www.lfd.uci.edu/~gohlke/pythonlibs/#mysqlclient


for window 32 bit

>pip install mysqlclient-1.4.6-cp38-cp38-win32.whl

for window 64 bit

>pip install mysqlclient-1.4.6-cp38-cp38-win_amd64.whl

Git Branching - Basic Branching and Merging

>git checkout -b iss53

Switched to a new branch "iss53"

This is shorthand for:

>git branch iss53

>git checkout iss53

>vim index.html

>git commit -a -m 'Create new footer]'

>git checkout master

Switched to branch 'master'

>git checkout -b hotfix

Switched to a new branch 'hotfix'

>vim index.html

>git commit -a -m 'Fix broken email address'

[hotfix 1fb7853] Fix broken email address

1 file changed, 2 insertions(+)

>git checkout master

>git merge hotfix

Updating f42c576..3a0874c

Fast-forward

index.html | 2 ++

1 file changed, 2 insertions(+)

>git branch -d hotfix

Deleted branch hotfix (3a0874c).

>git checkout iss53

Switched to branch "iss53"

>vim index.html

>git commit -a -m 'Finish the new footer'

[iss53 ad82d7a] Finish the new footer

1 file changed, 1 insertion(+)

Basic Merging

>git checkout master

Switched to branch 'master'

>git merge iss53

Merge made by the 'recursive' strategy.

index.html | 1 +

1 file changed, 1 insertion(+)

Now that your work is merged in, you have no further need for the iss53 branch. You can close the issue in your issue-tracking system, and delete the branch:

esc :wq

git push -u origin new-features

Create pr

i got conflic

>git pull origin master

incase of complext conflict

Step 1: From your project repository, bring in the changes and test.

>git fetch origin

>git checkout -b seller-module origin/seller-module

>git merge master

Step 2: Merge the changes and update on GitHub.

>git checkout master

>git merge --no-ff seller-module

>git push origin master

1 2 3 Next Last