Re: A very basic question with Django

2012-10-10 Thread Sarbjit singh


> Thanks Guys for your valuable answers. As you have pointed out that 
> learning Framework would take time, so i just wanted to be sure that my 
> investment would be worth full. I am learning Python & Django as a hobby 
> but my aim is to make some website dealing with forms and database. So in 
> conclusion, It would be worth spending time on Django.
>

- Sarbjit

 

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/CsJ5yefsg1YJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: A very basic question with Django

2012-10-10 Thread Peter Murphy

On Wednesday, October 10, 2012 3:24:26 PM UTC+10, Sarbjit singh wrote:
>
> First of all, I am very sorry for asking this basic question. I am not 
> sure if this is the right place to put this question but I am very confused.
>
>
Hello, Sarbjit.

 

> I am not having much experience with web development, so i don't know 
> where the Django fits in here. I searched a lot on internet, few forums 
> suggested to use Django for websites and few mentioned that Django is not 
> for web development. So i have couple of basic questions and i want to be 
> sure that i am on right track in learning Django.
>
>
Be careful of forums. On some places, it's the "blind leading the blind".

"Where does Django fit in"? It fits in on the server machine. A HTTP server 
program (like Apache or nginx) takes web page requests, and passes them 
onto Django. In turn, Django interprets the requests, generally running 
queries on the database and doing whatever processing is necessary to 
generate a web page. Django then throws the generated web page to the HTTP 
server, which then sends it back to the web browser.

Django has a development server where you can request and receive pages 
without something like Apache or nginx. But this is not recommended in a 
production environment, because it is a lot slower. Django is used for 
generating content dynamically; but there is no gain in using development 
server to fetch static files (like images).
 

> Q: There are simple websites which just serves static contents and other 
> site which deals with forms and data base. I have once used PHP for form 
> processing and using it with DB. If i have to design such websites using 
> Python, Is Django suitable for the following or there are some other 
> modules which needs to be used.
>
>
If everything is static, then Django is overkill. All you need is your 
favorite HTTP server. But if you are dealing with forms and databases, then 
Django is very, very suitable indeed. There are classes in the framework 
that allow you to create forms on the fly. As for databases, there are also 
classes that allow you to model the database tables and run queries 
_without writing any SQL_.  Do you really want to write your own SQL 
statements? I don't. 

You asked "are there some other modules which needs to be used?" Well, you 
need Python to run it; Django won't work without it. But other "modules" 
you may need are modules written in Python - and they can be installed as 
simply as running "pip install " from the command line.

One of the best things about Django is that a lot of security is built in 
by default. You can write something and be fairly confident that all the 
attack vectors have been blocked off. SQL injections? Not a problem; the 
model classes do all the hard work of passing queries to the database and 
_escaping content_.  Cross Site Request Forgeries? The form classes prevent 
such things occurring.

 

> Q: Is Django a substitute to CGI for dynamic web generation.
>
>
It sounds better than bog standard CGI, where every request spawns a new 
process.  


 

> Q: Can i use Django for development of a full fledged website.
>
>
> Of course you can. 
 
Best regards,
Peter

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/GcI_d9S8bYMJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: A very basic question with Django

2012-10-10 Thread Tim Chase
On 10/10/12 13:29, Tomas Ehrlich wrote:
> If you know what's CGI, feel free to answer the original question:
> "Could Django be deployed using CGI?"

Yes, it can be done[1]. No, it's not usually a good idea.

-tkc


[1]
http://joemaller.com/1467/django-via-cgi-on-shared-hosting/
https://code.djangoproject.com/ticket/2407
https://www.google.com/search?q=deploy+django+cgi



-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: A very basic question with Django

2012-10-10 Thread Kurtis Mullins
On Wed, Oct 10, 2012 at 2:29 PM, Tomas Ehrlich wrote:

