Skip to content

Instantly share code, notes, and snippets.

View react-git.log
This file has been truncated, but you can view the full file.
--cae635054--Sat Jun 26 14:51:23 2021 -0400--Andrew Clark
31 0 packages/react-reconciler/src/__tests__/ReactIsomorphicAct-test.js
1 1 packages/react-test-renderer/src/ReactTestRenderer.js
24 14 packages/react/src/ReactAct.js
--e2453e200--Fri Jun 25 15:39:46 2021 -0400--Andrew Clark
50 0 packages/react-reconciler/src/__tests__/ReactIsomorphicAct-test.js
--73ffce1b6--Thu Jun 24 22:42:44 2021 -0400--Brian Vaughn
4 5 packages/react-devtools-shared/src/__tests__/FastRefreshDevToolsIntegration-test.js
@Tushant
Tushant / folder_structure.txt
Created Apr 21, 2020
Ariadne Modularization
View folder_structure.txt
graphapi
__init__.py
scalar.py
schema.py
utils.py
accounts
__init__.py
resolvers.py
schema.graphql
products
View base.html
{% load static %}
<html>
<head>
<title>4niture {% block title %} HomePage {% endblock title %}</title>
{% include "includes/css.html" %}
<link rel="stylesheet" href="{%static "css/main.css"%}">
</head>
<body>
{% block navbar %}
{% include "includes/navbar.html" %}
View stock.html
{% extends 'base.html' %}
{% load add_css is_checkbox field_type %}
{% block title %} Stock {% endblock title %}
{% block stylesheets %}
{{ block.super }}
{% endblock stylesheets %}
{% block content %}
View view.py
# right now this form works only for Resume but how do I make it more generic to follow django DRY principle
def addForm(request, form, template):
if request.method == "POST":
if form.is_valid():
resume_instance = Resume.objects.get(applicant=request.user)
new_form = form.save(commit=False)
new_form.resume=resume_instance
new_form.save()
messages.success(request, 'Thank you')
View Pagination.js
class Pagination extends React.Component {
static defaultProps = {
initialPage: 1
};
constructor(props) {
super(props);
this.state = { pager: {}, totalItems: this.props.totalItems };
}
View drawer.js
import { StackNavigator, DrawerNavigator, TabNavigator } from 'react-navigation';
import MyHomeScreen from '../Home';
import Profile from '../Profile';
import Settings from '../Settings';
import Imp from '../Imp';
const TouchableImage = props =>
<TouchableOpacity onPress={props.onPress}>
{/* <Image source={props.source} /> */}
View models.py
class OpeningHours(models.Model):
store = models.ForeignKey('Store', related_name="opening_hour")
weekday = models.CharField(choices=DAY, max_length=12)
opening_hour = models.TimeField()
closing_hour = models.TimeField()
class Meta:
verbose_name = 'Opening Hour'
verbose_name_plural = 'Opening Hours'
View loader.js
const Loader = prop => WrappedComponent =>
class Loader extends React.PureComponent {
render() {
return (
<div className="component-wrapper">
{this.props[prop] &&
<div className="earth-spinning">
<img src={EarthSpinning} alt="spinner" style={{ margin: '0 auto' }} />
</div>}
<WrappedComponent {...this.props} />