[web2py] License Question

2012-04-03 Thread SeamusSeamus
Quick question: When do I need to have "powered by web2py" on the bottom of my page? For my own personal projects? If I charge to use my site / app? What if I run it on a clients server and manage it for them? What if I sell the software to a company? My clients will not want "Powered by Web2py

[web2py] Re: License Question

2012-04-03 Thread SeamusSeamus
Great! Thanks for this info! On Tuesday, April 3, 2012 12:46:59 PM UTC-6, Anthony wrote: > > Quick question: >> When do I need to have "powered by web2py" on the bottom of my page? >> > > Never. This is not a requirement of the web2py license. If you'd like to > put it there, please do, but no n

[web2py] Problem with Skeleton and Web2py

2012-06-26 Thread SeamusSeamus
I am trying to make a nice design with skeleton. It doesn't seem to be working. Skeleton normally comes with layout.css, base.css, and skeleton.css, as well as an index.html. Web2py only has skeleton.css. Why is this? So I download skeleton, place the CSS files in the CSS directory, and put t

[web2py] Re: Problem with Skeleton and Web2py

2012-06-26 Thread SeamusSeamus
Yep, CSS issue. My own fault. I didnt create a container correctly. Sorry folks for wasting bandwidth! On Tuesday, June 26, 2012 7:40:36 PM UTC-6, SeamusSeamus wrote: > > I am trying to make a nice design with skeleton. It doesn't seem to be > working. Skeleton normally comes w

[web2py] Form Dropbox dependant on other dropbox (field) (Validation Dependencies, ...)

2012-07-11 Thread SeamusSeamus
I am trying to create a form to input data for a particular item. For example, I would like to store the item's location, area, and owner. An example is I have an owner, an area (Items location), and the item. When I go to input a new "item", I need to select the "owner", then the dropbox belo

[web2py] SQLForm.grid custom details page

2012-07-29 Thread SeamusSeamus
Hi, I am creating a basic app that allows users to view item in an inventory. They are able to see the item list by using the sqlform.grid. Because some fields in the database are private and I do not want the viewer to see it, I am unable to use the default details page. Because of this, I n

[web2py] Depoying on GAE. Frustration. Followed directions but still getting error.

2012-08-13 Thread SeamusSeamus
HI. I followed the directions on the deployment recipe seen here http://web2py.com/books/default/chapter/29/13 I still get: Internal errorTicket issued: unknown I am not sure which code to post as all I have changed is the app.yaml file: ap

[web2py] SEO Friendly URLs and Page Titles

2012-08-21 Thread SeamusSeamus
1. What is the easiest way to make it so each page has it's own title? Currently it is set by layout.html, but what if I want its own page to have an independent title? 2. How can I make it so the of the page is the "name" of a field in a model? I am using SQLForm now, and have /product/1 and

[web2py] Re: SEO Friendly URLs and Page Titles

2012-08-21 Thread SeamusSeamus
u can set > them conditionally in a model file). If you need to use a database value, > just do a query to get the value (your probably want to cache it to improve > performance). > > Anthony > > On Tuesday, August 21, 2012 12:49:00 PM UTC-4, SeamusSeamus wrote: >> >

[web2py] Re: SEO Friendly URLs and Page Titles

