Skip to content

Instantly share code, notes, and snippets.

/* eslint-disable no-console */
import React, { useState } from 'react';
import { withKnobs, number, text } from '@storybook/addon-knobs';
import { storyDecoratorCase } from '../../../../.storybook';
import Pagination from '../Pagination';
import PaginationView from '../PaginationView';
import PaginationShowMore from '../PaginationShowMore';
import { SomePage, SomePageContent } from './components';
import { usePaginationApiBased } from './hooks';
import styles from './components.scss';
@padurets
padurets / reset_django_project.sh
Last active November 10, 2017 15:43
reset django project
rm -rf python/
virtualenv --python=python3.5 python
source python/bin/activate
cd repo/dev
pip install -r requirements.txt
find . -path "*/migrations/*.py" -not -name "__init__.py" -delete
find . -path "*/migrations/*.pyc" -delete
dropdb -h localhost -p 5432 -U sharry sharry
createdb -h localhost -p 5432 -O sharry sharry
python manage.py makemigrations
@padurets
padurets / admin.py
Last active June 10, 2023 21:05
django rest api framework session auth example
from django.contrib import admin
from .models import User
admin.site.register([User])