> Common guys, this thread isn't about me and CGI :) I really don't care
> what it is and know, when you've just told me what it is I don't care
> even more :)
>
> If you know what's CGI, feel free to answer the original question:
> "Could Django be deployed using CGI?"
>
> Cheers,
>  Tom :)
>

I'm not sure when/where you asked that question. It looked like this thread
was started by Sarbjit who asked three different questions.

To answer your question: Yes, it's possible.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: A very basic question with Django

2012-10-10 Thread Tomas Ehrlich
Common guys, this thread isn't about me and CGI :) I really don't care
what it is and know, when you've just told me what it is I don't care
even more :)

If you know what's CGI, feel free to answer the original question:
"Could Django be deployed using CGI?"

Cheers,
 Tom :)

Dne Wed, 10 Oct 2012 14:11:39 -0400
Dennis Lee Bieber  napsal(a):

> On Tue, 9 Oct 2012 23:09:07 -0700 (PDT), Tomáš Ehrlich
>  declaimed the following in
> gmane.comp.python.django.user:
> 
> > Hello,
> > I wouldn't say that Django is not suitable for web development. Even when 
> > someone says it's not, it's just an opinion, but in general, Django is 
> > framework for web development.
> > 
>   In a way, Django is not useful for anything except web development
> 
> 
>   It's probably not the most suited for a site with 90% of the pages
> static information, being optimized to link pages through to
> live/dynamic database information.
> 
> > 
> > A2: I admit that I don't know exactly what CGI means, but you actually can 
> 
>   Common Gateway Interface: Typically it meant running a whole
> program/script for each request. The start-up time for the Python
> interpreter itself makes pure CGI costly.
> 
> > deploy Django using FastCGI. I'm using WSGI, which is recommended method 
> > right now. Please checkout documentation for more 
> > details https://docs.djangoproject.com/en/1.4/howto/deployment/fastcgi/
> 
>   FastCGI, mod_python, and WSGI all, as I understand them, attempt to
> keep the interpreter and script loaded in a form that allows the server
> to "call" into the application script, rather than start a process from
> scratch.
> 



S pozdravem
  Tomáš Ehrlich

Email:  tomas.ehrl...@gmail.com
Tel:+420 608 219 889
Jabber: elv...@jabber.cz

"Půjdu kamkoliv, pokud je to kupředu." - J. London

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: A very basic question with Django

2012-10-10 Thread Kurtis Mullins
1. Django is perfectly suitable for handling Forms and content stored in a
database. In a low to medium traffic site, serving static content is not a
problem at all. In fact, that's the purpose of a Content Management System.
Many of which have been built on or around Django. If you get to a point
where your site is hitting an *insane* amount of traffic (unlikely,
statistsically speaking), there is at least one project which will take
your Django pages and turn them into static HTML so you can serve them
outside of Django using a very fast web server.

2. As others have said, CGI is simply one method (technically, an interface
standard) to dynamically generate content to be served by Web Servers.
Django would not be a substitute because Django is a Framework for building
Web Applications and CGI is an interface for serving content. However,
Django could be compared to a CGI Application and in that case it would,
basically, be a substitute.

3. Absolutely. Many web sites are built on Django. That's actually the
entire purpose behind it :)

On Wed, Oct 10, 2012 at 1:24 AM, Sarbjit singh wrote:

> First of all, I am very sorry for asking this basic question. I am not
> sure if this is the right place to put this question but I am very confused.
>
> I am not having much experience with web development, so i don't know
> where the Django fits in here. I searched a lot on internet, few forums
> suggested to use Django for websites and few mentioned that Django is not
> for web development. So i have couple of basic questions and i want to be
> sure that i am on right track in learning Django.
>
> Q: There are simple websites which just serves static contents and other
> site which deals with forms and data base. I have once used PHP for form
> processing and using it with DB. If i have to design such websites using
> Python, Is Django suitable for the following or there are some other
> modules which needs to be used.
>
> Q: Is Django a substitute to CGI for dynamic web generation.
>
> Q: Can i use Django for development of a full fledged website.
>
>
>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/django-users/-/ksXPpVuDYSkJ.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: A very basic question with Django

