Python Forum

Full Version: Django examples
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
i have installed Django version 1.5.3 on Ubuntu 16.04.2 using Ubuntu packages.  i want to set up a web page on port 80 with it that reports the client's IP address to the client.  is there a simple example how to do this?  this is just to get started.  the next thing i want to do is a "sign up for a web login" page (adds to a users table).  i am running postgresql.

i am learning Django now. examples wanted. i hope i made a good choice.
Most of the folks that are doing web work suggest Flask
(May-23-2017, 11:23 AM)Larz60+ Wrote: [ -> ]Most of the folks that are doing web work suggest Flask
To elaborate on this a bit, I think Flask is supposed to be fantastic for small to medium things, and Django shines for larger projects. Flask has very little learning curve, Django takes some time.
For small projects bottle.py could fit perfectly
is this small, medium or large?

the website i need to build needs to initially take user sign-ups.  once signed-up these users would login to "buy" various terms of support provided by some cloud software (in Python3).  there would be a form for them to buy that support.  i need to extract (from the db) the list of which users bought the service for which days.  i would be running that extract every day when things get going.  the db would most likely be postgresql.

i was not aware that flask was a web framework tool.  any examples?

(May-23-2017, 06:08 PM)wavic Wrote: [ -> ]For small projects bottle.py could fit perfectly

is this the same as Ubuntu packages python-bottle and python3-bottle?
I would consider that potentially very large.
eCommerce software has a tendency to grow, and grow fast
see Magento: as an example. There is a community edition available that you can download and try out
here: https://magento.com/products/community-edition

PostgreSQL is an excellent choice. Rick solid, commercial class and free. What more could ask for
As a bonus, it comes (if you choose to install it) a complete (PostGIS) GIS extension.
The documentation is outstanding!
Well, I don't know how big are your idea. You can do it on Django, Flask, Bottle.py. But I recommend Pyramid. It is perfectly scalable. Can use it for small, medium or large projects. It's scalable and versatile. And doesn't take the freedom how to use it from you like Django does.
Quote:and Django shines for larger projects
I can agree,but there also different view of this,
like that lager Framework can also be hurdle in a larger project,
because have to write a lot stuff anyway in larger project,then can the freedom Flask give be better.

As a examle.
Patreon(3.1 Million daily page views)is now all Flask and Python 3,they have throw out all PHP(which they used before).
There decision was that lager framework like Django would just be  a hurdle,
when they did port all from PHP to Python 3.
Quote:i was not aware that flask was a web framework tool.  any examples?

Really Huh
Use google there are a lot of tutorial examples for both Flask and Django.
I have several tutorial on this site about Flask.
(May-24-2017, 02:46 AM)Skaperen Wrote: [ -> ]i was not aware that flask was a web framework tool. any examples?
you asked about flask in beginning of April
https://python-forum.io/Thread-flask
back then snippsat gave you example as well link to his tutorial
If you chose Django... They change their version often and you may stick with an old one to just to keep all running.
And it's hard to believe that you can use asyncpg with Django
Pages: 1 2