class Post(models.Model):
views = models.IntegerField(("View count"), default=0, editable=False)
def viewed(self):
self.views = models.F('views') + 1
self.save(update_fields=['views'])
class PostListView(ListView):
model = Post
template_name='app/allstory.html'
{
"restartable": "rs",
"ignore": [
".git",
"node_modules/**/node_modules"
],
"env": {
"NODE_ENV": "development"
},
"ext": "js,json,css,scss,sass"
}
import i18n from 'i18n-2'
const app = express();
i18n.expressBind(app, {
locales: ['en', 'fr'],
defaultLocale: 'fr',
cookieName: 'locale'
});
app.use(function(req, res, next) {
req.i18n.setLocaleFromQuery();
req.i18n.setLocaleFromCookie();
res.cookie('locale', 'fr', { httpOnly: true, maxAge: 1000 * 60 * 60 * 24 * 30 });
next();
});
B:\OSPanel\domains\domain.dev\frontend\node_modules\react-qiniu\index.js:16
onDrop: React.PropTypes.func.isRequired,
^
TypeError: Cannot read property 'func' of undefined
at Object.<anonymous> (B:\OSPanel\domains\domain.dev\frontend\node_modules\react-qiniu\index.js:16:33)
at Module._compile (module.js:635:30)
at Module._extensions..js (module.js:646:10)
at Object.require.extensions.(anonymous function) [as .js] (B:\OSPanel\domains\domain.dev\frontend\node_modules\babel-register\lib\node.js:152:7)
at Module.load (module.js:554:32)
at tryModuleLoad (module.js:497:12)
at Function.Module._load (module.js:489:3)
at Module.require (module.js:579:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (B:/OSPanel/domains/domain.dev/frontend/src/components/qiniu-upload-image/index.js:3:1)
at Module._compile (module.js:635:30)
at loader (B:\OSPanel\domains\domain.dev\frontend\node_modules\babel-register\lib\node.js:144:5)
at Object.require.extensions.(anonymous function) [as .js] (B:\OSPanel\domains\domain.dev\frontend\node_modules\babel-register\lib\node.js:154:7)
at Module.load (module.js:554:32)
at tryModuleLoad (module.js:497:12)
at Function.Module._load (module.js:489:3)
ERROR in ./node_modules/css-loader?modules&importLoader=1&sourceMap&localIdentName=[name]_[local]___[hash:base64:5]!./node_modules/resolve-url-loader!./node_modules/sass-loader/lib/loader.js!./src/components/sign/components/signup/style.scss
Module not found: Error: Can't resolve 'file-loader' in 'B:\OSPanel\domains\domains.dev\frontend'
@ ./node_modules/css-loader?modules&importLoader=1&sourceMap&localIdentName=[name]_[local]___[hash:base64:5]!./node_modules/resolve-url-loader!./node_modules/sass-loader/lib/loader.js!./src/components/sign/components/signup/style.scss 7:2390-2420
ERROR in ./src/components/editor/RichEditor.css
Module build failed: ModuleParseError: Module parse failed: Unexpected token (6:0)
You may need an appropriate loader to handle this file type.
11% building modules 15/16 modules 1 active ...les\react-document-meta\dist\index.js[BABEL] Note: The code generator has deoptimised the styling of "B:/OSPanel/domains/domain.dev/frontend/node_modules/lodash/lodash.js" as it exceeds the max of "500KB". 12% building modules 17/75 modules 58 active ...ntend\node_modules\axios\lib\axios.js[BABEL] Note: The code generator has deoptimised the styling of "B:/OSPanel/domains/domain.dev/frontend/node_modules/react-dom/cjs/react-dom.developmen 59% building modules 409/431 modules 22 active ...ntainers\global\images\arrow-down.pngB:\OSPanel\domains\domain.dev\frontend\node_modules\loader-runner\lib\loadLoader.js:35
throw new Error("Module '" + loader.path + "' is not a loader (must have normal or pitch function)");
^
Error: Module 'B:\OSPanel\domains\domain.dev\frontend\node_modules\url\url.js' is not a loader (must have normal or pitch function)
at loadLoader (B:\OSPanel\domains\domain.dev\frontend\node_modules\loader-runner\lib\loadLoader.js:35:10)
at iteratePitchingLoaders (B:\OSPanel\domains\domain.dev\frontend\node_modules\loader-runner\lib\LoaderRunner.js:169:2)
at runLoaders (B:\OSPanel\domains\domain.dev\frontend\node_modules\loader-runner\lib\LoaderRunner.js:362:2)
at NormalModule.doBuild (B:\OSPanel\domains\domain.dev\frontend\node_modules\webpack\lib\NormalModule.js:182:3)
at NormalModule.build (B:\OSPanel\domains\domain.dev\frontend\node_modules\webpack\lib\NormalModule.js:275:15)
at Compilation.buildModule (B:\OSPanel\domains\domain.dev\frontend\node_modules\webpack\lib\Compilation.js:151:10)
at factoryCallback (B:\OSPanel\domains\domain.dev\frontend\node_modules\webpack\lib\Compilation.js:344:12)
at factory (B:\OSPanel\domains\domain.dev\frontend\node_modules\webpack\lib\NormalModuleFactory.js:241:5)
at applyPluginsAsyncWaterfall (B:\OSPanel\domains\domain.dev\frontend\node_modules\webpack\lib\NormalModuleFactory.js:94:13)
at B:\OSPanel\domains\domain.dev\frontend\node_modules\tapable\lib\Tapable.js:268:11
at NormalModuleFactory.params.normalModuleFactory.plugin (B:\OSPanel\domains\domain.dev\frontend\node_modules\webpack\lib\CompatibilityPlugin.js:52:5)
at NormalModuleFactory.applyPluginsAsyncWaterfall (B:\OSPanel\domains\domain.dev\frontend\node_modules\tapable\lib\Tapable.js:272:13)
at resolver (B:\OSPanel\domains\domain.dev\frontend\node_modules\webpack\lib\NormalModuleFactory.js:69:10)
at process.nextTick (B:\OSPanel\domains\domain.dev\frontend\node_modules\webpack\lib\NormalModuleFactory.js:194:7)
at _combinedTickCallback (internal/process/next_tick.js:131:7)
at process._tickCallback (internal/process/next_tick.js:180:9)
B:\OSPanel\domains\domains.dev\frontend\webpack.development.config.js:55
fallback: 'style-loader',
^^^^^^^^
SyntaxError: missing ) after argument list
at createScript (vm.js:80:10)
at Object.runInThisContext (vm.js:139:10)
at Module._compile (module.js:599:28)
at Object.Module._extensions..js (module.js:646:10)
at Module.load (module.js:554:32)
at tryModuleLoad (module.js:497:12)
at Function.Module._load (module.js:489:3)
at Module.require (module.js:579:17)
at require (internal/module.js:11:18)
at requireConfig (B:\OSPanel\domains\domains.dev\frontend\node_modules\webpack\bin\convert-argv.js:97:18)
Тоже не считает, счетчик на 0 стоит и все