Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #30784 > unrolled thread
| Started by | shivakrshn49@gmail.com |
|---|---|
| First post | 2012-10-05 01:03 -0700 |
| Last post | 2012-10-05 14:13 -0400 |
| Articles | 5 — 5 participants |
Back to article view | Back to comp.lang.python
How to create a login screen using core python language without using any framework shivakrshn49@gmail.com - 2012-10-05 01:03 -0700
Re: How to create a login screen using core python language without using any framework Hans Mulder <hansmu@xs4all.nl> - 2012-10-05 11:29 +0200
Re: How to create a login screen using core python language without using any framework Joel Goldstick <joel.goldstick@gmail.com> - 2012-10-05 09:11 -0400
Re: How to create a login screen using core python language without using any framework Demian Brecht <demianbrecht@gmail.com> - 2012-10-05 07:41 -0700
Re: How to create a login screen using core python language without using any framework Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2012-10-05 14:13 -0400
| From | shivakrshn49@gmail.com |
|---|---|
| Date | 2012-10-05 01:03 -0700 |
| Subject | How to create a login screen using core python language without using any framework |
| Message-ID | <97fa2804-adda-428f-a78a-d9ab3e22e965@googlegroups.com> |
I need to develop a simple login page using Python language with two fields and a button, like:
Username, Password, Login
I know there are some beautiful Python frameworks like
Django, Grok, WebPy, TurboGears
which support web development using Python, but mine is a basic requirement consisting of only 3 screens (pages):
* 1st page - Login page (Redirects to 2nd page when login button is clicked)
* 2nd page - Page with records in the form of a list, with an option for adding new records (Redirects to 3rd page when "Add Records" button is clicked)
* 3rd page - Page with fields, which are saved as records for the list on 2nd page (After entering details and clicking Submit)
So, I have decided to develop the above functionality using Python **without** using any framework, so that I can have flexibility as well as write my own code.
1. Is it possible to create a login page using Python without using a framework?
2. I haven't worked on web services and don't know the basics of web development in Python.
3. If possible, can you provide me an example on how to create a login page using Python and achieve the functionality described above?
[toc] | [next] | [standalone]
| From | Hans Mulder <hansmu@xs4all.nl> |
|---|---|
| Date | 2012-10-05 11:29 +0200 |
| Message-ID | <506ea86d$0$6969$e4fe514c@news2.news.xs4all.nl> |
| In reply to | #30784 |
On 5/10/12 10:03:56, shivakrshn49@gmail.com wrote: > I need to develop a simple login page using Python language with > two fields and a button, like: > > Username, Password, Login > > I know there are some beautiful Python frameworks like > > Django, Grok, WebPy, TurboGears > > which support web development using Python, but mine is a basic > requirement consisting of only 3 screens (pages): > > * 1st page - Login page (Redirects to 2nd page when login button > is clicked) > * 2nd page - Page with records in the form of a list, with an > option for adding new records (Redirects to 3rd page when "Add > Records" button is clicked) > * 3rd page - Page with fields, which are saved as records for > the list on 2nd page (After entering details and clicking Submit) Implementing your application using any of those frameworks you mentioned, would be easy. > So, I have decided to develop the above functionality using Python > **without** using any framework, so that I can have flexibility as > well as write my own code. This is a bad idea. You'll get much more flexibility using an existing framework then you'd ever achieve by reinventing the wheel on your own. Especially if you have no experience in this field. > 1. Is it possible to create a login page using Python without > using a framework? Yes. But it's a lot of work. You'd effectively be rewriting all the functionality you'd get for free with a framework. And it wouldn't be as flexible, because frameworks can flex in directions that you didn't think of. > 2. I haven't worked on web services and don't know the basics of > web development in Python. In that case, your chances of success are fairly slim. > 3. If possible, can you provide me an example on how to create a > login page using Python and achieve the functionality described > above? The frameworks you mentioned earlier come with tutorials. These tutorials contain such examples. You should really use an existing framework. Once you're aware of how much functionality you get out of a framework (any of them), you wouldn't dream of rewriting all that functionality on your own. Hope this helps, -- HansM
[toc] | [prev] | [next] | [standalone]
| From | Joel Goldstick <joel.goldstick@gmail.com> |
|---|---|
| Date | 2012-10-05 09:11 -0400 |
| Message-ID | <mailman.1851.1349442693.27098.python-list@python.org> |
| In reply to | #30798 |
On Fri, Oct 5, 2012 at 5:29 AM, Hans Mulder <hansmu@xs4all.nl> wrote: > On 5/10/12 10:03:56, shivakrshn49@gmail.com wrote: >> I need to develop a simple login page using Python language with >> two fields and a button, like: >> >> Username, Password, Login >> >> I know there are some beautiful Python frameworks like >> >> Django, Grok, WebPy, TurboGears >> >> which support web development using Python, but mine is a basic >> requirement consisting of only 3 screens (pages): >> >> * 1st page - Login page (Redirects to 2nd page when login button >> is clicked) >> * 2nd page - Page with records in the form of a list, with an >> option for adding new records (Redirects to 3rd page when "Add >> Records" button is clicked) >> * 3rd page - Page with fields, which are saved as records for >> the list on 2nd page (After entering details and clicking Submit) > > Implementing your application using any of those frameworks you > mentioned, would be easy. > >> So, I have decided to develop the above functionality using Python >> **without** using any framework, so that I can have flexibility as >> well as write my own code. > > This is a bad idea. You'll get much more flexibility using > an existing framework then you'd ever achieve by reinventing > the wheel on your own. Especially if you have no experience > in this field. > >> 1. Is it possible to create a login page using Python without >> using a framework? > > Yes. > > But it's a lot of work. You'd effectively be rewriting all > the functionality you'd get for free with a framework. And > it wouldn't be as flexible, because frameworks can flex in > directions that you didn't think of. > >> 2. I haven't worked on web services and don't know the basics of >> web development in Python. > > In that case, your chances of success are fairly slim. > >> 3. If possible, can you provide me an example on how to create a >> login page using Python and achieve the functionality described >> above? > > The frameworks you mentioned earlier come with tutorials. > These tutorials contain such examples. > > You should really use an existing framework. Once you're > aware of how much functionality you get out of a framework > (any of them), you wouldn't dream of rewriting all that > functionality on your own. I totally agree about using a framework. You say you want a 'simple' 3 page website. Why do you think it is simple? You say you don't have any skills at creating websites with python. From your description, you will need to build a directory of entries, a form, and attach it to a database, so that means you also need to understand sql (or something!). You need to display individual records I imagine. Do you need to edit them after they are created? How are you going to manage the accounts? Will you create them? Will you let the visitor create an account? Where will you store the account information? Do different accounts have different permissions? If you install django (for instance), go through the online tutorials in about 2 hours, you could probably build your specification in a day. Even if you have problems there is an active django mailing list to ask specific questions. I haven't tried the other frameworks, but there might be similar help available for them. -- Joel Goldstick
[toc] | [prev] | [next] | [standalone]
| From | Demian Brecht <demianbrecht@gmail.com> |
|---|---|
| Date | 2012-10-05 07:41 -0700 |
| Message-ID | <mailman.1853.1349448101.27098.python-list@python.org> |
| In reply to | #30798 |
On 12-10-05 06:11 AM, Joel Goldstick wrote: > I totally agree about using a framework. You say you want a 'simple' > 3 page website. Why do you think it is simple? You say you don't > have any skills at creating websites with python. From your > description, you will need to build a directory of entries, a form, > and attach it to a database, so that means you also need to understand > sql (or something!). You need to display individual records I imagine. > Do you need to edit them after they are created? How are you going > to manage the accounts? Will you create them? Will you let the > visitor create an account? Where will you store the account > information? Do different accounts have different permissions? > Not to mention security. Frameworks like Django provide protection against things like: * CSRF (Cross Site Request Forgery) * XSS ((X)Cross Site Scripting) * SQL injection As well as others. For a comprehensive list of protection that Django offers, check out https://docs.djangoproject.com/en/dev/topics/security/. -- Demian Brecht @demianbrecht http://demianbrecht.github.com
[toc] | [prev] | [next] | [standalone]
| From | Dennis Lee Bieber <wlfraed@ix.netcom.com> |
|---|---|
| Date | 2012-10-05 14:13 -0400 |
| Message-ID | <mailman.1862.1349460808.27098.python-list@python.org> |
| In reply to | #30784 |
On Fri, 5 Oct 2012 01:03:56 -0700 (PDT), shivakrshn49@gmail.com
declaimed the following in gmane.comp.python.general:
>
> 1. Is it possible to create a login page using Python without using a framework?
>
Sure... After all, those frameworks are written in Python...
> 2. I haven't worked on web services and don't know the basics of web development in Python.
>
That's going to be a problem -- since you'll need to understand HTTP
(at the least) to manage session cookies (since someone not logged in
should not be able to direct access the data pages -- they should be
redirected to the log-in page). THEN you can see about what Python
supplies that may assist you.
> 3. If possible, can you provide me an example on how to create a login page using Python and achieve the functionality described above?
Uh, anyone providing an "example" of a log-in page will have
essentially written the 50% of your assignment (since they may have done
a simple server instance, session cookies, authorization database, etc.)
The regulars in this group normally don't "do homework"; we'll
analyze cryptic error messages from runnable code, but won't provide the
code.
--
Wulfraed Dennis Lee Bieber AF6VN
wlfraed@ix.netcom.com HTTP://wlfraed.home.netcom.com/
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.python
csiph-web