2012-10-10 Thread shmengie
Django is suited well for developing interactive web applications.  It 
provides comprehensive framework with "batteries included."  That means 
once you learn the framework, common and repetitive development tasks are 
simpler.

Being a framework, means your going to need to learn it's scaffolding.  The 
django team has created good documentation, which makes it fairly easy to 
learn and quite usable.

Django is built with Python and uses a lot of Python methodology.  I like 
Python a lot, so that makes it very well suited for me.  

There are several different frameworks, some in Python, some in PHP, 
etc...  None are very simple, because managing states, with stateless web 
browsers is not a simple feat.  Whichever you choose, will likely require a 
substantial time/learning investment.  

If you need to develop complex web application, a framework may reduce 
development time from years to months.  Once you're familiar with the 
framework, the work can be reduced from weeks to days/hours.   

If you need to develop a static web site with an e-mail form, PHP may be 
better suited for the solution.  PHP can do a lot more than that by itself, 
but it quickly becomes difficult to maintain, especially if the task is 
complicated or your application is dynamic.

Frameworks provide a consistent way of repeating tasks.  Django is the 
best, IMO. 

get started: http://docs.djangoproject.com/en/dev/

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/P6pADz8wx1kJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: A very basic question with Django

2012-10-10 Thread Tim Chase
On 10/10/12 01:09, Tomáš Ehrlich wrote:
>> A2: I admit that I don't know exactly what CGI means, but you 
>> actually can deploy Django using FastCGI. I'm using WSGI,
>> which is recommended method right now. Please checkout
>> documentation for more details 
>> https://docs.djangoproject.com/en/1.4/howto/deployment/fastcgi/

CGI is an old-school way of launching web-processing apps.  It spins
up the entire environment on every request.  Normally with WSGI or
FastCGI, the Django process is spun up once and proceeds to handle
multiple requests.  So with CGI, you get much slower response times.

I do remember seeing a "run Django as CGI" patch or module, but it
came with the harsh and explicit warning not to use it in the real
world (where response time and load actually have any sort of
meaning).  It might suffice to deploy on a $3/month host that only
offers CGI, and your site is intended for personal/family use only.
 Otherwise, not a viable option.

-tkc

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: A very basic question with Django

2012-10-09 Thread Tomáš Ehrlich
Ehm, It's not disgus but http://www.disqus.com ;) Sorry...

Dne středa, 10. října 2012 8:09:07 UTC+2 Tomáš Ehrlich napsal(a):
>
> Hello,
> I wouldn't say that Django is not suitable for web development. Even when 
> someone says it's not, it's just an opinion, but in general, Django is 
> framework for web development.
>
> A1: Django has many batteries included. Database access through object 
> relational model and form processing are just two parts from whole bunch. 
> Checkout the documentation for latest stable version of Django 
> https://docs.djangoproject.com/en/1.4/
>
> A2: I admit that I don't know exactly what CGI means, but you actually can 
> deploy Django using FastCGI. I'm using WSGI, which is recommended method 
> right now. Please checkout documentation for more details 
> https://docs.djangoproject.com/en/1.4/howto/deployment/fastcgi/
>
> A3: I believe you can. Do you know pinterest.com, disgus.com, 
> instagram.com? They're all written in Django. Please checkout the 
> homepage of Djangoproject for more https://www.djangoproject.com/ (column 
> Sites using django) or directly http://www.djangosites.com. Some of these 
> sites have source code available.
>
> My conclusion is: Django is suitable for web development. It's a great 
> project with perfect documentation and community. Checkout the tutorial, 
> it's really helpful 
> https://docs.djangoproject.com/en/1.4/intro/tutorial01/
>
> Cheers,
>  Tom
>
> Dne středa, 10. října 2012 7:24:26 UTC+2 Sarbjit singh napsal(a):
>>
>> First of all, I am very sorry for asking this basic question. I am not 
>> sure if this is the right place to put this question but I am very confused.
>>
>> I am not having much experience with web development, so i don't know 
>> where the Django fits in here. I searched a lot on internet, few forums 
>> suggested to use Django for websites and few mentioned that Django is not 
>> for web development. So i have couple of basic questions and i want to be 
>> sure that i am on right track in learning Django.
>>
>> Q: There are simple websites which just serves static contents and other 
>> site which deals with forms and data base. I have once used PHP for form 
>> processing and using it with DB. If i have to design such websites using 
>> Python, Is Django suitable for the following or there are some other 
>> modules which needs to be used.
>>
>> Q: Is Django a substitute to CGI for dynamic web generation.
>>
>> Q: Can i use Django for development of a full fledged website.
>>
>>
>>
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/bF89jeIqADIJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: A very basic question with Django

