Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Django examples
#1
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.
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply
#2
Most of the folks that are doing web work suggest Flask
Reply
#3
(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.
Reply
#4
For small projects bottle.py could fit perfectly
"As they say in Mexico 'dosvidaniya'. That makes two vidaniyas."
https://freedns.afraid.org
Reply
#5
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?
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply
#6
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!
Reply
#7
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.
"As they say in Mexico 'dosvidaniya'. That makes two vidaniyas."
https://freedns.afraid.org
Reply
#8
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.
Reply
#9
(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
Reply
#10
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
"As they say in Mexico 'dosvidaniya'. That makes two vidaniyas."
https://freedns.afraid.org
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Django: How to automatically substitute a variable in the admin page at Django 1.11? m0ntecr1st0 3 3,247 Jun-30-2019, 12:21 AM
Last Post: scidam

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020