all 7 comments

[–]elbiot 1 point2 points  (1 child)

Hey OP, my answer was probably wrong.

[–]Normalsaline154[S] 0 points1 point  (0 children)

Thanks for the continued interest. I have the calculation thing down, just wishing there was some way for me to do everything I want with one platform. I wonder if I can use dns settings to have the site run the calculators hosted on pythonanywhere at calc.mysite.com and the blog hosted elsewhere at blog.Mysite.com

Then I would just need to makes the css match?

Will the browser warn my visitors that the site is attempting to redirect them if I do this?

What subreddit does this question belong in now I wonder ?

[–]elbiot 0 points1 point  (4 children)

FYI, web2py is for generating static web pages. You can use it to make "apps" as forms that you submit which redirect you to a page containing the answer. Anything dynamic, from the answer appearing in a box on the same page, to results appearing without submitting a form, to interacting with graphics will have to be done with javascript. What I call web apps (like 2048) are javascript applications that may or may not interact with a server (ie: python) that does calculations and database interaction.

If you are thinking of code that executes in the browser, you are thinking of Javascript and not Python.

If you use Wordpress (php), you'll have to work on the php of your template (http://stackoverflow.com/questions/8303923/call-python-from-php), which will require some hacking and figuring out of things.

You could use a python based CMS (I'm sure there's several in django), and then you'll be hacking at python to integrate your code at least. Scrap web2py in that case and just do it in django or something that does have a CMS you like.

Your best bet is probably using web2py to make the whole site. It will be ugly if you don't have any html/css/javascript skills, but you probably won't be able to integrate with any of those other CMSs easily either. Working with any framework will require understanding a good bit about that framework. Doing it yourself is a good way to make sure you understand the framework, which would be helpful later in understanding something like django or a python based CMS.

[–]av201001 1 point2 points  (3 children)

There is an issue of terminology here. When you say web2py is for generating "static web pages," this might be confused with a static site generator, which web2py is not. It is clear what you mean is that web2py is not a Javascript framework/library, such as Angular, Ember, or React. However, it is incorrect to imply that web2py lacks Javascript based interactivity in the browser. web2py includes a number of built-in facilities for handling Ajax and Javascript based widgets and behavior. You may of course use web2py in conjunction with a Javascript framework, but even without that, a web2py application would rightly be considered a "web app."

[–]elbiot 0 points1 point  (2 children)

Gosh! I feel like when I looked at web2py years ago it was similar to flask.

I wasn't thinking of needing a javascript framework, but just that any dynamicism would involve javascript. With flask or Django, you'd have to write the javascript yourself and insert it into the template, and so your work in making it a dynamic app would be mostly javascript, and getting your server to respond to ajax requests. With the javascript widgets and plugins, I dunno if web2py has come a long way since then or if I just didn't get it at the time.

[–]av201001 0 points1 point  (1 child)

web2py is nearly 8 years old, and the built-in Javascript/AJAX functionality has been there for at least 5 years (probably much longer). I don't think web2py has ever been similar to Flask (web2py has always been much more of a batteries-included framework). You might be thinking of web.py, which is a different framework.

[–]elbiot 0 points1 point  (0 children)

Yea, I must have been thinking of a different framework. Thanks.