2012-10-09 Thread Tomáš Ehrlich
Hello,
I wouldn't say that Django is not suitable for web development. Even when 
someone says it's not, it's just an opinion, but in general, Django is 
framework for web development.

A1: Django has many batteries included. Database access through object 
relational model and form processing are just two parts from whole bunch. 
Checkout the documentation for latest stable version of 
Django https://docs.djangoproject.com/en/1.4/

A2: I admit that I don't know exactly what CGI means, but you actually can 
deploy Django using FastCGI. I'm using WSGI, which is recommended method 
right now. Please checkout documentation for more 
details https://docs.djangoproject.com/en/1.4/howto/deployment/fastcgi/

A3: I believe you can. Do you know pinterest.com, disgus.com, 
instagram.com? They're all written in Django. Please checkout the homepage 
of Djangoproject for more https://www.djangoproject.com/ (column Sites 
using django) or directly http://www.djangosites.com. Some of these sites 
have source code available.

My conclusion is: Django is suitable for web development. It's a great 
project with perfect documentation and community. Checkout the tutorial, 
it's really helpful https://docs.djangoproject.com/en/1.4/intro/tutorial01/

Cheers,
 Tom

Dne středa, 10. října 2012 7:24:26 UTC+2 Sarbjit singh napsal(a):
>
> First of all, I am very sorry for asking this basic question. I am not 
> sure if this is the right place to put this question but I am very confused.
>
> I am not having much experience with web development, so i don't know 
> where the Django fits in here. I searched a lot on internet, few forums 
> suggested to use Django for websites and few mentioned that Django is not 
> for web development. So i have couple of basic questions and i want to be 
> sure that i am on right track in learning Django.
>
> Q: There are simple websites which just serves static contents and other 
> site which deals with forms and data base. I have once used PHP for form 
> processing and using it with DB. If i have to design such websites using 
> Python, Is Django suitable for the following or there are some other 
> modules which needs to be used.
>
> Q: Is Django a substitute to CGI for dynamic web generation.
>
> Q: Can i use Django for development of a full fledged website.
>
>
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/ZvNZXaaDuWoJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



A very basic question with Django

2012-10-09 Thread Sarbjit singh
First of all, I am very sorry for asking this basic question. I am not sure 
if this is the right place to put this question but I am very confused.

I am not having much experience with web development, so i don't know where 
the Django fits in here. I searched a lot on internet, few forums suggested 
to use Django for websites and few mentioned that Django is not for web 
development. So i have couple of basic questions and i want to be sure that 
i am on right track in learning Django.

Q: There are simple websites which just serves static contents and other 
site which deals with forms and data base. I have once used PHP for form 
processing and using it with DB. If i have to design such websites using 
Python, Is Django suitable for the following or there are some other 
modules which needs to be used.

Q: Is Django a substitute to CGI for dynamic web generation.

Q: Can i use Django for development of a full fledged website.




-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/ksXPpVuDYSkJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.