2012-08-21 Thread SeamusSeamus
y, August 21, 2012 4:31:54 PM UTC-4, SeamusSeamus wrote: >> >> Thanks, what about URLs so it is >> www.domain.com/product/{{fieldname<http://www.domain.com/product/%7B%7Bfieldname>title}} >> >> >> On Tuesday, August 21, 2012 10:56:49 AM UTC-6, Anthony wrote: &

[web2py] Creating a Contact Form

2012-08-22 Thread SeamusSeamus
Hi, I am trying to make a simple contact form that emails me the arguments. The email is not sending, and as soon as the page loads, my message 'Unable to send email' shows up as an error. In Controller: def contactform(): form=SQLFORM.factory( Field('your_email',requires=IS_EMAI

Re: [web2py] Re: SEO Friendly URLs and Page Titles

2012-08-22 Thread SeamusSeamus
your urls. > > URL("product", "show", args=product.slug) > > in product/show/product-name > > def show(): > try: > product = db.product[int(request.args(0))] > except: > product = db(db.product.slug == request.args(0)).select(

Re: [web2py] Re: SEO Friendly URLs and Page Titles

2012-08-22 Thread SeamusSeamus
6, Anthony wrote: > > What is "equipment"? > > On Thursday, August 23, 2012 12:53:10 AM UTC-4, SeamusSeamus wrote: >> >> In my SQLForm.grid I added this >> links = [lambda row: A('Details',_href=URL('default','show', >> ar

[web2py] Re: Creating a Contact Form

2012-08-22 Thread SeamusSeamus
Thanks very much. Elif worked! On Wednesday, August 22, 2012 10:56:53 PM UTC-6, Anthony wrote: > > > > form=SQLFORM.factory( >> Field('your_email',requires=IS_EMAIL()), >> Field('question',requires=IS_NOT_EMPTY())) >> if form.process().accepted: >> if mail.send(to=

Re: [web2py] Re: SEO Friendly URLs and Page Titles

2012-08-22 Thread SeamusSeamus
ment to your lambda is "row", so I assume you want row.slug. > Because "equipment" is not an argument of the lambda, it will look for it > in the outer scope. It looks like you must have a function named > "equipment", which is what is being referenced in

Re: [web2py] Re: SEO Friendly URLs and Page Titles

2012-08-22 Thread SeamusSeamus
Your are right, I need to change the links to default. This is what I have done so far, sorry for confusion: in controller: def index(): links = [lambda row: A('Details',_href=URL('default','show', args=[row.slug]))] fields = [db.equipment.category, db.equipment.title, db.equipment.pri

Re: [web2py] Re: SEO Friendly URLs and Page Titles

2012-08-23 Thread SeamusSeamus
Thanks, that worked. I just added db.equipment.slug to the fields On Thursday, August 23, 2012 1:18:16 AM UTC-6, Anthony wrote: > > links = [lambda ro >> w: A('Details',_href=URL('default','show', args=[row.slug]))] >> fields = [db.equipment.category, db.equipment.title, >> db.equipment.

[web2py] Limit output of a "details" page to only show some items.

2012-08-23 Thread SeamusSeamus
I am trying to set a nice clean "details" page that only shows some basic information for a product. I do not want ALL information that is being storded (such as my slug, private notes field, etc..) to be visable to the customer. Now, I have this: def details(): try: equipment = db.

Re: [web2py] Limit output of a "details" page to only show some items.

2012-08-23 Thread SeamusSeamus
-install%3Futm_source%3Dextension%26utm_medium%3Demail%26utm_campaign%3Dpromo_18> > > > > > On Thu, Aug 23, 2012 at 9:38 PM, SeamusSeamus > > > wrote: > >> I am trying to set a nice clean "details" page that only shows some basic >> information for a pr

[web2py] Error when assigning form.vars

2012-08-25 Thread SeamusSeamus
When I do this: form=SQLFORM.factory( Field('your_email',requires=IS_EMAIL()), Field('your_phone'), Field('subject'), Field('question', 'text', requires=IS_NOT_EMPTY())) form.vars = dict(subject='Item %s: %s' % (database.id, database.title)) if form.proce

Re: [web2py] Error when assigning form.vars

2012-08-25 Thread SeamusSeamus
Thanks! On Saturday, August 25, 2012 1:37:55 PM UTC-6, Jonathan Lundell wrote: > > On 25 Aug 2012, at 12:27 PM, SeamusSeamus > > > wrote: > > When I do this: > form=SQLFORM.factory( > Field('your_email',requires=IS_EMAIL()), > Field

[web2py] Category and Subcategory

2012-08-25 Thread SeamusSeamus
Right now I am categorizing my products by 'category' and 'subcategory' using smartgrid. This makes it very easy for me to log in and set my cats and sub cats. I have two tables below. db.define_table('cat', Field('name'), format = '%(name)s' ) db.define_table('subcat', Field('

Re: [web2py] Re: SEO Friendly URLs and Page Titles

2012-08-25 Thread SeamusSeamus
This runs into a problem where if I have two items of the same 'title', the user will only be linked to the first one that was created. Can I make it so the slug is a field that I designate? Or make it so the slug adds a incrementing number such as: Field('slug', compute=lambda row: IS_SLUG(

Re: [web2py] Re: SEO Friendly URLs and Page Titles

2012-08-25 Thread SeamusSeamus
> > On Saturday, August 25, 2012 7:16:50 PM UTC-4, SeamusSeamus wrote: >> >> This runs into a problem where if I have two items of the same 'title', >> the user will only be linked to the first one that was created. Can I make >> it so the slug is a field that

Re: [web2py] Re: SEO Friendly URLs and Page Titles

2012-08-26 Thread SeamusSeamus
inserted. You could instead make the id > part of the URL (like Stack Overflow), or maybe make it a virtual field, or > generate your own unique id (separate from the record id). > > Anthony > > On Saturday, August 25, 2012 8:34:22 PM UTC-4, SeamusSeamus wrote: >> >>

Re: [web2py] Re: SEO Friendly URLs and Page Titles

2012-08-27 Thread SeamusSeamus
t.args(1) > > query = (db.items.id == item_id) & (db.items.slug == item_slug) > > item = db(query).select().first() > return dict(item=item) > > http:///items/show/1/awesome-product > > http:///items/show/2/awesome-product > > > On Sun, Aug 26, 2012 at 4:01 AM,

Re: [web2py] Re: SEO Friendly URLs and Page Titles

2012-08-27 Thread SeamusSeamus
inks = [lambda row: A('Details',_href=URL('default','equipment', > args=[row.id, row.slug]))] > > > On Tuesday, August 28, 2012 10:28:39 AM UTC+12, SeamusSeamus wrote: >> >> Okay, but do I leave everything else alone? All I want t

Re: [web2py] Re: SEO Friendly URLs and Page Titles

2012-08-27 Thread SeamusSeamus
nevermind I fixed it. Not sure why, but if it was named 'equipment' the controller showed up...any other name it doesnt. I just renamed On Monday, August 27, 2012 5:05:44 PM UTC-6, SeamusSeamus wrote: > > ah, yes, all is well now...however, this is strange. > Now, when I cl

[web2py] Internal Error if args are not passed

2012-08-29 Thread SeamusSeamus
Hi, I am passing args from my SQLForm to a page (details.html) which pretty much shows 'details' about a product. www.mydomain.com/details/item-name If I just go to www.mydomain.com/details I get 'NoneType' object has no attribute 'title' I am guessing this is because it is loading a pa

[web2py] Re: Internal Error if args are not passed

2012-08-29 Thread SeamusSeamus
ment.title}} . . {{=equipment.description}} On Wednesday, August 29, 2012 10:59:28 PM UTC-6, Anthony wrote: > > I think we have to see what your function is returning and what the view > is doing with it to answer that one. > > On Thursday, August 30, 2012 12:02:46 AM UTC-4, SeamusSeamus wrote: &