Code Monkey home page Code Monkey logo

generator-vars-django's Issues

Path to virtualenv

Got the following error

Successfully installed Django ecdsa paramiko pycrypto
Cleaning up...
fs.js:549
  return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
                 ^

Error: ENOENT: no such file or directory, open '/home/jakob/projects/foobar/bin/activate'
    at Error (native)
    at Object.fs.openSync (fs.js:549:18)
    at Object.fs.readFileSync (fs.js:397:15)
    at readFileAsString (/usr/lib/node_modules/generator-vars-django/node_modules/yeoman-generator/lib/actions/wiring.js:277:13)
    at null.<anonymous> (/usr/lib/node_modules/generator-vars-django/app/index.js:280:29)
    at emitTwo (events.js:87:13)
    at ChildProcess.emit (events.js:172:7)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)

In https://github.com/VARIANTE/generator-vars-django/blob/master/app/index.js#L279 the path to bin/activate seems wrong to me.

Unless you make a symlink in the project dir to bin

ln -s {...}/env/bin bin 

kind regards,
Jakob

Perhaps it is a mistake in task/serve.js

Old line

// gulp.watch(config.paths.tmp+'/*/.'+config.patterns.scripts, function() { sequence(browserSync.reload); });

New line

gulp.watch(config.paths.src+'/*/.'+config.patterns.scripts, function() { sequence('scripts', browserSync.reload); });

Result

Livereload work correct with js (try: gulp serve --debug --watch)

Undefined variable in build.js

/home/jakob/projects/op/tasks/build.js:60
      if (shouldWatch) {
          ^

ReferenceError: shouldWatch is not defined
    at DestroyableTransform.<anonymous> (/home/jakob/projects/op/tasks/build.js:60:11)
    at emitOne (events.js:101:20)
    at DestroyableTransform.emit (events.js:188:7)
    at onwriteError (/home/jakob/projects/op/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:322:10)
    at onwrite (/home/jakob/projects/op/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:339:11)
    at WritableState.onwrite (/home/jakob/projects/op/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:123:5)
    at afterTransform (/home/jakob/projects/op/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:81:3)
    at TransformState.afterTransform (/home/jakob/projects/op/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:58:12)
    at errorM (/home/jakob/projects/op/node_modules/gulp-sass/index.js:134:14)
    at Object.callback (/home/jakob/projects/op/node_modules/gulp-sass/index.js:145:18)

Watch on new images

Is it possible make a watch for new images added, and process them, so they are available...

-- Jakob

AttributeError: module 'html.parser' has no attribute 'HTMLParseError'

I got this when performing build command 'gulp':

[22:35:19] Starting 'build'...
Traceback (most recent call last):
File "/Volumes/Private_dev_own/lnpp/app/manage.py", line 18, in
execute_from_command_line(sys.argv)
File "/Users/devil/.virtualenvs/lnpp/lib/python3.5/site-packages/django/core/management/init.py", line 385, in execute_from_command_line
utility.execute()
File "/Users/devil/.virtualenvs/lnpp/lib/python3.5/site-packages/django/core/management/init.py", line 354, in execute
django.setup()
File "/Users/devil/.virtualenvs/lnpp/lib/python3.5/site-packages/django/init.py", line 18, in setup
from django.utils.log import configure_logging
File "/Users/devil/.virtualenvs/lnpp/lib/python3.5/site-packages/django/utils/log.py", line 10, in
from django.views.debug import ExceptionReporter, get_exception_reporter_filter
File "/Users/devil/.virtualenvs/lnpp/lib/python3.5/site-packages/django/views/debug.py", line 10, in
from django.http import (HttpResponse, HttpResponseServerError,
File "/Users/devil/.virtualenvs/lnpp/lib/python3.5/site-packages/django/http/init.py", line 4, in
from django.http.response import (HttpResponse, StreamingHttpResponse,
File "/Users/devil/.virtualenvs/lnpp/lib/python3.5/site-packages/django/http/response.py", line 13, in
from django.core.serializers.json import DjangoJSONEncoder
File "/Users/devil/.virtualenvs/lnpp/lib/python3.5/site-packages/django/core/serializers/init.py", line 23, in
from django.core.serializers.base import SerializerDoesNotExist
File "/Users/devil/.virtualenvs/lnpp/lib/python3.5/site-packages/django/core/serializers/base.py", line 6, in
from django.db import models
File "/Users/devil/.virtualenvs/lnpp/lib/python3.5/site-packages/django/db/models/init.py", line 6, in
from django.db.models.query import Q, QuerySet, Prefetch # NOQA
File "/Users/devil/.virtualenvs/lnpp/lib/python3.5/site-packages/django/db/models/query.py", line 13, in
from django.db.models.fields import AutoField, Empty
File "/Users/devil/.virtualenvs/lnpp/lib/python3.5/site-packages/django/db/models/fields/init.py", line 18, in
from django import forms
File "/Users/devil/.virtualenvs/lnpp/lib/python3.5/site-packages/django/forms/init.py", line 6, in
from django.forms.fields import * # NOQA
File "/Users/devil/.virtualenvs/lnpp/lib/python3.5/site-packages/django/forms/fields.py", line 18, in
from django.forms.utils import from_current_timezone, to_current_timezone
File "/Users/devil/.virtualenvs/lnpp/lib/python3.5/site-packages/django/forms/utils.py", line 15, in
from django.utils.html import format_html, format_html_join, escape
File "/Users/devil/.virtualenvs/lnpp/lib/python3.5/site-packages/django/utils/html.py", line 16, in
from .html_parser import HTMLParser, HTMLParseError
File "/Users/devil/.virtualenvs/lnpp/lib/python3.5/site-packages/django/utils/html_parser.py", line 12, in
HTMLParseError = _html_parser.HTMLParseError
AttributeError: module 'html.parser' has no attribute 'HTMLParseError'

Watching db.sqlite reloads on db save

I tracked down a problem where running a POST request where the database is saved would always reload the page. This is due to patterns.core including sqlite3 files when sqlite is being used in a project. The line is https://github.com/andrewscwei/generator-vars-django/blob/master/app/templates/tasks/.taskconfig#L31

In my case, reloading the page on saving to the db is annoying at best, and at worst produces app behavior that's plain wrong. Is there a use-case for watching the sqlite3 database files?

util is undefined build.js

/home/jakob/projects/op/tasks/build.js:104
        util.log(util.colors.blue('[browserify]'), util.colors.red(`Error: ${err.message}`));
        ^

ReferenceError: util is not defined
    at Readable.<anonymous> (/home/jakob/projects/op/tasks/build.js:104:9)
    at emitOne (events.js:101:20)
    at Readable.emit (events.js:188:7)
    at Labeled.<anonymous> (/home/jakob/projects/op/node_modules/read-only-stream/index.js:28:44)
    at emitOne (events.js:96:13)
    at Labeled.emit (events.js:188:7)
    at Labeled.<anonymous> (/home/jakob/projects/op/node_modules/stream-splicer/index.js:130:18)
    at emitOne (events.js:101:20)
    at Labeled.emit (events.js:188:7)
    at Deps.<anonymous> (/home/jakob/projects/op/node_modules/stream-splicer/index.js:130:18)

Should be $util.

Packages update

Hello!

Can you you update all dependepends on this generator?

Or I can create pull request with it

Generator failing

$ yo django-webapp
...
I'm all done. Running bower install & npm install for you to install the required dependencies. If this fails, try running the command yourself.


npm WARN deprecated [email protected]: Use the globby package instead

> [email protected] postinstall /Users/sardor/Projects/yayma/etc/node_modules/pngquant-bin
> node index.js

path.js:7
    throw new TypeError('Path must be a string. Received ' + inspect(path));
    ^

TypeError: Path must be a string. Received { name: 'pngquant',
  url: 'https://raw.github.com/sindresorhus/node-pngquant-bin/v0.1.7/vendor/osx/pngquant' }
    at assertPath (path.js:7:11)
    at Object.basename (path.js:1355:5)
    at /Users/sardor/Projects/yayma/etc/node_modules/download/index.js:35:43
    at each (/Users/sardor/Projects/yayma/etc/node_modules/each-async/each-async.js:63:4)
    at module.exports (/Users/sardor/Projects/yayma/etc/node_modules/download/index.js:33:5)
    at BinWrapper._download (/Users/sardor/Projects/yayma/etc/node_modules/pngquant-bin/node_modules/bin-wrapper/index.js:283:14)
    at BinWrapper.check (/Users/sardor/Projects/yayma/etc/node_modules/pngquant-bin/node_modules/bin-wrapper/index.js:75:10)
    at /Users/sardor/Projects/yayma/etc/node_modules/pngquant-bin/index.js:27:5
    at FSReqWrap.cb [as oncomplete] (fs.js:251:19)
[email protected] /Users/sardor/Projects/yayma/etc
└── (empty)

npm WARN [email protected] No description
npm WARN [email protected] No repository field.
npm WARN [email protected] No license field.
npm ERR! Darwin 15.5.0
npm ERR! argv "/Users/sardor/.nvm/versions/node/v6.0.0/bin/node" "/Users/sardor/.nvm/versions/node/v6.0.0/bin/npm" "install"
npm ERR! node v6.0.0
npm ERR! npm  v3.8.6
npm ERR! code ELIFECYCLE

npm ERR! [email protected] postinstall: `node index.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] postinstall script 'node index.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the pngquant-bin package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node index.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs pngquant-bin
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls pngquant-bin
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/sardor/Projects/yayma/etc/npm-debug.log
npm ERR! code 1
events.js:165
      throw err;
      ^

Error: Uncaught, unspecified "error" event. (1)
    at Appgenerator.emit (events.js:163:17)
    at done (/Users/sardor/.nvm/versions/node/v6.0.0/lib/node_modules/generator-django-webapp/node_modules/yeoman-generator/lib/base.js:318:16)
    at /Users/sardor/.nvm/versions/node/v6.0.0/lib/node_modules/generator-django-webapp/node_modules/async/lib/async.js:232:13
    at /Users/sardor/.nvm/versions/node/v6.0.0/lib/node_modules/generator-django-webapp/node_modules/async/lib/async.js:113:21
    at /Users/sardor/.nvm/versions/node/v6.0.0/lib/node_modules/generator-django-webapp/node_modules/async/lib/async.js:24:16
    at /Users/sardor/.nvm/versions/node/v6.0.0/lib/node_modules/generator-django-webapp/node_modules/async/lib/async.js:229:17
    at /Users/sardor/.nvm/versions/node/v6.0.0/lib/node_modules/generator-django-webapp/node_modules/async/lib/async.js:516:34
    at Appgenerator.<anonymous> (/Users/sardor/.nvm/versions/node/v6.0.0/lib/node_modules/generator-django-webapp/node_modules/yeoman-generator/lib/actions/install.js:43:7)
    at emitTwo (events.js:111:20)
    at ChildProcess.emit (events.js:191:7)

Node version:

$ node --version
v6.0.0

NPM version

$ npm --version
3.8.6

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.