Here is a more complex class:
>>> class MyClass(object):
>>>z = 2
>>>def __init__(self, a, b):
>>>self.x = a, self.y = b # change a, to a;
>>> a = 1 # reset a
>>> def g(b):
a = 2 # creates a new local a
return b + 2 # change this to:return b + a
@auth.requires_login()
def hello():
return dict(message='hello %(first_name)' % auth.user)
is missing an s after %(first_name) :
@auth.requires_login()
def hello():
return dict(message='hello %(first_name)s' % auth.user)
try...except...else...finally
>>> try:
>>> a = 1 / 0
>>> except Exception, e
>>> print 'oops: %s' % e
missing ":"
>>> except Exception, e:
missing ":"
Special Attributes, Methods and Operators
>>> class MyList(object)
>>> def __init__(self, *a): self.a = list(a)
>>> class MyList(object):
>>> def __init__(self, *a): self.a = list(a)
Hello,
I am new to Web2py and right now i am learning basics of it.I am bit
confused that how python code is embeded in HTML.The database related
programming and all other examples seems confusing to me.Can someone
provide me some links or something to get more understanding of these
examples.
Hi All -
So I posted an update to the KickStarter earlier. I 100% agree about the
blog/wiki-type examples - it's done too much. I am going to open up a
survey next week to see what people would like to see developed. In the
meantime, email or message me with your ideas about what you'd like
de
interesting project. as a former accountant, being able to pull/push data
to QB is a must. unfortunately, the QB web api is terribly documented. i
have updated docs on how to use it to pull data (let me know if you're
interested). this would definitely be something i'd keep in the back of
your
will this be an online class per chance for extended/adult students?
On Thursday, April 4, 2013 4:14:01 PM UTC-7, Luca wrote:
>
> I am considering teaching one such class in connection with UCSC in the
> Fall of this year.
> Luca
>
> On Thursday, April 4, 2013 6:37:15 AM UTC-7, jjg0 wrote:
>>
>>
i remember reading somewhere that it's better to use the built-in shell in
web2py, but i can't find the article/post. anyone know (1) if it is
"better", and, (2) if so, why?
--
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe
he admin shell works just fine for you, in which case, use
> it.
>
> Anthony
>
>
> On Friday, April 5, 2013 4:57:49 PM UTC-4, Michael Herman wrote:
>>
>> i remember reading somewhere that it's better to use the built-in shell in
>> web2py, but i can
I'm slightly confused on how to make a calculation and then update a SQL
field after a form is validated.
What I'm trying to do is this:
http://www.screencast.com/users/Mike_Extentech/folders/Jing/media/70a2511b-f978-458b-8d4c-9a635b191a33
Essentially, the end_date field is dependent on the dat
ing statement -
INSERT date('now','+10 day');
Is there a DAL equivalent? I didn't see anything in the book. Seems
like this would be too low of a function to be part of the DAL.
On Mon, Apr 15, 2013 at 11:52 AM, Niphlod wrote:
>
> either with onvalidate or with a
The logic makes sense in Rails. Something isn't quite clicking with DAL.
class Event < ActiveRecord::Base
# Sets the end_date to be +duration+ months after the start_date
def duration=(duration)
self.end_date = self.start_date + duration.to_i.months
end
end
<%= form_for(@event) do |f|
Interesting. There's huge potential for projects like this:
- http://javelinapp.com/
(http://pandodaily.com/2013/06/10/javelin-the-lean-startup-app-thats-a-product-of-lean-startup-methodology/)
-
http://www.kickstarter.com/projects/jmitchel3/coding-for-entrepreneurs/?ref=kicktraq
I created a Python-based course called Real Python for the Web that begins
with the basics (database management, server-side and client-side
programming), then moves into Flask and on to web2py. You create a number
of applications and go over basic conventions/best practices.
If you want, you c
http://www.realpython.com/blog/python/web2py-migrating-from-sqlite-to-mysql/
--
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to web2py+unsubscr...@googlegroup
I develop as much as I can in web2py. Scalability has a lot more to do with
architecture and database design than the framework. If you are developing
an MVP, you never want to think about scalability in the first place.
Develop quickly, test the main features, pivot (if needed), and then grow
Hello - I am the author of Real Python for the web -
http://www.realpython.com. My course is focused on web development in
Python, so I touch everything from web scraping to database programming as
well as the various Python-based web frameworks - Flask, web2py, and Django.
I am adding more mat
I'd love to hear more about your curriculum that you're going to be
teaching. I wrote the course Real Python for the Web @ RealPython.com. I'd
love to compare notes. :)
On Mon, Aug 12, 2013 at 6:53 PM, Luca wrote:
> I will be teaching a web dev class at UCSC based on web2py, and I may make
> th
in case anybody is interested ...
http://mherman.org/blog/2013/08/25/custom-apache-config-for-php-and-web2py/
it's on reddit (web2py sub) and i just posted on hacker news - upvote if
you want!
cheers!
--
---
You received this message because you are subscribed to the Google Groups
"web2
You can handle this in a number of way. Probably the easiest is just to use
global variables for all your sensitive info and place them in config file.
Then just add that config file to your .gitignore file.
On Saturday, October 12, 2013 2:24:23 PM UTC-6, stefaan wrote:
>
> Hello all,
>
> When c
Or you can try it the long, round about way
-
http://www.realpython.com/blog/python/web2py-migrating-from-sqlite-to-mysql/#.Ulm3xmTTXCU
On Friday, October 11, 2013 6:14:43 PM UTC-6, François Delpierre wrote:
>
> Hi,
>
> For performance reason I would like to migrate my DB from sqlite to
> postg
I am struggling with the same issue as Jim. I dont want to create custom
edit forms and if possible use the builtin edit form. Is there an answer
for this yet? Did the ticket get actioned?
Thanks
Herman
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http
24 matches
Mail list logo