Coder Social home page Coder Social logo

emmett's Issues

Please create full examples

Hello, your sample code in docs do not work out of the box.
Its not clear that the full code should be written.
For example i´m trying to understand how to create a form

your docs says

form weppy import Field, Form
from weppy.validators import inSet

@app.expose('/form')
def a():
simple_form = Form({
'name': Field(),
'number': Field('int'),
'type': Field(
validation={'in': ['type1', 'type2']}
)
})
if simple_form.accepted:
#do something
return dict(form=simple_form)

but this is not enough to create a valid form code

i´m not sure but i thing i need to add
from weppy import App
app = App(name)

and
if name == "main":
app.run()

Please be more patient with dummies like me and most of the people that follows you.

Regards

Major error reloading Python

When I reloaded Python, I got this message on my screen:

uWSGI Error

Python application not found

And now I cannot access the Rascal anymore.
Can someone help please?

Stream files from folders

Add a method to stream file directly from a folder.
The current stream_file() should be converted to stream_fromDB() or something like that.

Add `where` method to models and lambda conditions

Something like:

Event.where(lambda e: (e.start_at >= datetime(2015, 5, 20)) & (e.ends_at < datetime(2015, 6, 20)))

instead of

db((Event.start_at >= datetime(2015, 5, 20)) & (Event.ends_at < datetime(2015, 6, 20)))

We need some tests

We really need tests.

  • DAL layer
  • Basic (app, global objects)
  • Routing
  • Sessions
  • Caching
  • Templating
  • AppModules
  • Extensions
  • Translator
  • Validations

Allow to create "scopes" on Model sets

Just an idea. Something like:

class Event(Model):
    name = Field()
    start_at = Field('datetime')
    ends_at = Field('datetime')
    speaker = Field()

    @scope('active')
    def get_active(cls):
        return (cls.start_at <= request.now) & (cls.ends_at > request.now)

so we can query:

Event.active().where(Event.name.startswith('foo'))
# and/or
db(Event.speaker == "john").active()

Production Ready?

How far away is this project from being able to be run in the wild?

Caching for templating system

Actually templating system parse and exec templates code per request.
I would like to cache the source of the template and use python compile() in combination with exec.

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.