Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

djorm

Package Overview
Dependencies
Maintainers
1
Versions
66
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

djorm - npm Package Compare versions

Comparing version 0.1.18-alpha.0 to 0.1.18-alpha.1

fields/EmailField.js

14

fields/FileField.js

@@ -39,2 +39,6 @@ const { AttrModel, Field } = require('../models/AttrModel')

static meta = {
modelName: 'File'
}
get filePath () {

@@ -71,4 +75,4 @@ return [this.get('basePath'), this.get('name')].join('/')

static basePath = new CharField()
static model = new ObjectField({ default: File, model: File })
static storage = new ObjectField({ model: FileStorage })
static model = new ObjectField({ default: () => File, model: Object })
static storage = new ObjectField({ model: FileStorage, null: true })
static defaultStorage = new ObjectField({

@@ -87,7 +91,7 @@ default: getSystemDefaultStorage,

static basePathField = new Field()
static storageField = new Field()
static storageField = new Field({ null: true })
parse (value, inst) {
return this.model.from({
storage: this.resolveStorage(inst),
return this.get('model').from({
storage: this.resolveStorage(this),
basePath: getFieldValue(inst, this.basePathField) || this.get('basePath'),

@@ -94,0 +98,0 @@ name: getFieldValue(inst, this.nameField)

@@ -10,2 +10,3 @@ const { Field } = require('../models/AttrModel')

...require('./DateTimeField'),
...require('./EmailField'),
...require('./FileField'),

@@ -12,0 +13,0 @@ ...require('./FloatField'),

{
"name": "djorm",
"version": "0.1.18-alpha.0",
"version": "0.1.18-alpha.1",
"description": "Django like ORM framework",

@@ -42,3 +42,3 @@ "author": "Pavel Žák <pavel@zak.global>",

},
"gitHead": "2abd6e06437504b23c9cbb6177746ffbcbdb2d46"
"gitHead": "f3a01cf12213650617ae9a2c554776d9cb6a38d5"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc