Coder Social home page Coder Social logo

craft's People

Contributors

aisola avatar borfast avatar josephmancuso avatar mandarvaze avatar myusko avatar nioperas06 avatar resmo avatar thetonus avatar vaibhavmule avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

craft's Issues

Have an option on Craft model to generate mutators and accessor .

Have an option on Craft model to generate mutators and accessor.

The command would create mutators and accessors for all columns of the table. For example

from orator.orm import Model, accessor

class User(Model):

    @accessor
    def first_name(self):
        first_name = self.get_raw_attribute('first_name')

        return first_name[0].upper() + first_name[1:]

    @first_name.mutator
    def set_first_name(self, value):
        self.set_raw_attribute('first_name', value.lower())

write documentation

writing documentation for creating new commands
Write documentation on adding commands to craft
Write documentation on how to add migration directories to craft

[CommandNotFound]: Command "command" is not defined.

Using masonite-cli 2.0.7 and trying to create a command;

➜ craft command InstallCommand
  [CommandNotFound]
  Command "command" is not defined.

This command is not defined in the list of available commands (help, install, list, ew, package). So I think these commands (command, provider) need to be created as mentioned in the documentation.
Here adding the service provider should be done inside config/application.py. So what's the purpose of config/providers.py.

ApiProviders causes craft to crash

Adding ApiProvider, to providers causes craft to crash.

Trying to add entry to craft. Below is the error.

WARNING: 'module' object is not callable

Traceback (most recent call last):
  File "/usr/local/bin/craft", line 7, in <module>
    from masonite_cli.application import application
  File "/usr/local/lib/python3.7/site-packages/masonite_cli/application.py", line 39, in <module>
    from wsgi import container
  File "/Users/oseintow/Sites/masonite/wsgi.py", line 41, in <module>
    located_provider = provider()
TypeError: 'module' object is not callable

Warning message running craft new command

HI,

I have masonite-cli installed on my user account folder

 holic  ~  ls .local/bin/
aws                   faker       pyrsa-decrypt          pytest         rst2latex.py            rst2pseudoxml.py   rstpep2html.py
aws_bash_completer    jp.py       pyrsa-decrypt-bigfile  py.test        rst2latex.pyc           rst2pseudoxml.pyc  rstpep2html.pyc
aws.cmd               jp.pyc      pyrsa-encrypt          rst2html4.py   rst2man.py              rst2s5.py          tabulate
aws_completer         orator      pyrsa-encrypt-bigfile  rst2html4.pyc  rst2man.pyc             rst2s5.pyc         tldextract
aws_zsh_completer.sh  pip         pyrsa-keygen           rst2html5.py   rst2odt_prepstyles.py   rst2xetex.py       virtualenv
chardetect            pip3        pyrsa-priv2pub         rst2html5.pyc  rst2odt_prepstyles.pyc  rst2xetex.pyc      waitress-serve
craft                 pip3.6      pyrsa-sign             rst2html.py    rst2odt.py              rst2xml.py         watchmedo
dotenv                pygmentize  pyrsa-verify           rst2html.pyc   rst2odt.pyc             rst2xml.pyc        wheel

So when i run craft is from that location:

 holic  ~/dev/holic-labs/masonite  which craft
/home/holic/.local/bin/craft

When i run craft new command i got a warning message:

 holic  ~/dev/holic-labs/masonite  craft new demo

WARNING: 

Crafting Application ...

Application Created Successfully!

Now just cd into your project and run

    $ craft install

to install the project dependencies.

Create Something Amazing!

Have installed Python 3.6.6.

Don't know why is appearing that Warning, but until now is everything is running fine.

Have i anyway to know why is giving me a warning?

Stronger Package

We have to run craft Package command outside of masonite project. In this usage, we are not able to run core commands. To be able to make a package story stronger It will be nice to have the functionality to run core commands after creating a project.

Can't Create new project by github api limit.

Description

I can't create a new project with craft command.

$ craft new myproject
  [ProjectLimitReached]
  You have reached your hourly limit of creating new projects. Try again in 1 hour.

suggest to fix

I want to use my access token on github.
so please make a option or load environment variables.

verify that craft auto adds the correct virtual environment in windows

I''ve added a way for Craft to auto add the virtual environment the user is currently in temporarily to the sys.path. This allows the command line tool to pick up on packages that are not on the system and only inside the virtual environment. It currently looks in:

/full/path/to/venv/lib/{directory that starts with python}/site-packages

I need to verify this path is the same on windows. I assume it is already the same as linux.

TypeError: 'module' object is not callable

Just trying to follow package creation wiki. I create InstallCommand and when run craft I have this error 😕.

WARNING: 'module' object is not callable
Traceback (most recent call last):  File "/Users/nioperas06/.local/share/virtualenvs/masonite-package-J5jd90TB/bin/craft", line 7, in <module>    from masonite_cli.application import application  File "/Users/nioperas06/.local/share/virtualenvs/masonite-package-J5jd90TB/lib/python3.6/site-packages/masonite_cli/application.py", line 39, in <module>
    from wsgi import container
  File "/Users/nioperas06/workspace/tutorials/masonite-package/tuto/wsgi.py", line 42, in <module>
    located_provider.load_app(container).register()
  File "/Users/nioperas06/workspace/tutorials/masonite-package/tuto/app/providers/InstallProvider.py", line 10, in register
    self.app.bind('InstallCommand', InstallCommand())
TypeError: 'module' object is not callable
  • InstallCommand.py
""" A InstallCommand Command """
from cleo import Command


class InstallCommand(Command):

    def handle(self):
        pass
  • InstallProvider.py
''' A InstallProvider Service Provider '''
from masonite.provider import ServiceProvider
from app.commands import InstallCommand

class InstallProvider(ServiceProvider):

    wsgi = False

    def register(self):
        self.app.bind('InstallCommand', InstallCommand())

    def boot(self):
        pass
  • config/providers.py
...
from app.providers.InstallProvider import InstallProvider
...
PROVIDERS = [
    ...
    InstallProvider,
]

😕

auto generate a virtual environment

if the install command is ran and is not inside a virtual environment, it should auto create one under the venv folder namespace and then run the installation.

craft migrate:refresh --quiet --no-ansi still prints info on shell

I'm trying to clear my database when my UnitTests runs...
So, i've added:

def tearDown(self):
    subprocess.call('craft migrate:refresh --quiet --no-ansi', shell=True)

But when i run the tests, i still got all querys on my shell. It be a little confusing. We should be able to hide those messages without disable all DB_LOG in .env file

image

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.