Re: Is Django Right for Me?

2012-05-30 Thread kenneth gonsalves
On Wed, 2012-05-30 at 12:01 -0400, Dennis Lee Bieber wrote:
> > other activities. The supervisor goes to the villages with netbooks.
> If
> > there is connectivity, he enters the data directly to the server on
> the
> > internet. If not, he has a local copy of the site running on his
> netbook
> > with a local copy of the database, synced before he leaves his
> office.
> > So he enters the data on that and later syncs it with the server. It
> is
> > not rocket science to write the scripts for syncing.
> 
> If there is only one "supervisor" doing this, it may not be
> difficult...
> 
> 

that is the use case of the OP - and I do not see a big problem if
multiple people do it. Yet to test it out in practice. After all that is
what a dvcs does.
-- 
regards
Kenneth Gonsalves

-- 
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: Is Django Right for Me?

2012-05-30 Thread kenneth gonsalves
On Wed, 2012-05-30 at 13:58 +0800, 马龙 wrote:
> can you explain your question more clearly ? Djanjo is a *FULL STACK*
> web
> dev framework 

is this addressed to me or to the OP? If it is to me, as an example, I
have a django site that monitors and reports on various construction and
other activities. The supervisor goes to the villages with netbooks. If
there is connectivity, he enters the data directly to the server on the
internet. If not, he has a local copy of the site running on his netbook
with a local copy of the database, synced before he leaves his office.
So he enters the data on that and later syncs it with the server. It is
not rocket science to write the scripts for syncing.
-- 
regards
Kenneth Gonsalves

-- 
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: Is Django Right for Me?

2012-05-30 Thread 马龙
can you explain your question more clearly ? Djanjo is a *FULL STACK* web
dev framework

2012/5/30 kenneth gonsalves 

> On Tue, 2012-05-29 at 09:05 -0500, Javier Guerra Giraldez wrote:
> > On Tue, May 29, 2012 at 7:33 AM, KevinE 
> > wrote:
> > > Just one question - why would django avoid an offline mode - is that
> > a
> > > completely unreasonable/undo-able extension?
> >
> > Django is a web server framework.  when you're offline, you don't have
> > a server.
>
> you can run a webserver on a netbook or laptop and run django too. If
> you use sqllite, it is dead easy to sync your local db with the one on
> the net the moment you get connectivity.
> --
> regards
> Kenneth Gonsalves
>
> --
> 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.
>
>

-- 
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: Is Django Right for Me?

2012-05-29 Thread kenneth gonsalves
On Tue, 2012-05-29 at 09:05 -0500, Javier Guerra Giraldez wrote:
> On Tue, May 29, 2012 at 7:33 AM, KevinE 
> wrote:
> > Just one question - why would django avoid an offline mode - is that
> a
> > completely unreasonable/undo-able extension?
> 
> Django is a web server framework.  when you're offline, you don't have
> a server. 

you can run a webserver on a netbook or laptop and run django too. If
you use sqllite, it is dead easy to sync your local db with the one on
the net the moment you get connectivity.
-- 
regards
Kenneth Gonsalves

-- 
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: Is Django Right for Me?

2012-05-29 Thread Mike Dewhirst

On 29/05/2012 10:33pm, KevinE wrote:
Thanks for all the posts - the more I look the more overwhelming web 
development is getting. Seems every sentence I read requires starting 
another search to found out WTF this term or that term means 
grr


The most important part of the architecture "stack" is the user. It 
seems to me that as you are the problem-domain expert you are far too 
valuable a development resource to waste your time on the 
technicalities. I know you are a savvy user but that might be getting in 
your way at the moment.


In your place, I would look at the smallest possible useful bit of 
software I could (more or less) easily develop myself. The key to 
deciding what to do is identifying the most valuable benefit achievable 
in the shortest timeframe. That instantly eliminates all the big items. 
Then you build it and start getting business value from it. Then you 
open-source it and get a community going.


It would help if you could draw a parallel between your own business 
requirements and the business requirements of software developers so 
that the same app would work for both. That way you get an armchair ride 
and only have to tweak stuff to suit yourself.


Bottom line is that Django will only be an appropriate part of the stack 
for your app if you embrace developers who are comfortable with Django. 
If you are going to do it yourself you need to become comfortable with 
it yourself or use something you know already.


My personal view is that the learning curve for client-side stuff is 
much steeper than Django on the server side. Also from my perspective it 
is a very big ask to cover the entire stack by yourself. Django is very 
nice and you can do most of it yourself if you postpone the really hard 
stuff until you have more experience or at least can specify it exactly.


It looks like a nice app. Good luck.

Mike



Just one question - why would django avoid an offline mode - is that a 
completely unreasonable/undo-able extension? It seems to me that 
smartphones may eventually take over normal computers on the web but 
with the inherent distinction that on a smartphone you are not always 
guaranteed a data connection. I have been looking at all the mobile 
development systems and very few (if any) have really dealt with 
offline mode (not sure how powerful html5 is and whether you could 
support it for a complete database?)


So if I uncouple my client app am I not losing all the advantages of 
using django? Seems to me I will be rewriting alot of my code...

--
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/-/a_3u8sBjLFMJ.

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: Is Django Right for Me?

2012-05-29 Thread Marcin Tustin
Django makes up one part of the web stack: the application server. It
doesn't have a robust webserver. It doesn't have its own database.
Likewise, it doesn't have its own client-side application toolkit.

On Tue, May 29, 2012 at 1:33 PM, KevinE wrote:

> Thanks for all the posts - the more I look the more overwhelming web
> development is getting. Seems every sentence I read requires starting
> another search to found out WTF this term or that term means grr
>
> Just one question - why would django avoid an offline mode - is that a
> completely unreasonable/undo-able extension? It seems to me that
> smartphones may eventually take over normal computers on the web but with
> the inherent distinction that on a smartphone you are not always guaranteed
> a data connection. I have been looking at all the mobile development
> systems and very few (if any) have really dealt with offline mode (not sure
> how powerful html5 is and whether you could support it for a complete
> database?)
>
> So if I uncouple my client app am I not losing all the advantages of using
> django? Seems to me I will be rewriting alot of my code...
>
> --
> 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/-/a_3u8sBjLFMJ.
>
> 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.
>



-- 
Marcin Tustin
Tel: 07773 787 105

-- 
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: Is Django Right for Me?

2012-05-29 Thread Javier Guerra Giraldez
On Tue, May 29, 2012 at 7:33 AM, KevinE  wrote:
> Just one question - why would django avoid an offline mode - is that a
> completely unreasonable/undo-able extension?

Django is a web server framework.  when you're offline, you don't have a server.

> It seems to me that smartphones
> may eventually take over normal computers on the web but with
> the inherent distinction that on a smartphone you are not always guaranteed
> a data connection.

smartphones are clients, Django isn't supposed to work there.  there
are plenty of smartphone frameworks, those that are web-oriented
usually work with any server-side framework, typically by some REST
interface.  some of them also help with the offline problem.  (i
haven't use any of them yet, but it's a recurring theme in their
websites)

-- 
Javier

-- 
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: Is Django Right for Me?

2012-05-29 Thread Carsten Agger

Den 29-05-2012 14:33, KevinE skrev:
Just one question - why would django avoid an offline mode - is that a 
completely unreasonable/undo-able extension? It seems to me that 
smartphones may eventually take over normal computers on the web but 
with the inherent distinction that on a smartphone you are not always 
guaranteed a data connection. I have been looking at all the mobile 
development systems and very few (if any) have really dealt with 
offline mode (not sure how powerful html5 is and whether you could 
support it for a complete database?)


So if I uncouple my client app am I not losing all the advantages of 
using django? Seems to me I will be rewriting alot of my code...




Django is inherently a Web application framework. You could build 
off-line applications to be used by one person with no connection to the 
Internet, but the easiest way to do that would probably be to set up a 
local Web server, e.g. an Apache server. So it would be online, but it 
would still be "Web".


--
Carsten Agger
Magenta ApS
Åbogade 15
8200 Århus N

Tlf +45 5060 1269
Mob +45 2086 5010
http://www.magenta-aps.dk
carst...@magenta-aps.dk

--
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: Is Django Right for Me?

2012-05-29 Thread KevinE
Thanks for all the posts - the more I look the more overwhelming web 
development is getting. Seems every sentence I read requires starting 
another search to found out WTF this term or that term means grr

Just one question - why would django avoid an offline mode - is that a 
completely unreasonable/undo-able extension? It seems to me that 
smartphones may eventually take over normal computers on the web but with 
the inherent distinction that on a smartphone you are not always guaranteed 
a data connection. I have been looking at all the mobile development 
systems and very few (if any) have really dealt with offline mode (not sure 
how powerful html5 is and whether you could support it for a complete 
database?) 

So if I uncouple my client app am I not losing all the advantages of using 
django? Seems to me I will be rewriting alot of my code...

-- 
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/-/a_3u8sBjLFMJ.
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: Is Django Right for Me?

2012-05-28 Thread yati sagade
Hi
As per a previous answer, Django is a server side framework, and should
handle most of your use cases. But you're on your own with the offline
caching thing. You have to build some logic in the client side of the app.
If I were you, I would have created a RESTful API using django-piston (a
Django app to easily create RESTful APIs). Then, my server side interface
would essentially be technology agnostic. On typical web clients like a
browser, you could use HTML5 offine storage capabilities( a new feature)
and AJAX to accomplish your task. Then from a tablet app, also, you can
make requests to these REST endpoints you created to push the data to the
server, and  offline storage for this type of a client should be easy to
get I guess(I have no Android experience). This design will make your app
very loosely coupled and highly flexible. Also, do share with us whatever
you end up creating(as long as it is not Flash :P).

Cheers!

On Mon, May 28, 2012 at 9:45 AM, ivan sugiarto wrote:

> furthermore if you want to integrate Django, Tablet and PC you should make
> Django webservice (either using Json or XML), after that you must create
> Tablet and PC application that fetch django webservice.
>
> So the rough architecture would be :
>
> Web Apps (ie Django, PHP or Java) --->create Web Service (XML or JSON)
> ---> Fetched by (using either GET or POST method) Android or PC apps
>
> the android or pc apps must use database to store data for offline use, I
> recommend sqlite http://www.sqlite.org/, i have used it in numerous apps
> and it runs smoothly :)
>
> PS sorry of my bad english
>
>
> On Mon, May 28, 2012 at 6:45 AM, Russell Keith-Magee <
> russ...@keith-magee.com> wrote:
>
>> On Mon, May 28, 2012 at 12:28 AM, KevinE 
>> wrote:
>> > Not a web developer but have a bit of software savy and looking to
>> develop a
>> > custom app for use in my business which is consulting engineering. I
>> want to
>> > develop application that helps me in documenting inspections I make on a
>> > jobsite. Basicly what happens is I would go out with a tablet and use my
>> > webapp to collect and document construction progress mainly to document
>> > construction deficiencies and monitor progress of construction. From the
>> > data collected on the job site I would push this data through a
>> reporting
>> > engine to prepare a pdf style site review report which would get
>> emailed to
>> > the project architect, all the consultants, owner and contractor - the
>> > intent is to have this happen while on the job site. On the office side
>> I
>> > want to develop a basic project based document management system where
>> I can
>> > document when field reviews were conducted, summarize deficiencies and
>> also
>> > ensure that deficiencies are completed and signed off on (as the
>> engineer I
>> > take legal responsibility for all the deficiencies). I also want to be
>> able
>> > to manage all my projects find projects by client, owner, architect etc.
>> >
>> > By the looks of it Django should be able to do all this but the one
>> issue
>> > that I am unsure about is an offline mode. The idea is to have a tablet
>> with
>> > a data connection but if there is no data connection I still need to
>> > complete the forms and cache the data until it can be sync'd later on.
>> From
>> > what I have read, data syncing can get a bit knarly, something I don't
>> want
>> > to get into myself.
>> >
>> > I envision a custom android app for the tablet - for this I need access
>> to
>> > the GPS and camera (my ultra cool feature will be my tablet
>> automatically
>> > pulling up a project page as I drive up to the job site based on the GPS
>> > coordinates!). Will this be a web page or will it be an actual app?
>> >
>> > Guess I am looking for some basic advice on how to architect this with
>> the
>> > above issues in mind.
>>
>> From what you've described, Django will certainly be able to help out
>> here. However, you're going to need to combine Django with some other
>> tools to solve all your problems.
>>
>> Django is a server-side framework -- that is, it deals with the
>> database and web server that doles out content to whatever client asks
>> for it -- be it web browser, mobile app, or whatever. In terms of your
>> problem, that means that Django will be able to provide the interface
>> by which data is submitted to the server, store the data that is
>> collected, and provide a web presence to serve that data back to
>> users. Django doesn't have any built-in PDF generation capability, but
>> there are a lot of Python libraries that can be used to generate PDFs,
>> and it's easy to use Django to extract data and feed it into a PDF
>> generator. Django's documentation contains some simple examples of how
>> this can be done. [1]
>>
>> [1] https://docs.djangoproject.com/en/1.4/howto/outputting-pdf/
>>
>> So - Django will be great on the server side. However, the bigger part
>> of your 

Re: Is Django Right for Me?

2012-05-27 Thread ivan sugiarto
furthermore if you want to integrate Django, Tablet and PC you should make
Django webservice (either using Json or XML), after that you must create
Tablet and PC application that fetch django webservice.

So the rough architecture would be :

Web Apps (ie Django, PHP or Java) --->create Web Service (XML or JSON) --->
Fetched by (using either GET or POST method) Android or PC apps

the android or pc apps must use database to store data for offline use, I
recommend sqlite http://www.sqlite.org/, i have used it in numerous apps
and it runs smoothly :)

PS sorry of my bad english

On Mon, May 28, 2012 at 6:45 AM, Russell Keith-Magee <
russ...@keith-magee.com> wrote:

> On Mon, May 28, 2012 at 12:28 AM, KevinE 
> wrote:
> > Not a web developer but have a bit of software savy and looking to
> develop a
> > custom app for use in my business which is consulting engineering. I
> want to
> > develop application that helps me in documenting inspections I make on a
> > jobsite. Basicly what happens is I would go out with a tablet and use my
> > webapp to collect and document construction progress mainly to document
> > construction deficiencies and monitor progress of construction. From the
> > data collected on the job site I would push this data through a reporting
> > engine to prepare a pdf style site review report which would get emailed
> to
> > the project architect, all the consultants, owner and contractor - the
> > intent is to have this happen while on the job site. On the office side I
> > want to develop a basic project based document management system where I
> can
> > document when field reviews were conducted, summarize deficiencies and
> also
> > ensure that deficiencies are completed and signed off on (as the
> engineer I
> > take legal responsibility for all the deficiencies). I also want to be
> able
> > to manage all my projects find projects by client, owner, architect etc.
> >
> > By the looks of it Django should be able to do all this but the one issue
> > that I am unsure about is an offline mode. The idea is to have a tablet
> with
> > a data connection but if there is no data connection I still need to
> > complete the forms and cache the data until it can be sync'd later on.
> From
> > what I have read, data syncing can get a bit knarly, something I don't
> want
> > to get into myself.
> >
> > I envision a custom android app for the tablet - for this I need access
> to
> > the GPS and camera (my ultra cool feature will be my tablet automatically
> > pulling up a project page as I drive up to the job site based on the GPS
> > coordinates!). Will this be a web page or will it be an actual app?
> >
> > Guess I am looking for some basic advice on how to architect this with
> the
> > above issues in mind.
>
> From what you've described, Django will certainly be able to help out
> here. However, you're going to need to combine Django with some other
> tools to solve all your problems.
>
> Django is a server-side framework -- that is, it deals with the
> database and web server that doles out content to whatever client asks
> for it -- be it web browser, mobile app, or whatever. In terms of your
> problem, that means that Django will be able to provide the interface
> by which data is submitted to the server, store the data that is
> collected, and provide a web presence to serve that data back to
> users. Django doesn't have any built-in PDF generation capability, but
> there are a lot of Python libraries that can be used to generate PDFs,
> and it's easy to use Django to extract data and feed it into a PDF
> generator. Django's documentation contains some simple examples of how
> this can be done. [1]
>
> [1] https://docs.djangoproject.com/en/1.4/howto/outputting-pdf/
>
> So - Django will be great on the server side. However, the bigger part
> of your problem is the client side, and that's an area where Django
> has deliberately avoided offering a solution, so you'll need to
> combine Django with some client-side tools that are able to:
>
>  * Provide access to the camera and geolocation features of the device
> you're on
>  * Store data on the device while there is no live access to the server
>  * Cache updates on the mobile device while offline for delivery when
> it comes back online.
>  * If necessary, synchronize updates made on the mobile device with
> updates on the server
>
> Features like geolocation and offline access can be implemented in
> native HTML5 without the need to build an app at all; see
> http://html5demos.com for some examples of the cool things you can do
> on webpages with a modern browser. You can also use a HTML5-based
> development approach embedded in a native app container; for example,
> tools like Phonegap [2] and Appcelerator [3] are designed to help out
> here.
>
> [2] http://phonegap.com/
> [3] http://www.appcelerator.com/
>
> I can't say I know of any libraries that can be used to address the
> synchronisation problem -- but 

Re: Is Django Right for Me?

2012-05-27 Thread Russell Keith-Magee
On Mon, May 28, 2012 at 12:28 AM, KevinE  wrote:
> Not a web developer but have a bit of software savy and looking to develop a
> custom app for use in my business which is consulting engineering. I want to
> develop application that helps me in documenting inspections I make on a
> jobsite. Basicly what happens is I would go out with a tablet and use my
> webapp to collect and document construction progress mainly to document
> construction deficiencies and monitor progress of construction. From the
> data collected on the job site I would push this data through a reporting
> engine to prepare a pdf style site review report which would get emailed to
> the project architect, all the consultants, owner and contractor - the
> intent is to have this happen while on the job site. On the office side I
> want to develop a basic project based document management system where I can
> document when field reviews were conducted, summarize deficiencies and also
> ensure that deficiencies are completed and signed off on (as the engineer I
> take legal responsibility for all the deficiencies). I also want to be able
> to manage all my projects find projects by client, owner, architect etc.
>
> By the looks of it Django should be able to do all this but the one issue
> that I am unsure about is an offline mode. The idea is to have a tablet with
> a data connection but if there is no data connection I still need to
> complete the forms and cache the data until it can be sync'd later on. From
> what I have read, data syncing can get a bit knarly, something I don't want
> to get into myself.
>
> I envision a custom android app for the tablet - for this I need access to
> the GPS and camera (my ultra cool feature will be my tablet automatically
> pulling up a project page as I drive up to the job site based on the GPS
> coordinates!). Will this be a web page or will it be an actual app?
>
> Guess I am looking for some basic advice on how to architect this with the
> above issues in mind.

>From what you've described, Django will certainly be able to help out
here. However, you're going to need to combine Django with some other
tools to solve all your problems.

Django is a server-side framework -- that is, it deals with the
database and web server that doles out content to whatever client asks
for it -- be it web browser, mobile app, or whatever. In terms of your
problem, that means that Django will be able to provide the interface
by which data is submitted to the server, store the data that is
collected, and provide a web presence to serve that data back to
users. Django doesn't have any built-in PDF generation capability, but
there are a lot of Python libraries that can be used to generate PDFs,
and it's easy to use Django to extract data and feed it into a PDF
generator. Django's documentation contains some simple examples of how
this can be done. [1]

[1] https://docs.djangoproject.com/en/1.4/howto/outputting-pdf/

So - Django will be great on the server side. However, the bigger part
of your problem is the client side, and that's an area where Django
has deliberately avoided offering a solution, so you'll need to
combine Django with some client-side tools that are able to:

 * Provide access to the camera and geolocation features of the device you're on
 * Store data on the device while there is no live access to the server
 * Cache updates on the mobile device while offline for delivery when
it comes back online.
 * If necessary, synchronize updates made on the mobile device with
updates on the server

Features like geolocation and offline access can be implemented in
native HTML5 without the need to build an app at all; see
http://html5demos.com for some examples of the cool things you can do
on webpages with a modern browser. You can also use a HTML5-based
development approach embedded in a native app container; for example,
tools like Phonegap [2] and Appcelerator [3] are designed to help out
here.

[2] http://phonegap.com/
[3] http://www.appcelerator.com/

I can't say I know of any libraries that can be used to address the
synchronisation problem -- but then, I haven't really been looking for
one either. It wouldn't surprise me if there is something out there
that you could use, but if it does, it's got very little to do with
the Django side of the fence -- all Django cares about is that you're
using HTTP to communicate with the server.

So - in summary:
 * Yes, Django could be a useful part of your tech stack to do what
you're describing
 * However, it won't solve the problem on it's own -- you'll need to
pick a client side framework too.

Yours,
Russ Magee %-)

-- 
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 

Re: Is Django right for me?

2009-03-31 Thread Dotan Cohen

> Django uses an ORM - so you don't (usually) need to query the database
> directly.
> Why don't you go through the Django tutorial and try it out?
> http://docs.djangoproject.com/en/dev/#first-steps

Thanks, I just finished that before I read your post!

-- 
Dotan Cohen

http://what-is-what.com
http://gibberish.co.il

--~--~-~--~~~---~--~~
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: Is Django right for me?

2009-03-31 Thread Dougal Matthews
Django uses an ORM - so you don't (usually) need to query the database
directly.
Why don't you go through the Django tutorial and try it out?

http://docs.djangoproject.com/en/dev/#first-steps

Dougal


---
Dougal Matthews - @d0ugal
http://www.dougalmatthews.com/



2009/3/31 Dotan Cohen 

>
> > You might want to look at the Django templating system. It's far more
> > powerful and flexible than using a simple PHP script and including other
> > files.
> > Django wouldn't be overkill - it would make all of the features you
> > mentioned really easy as it does them out of the box. Allowing you to
> spend
> > all your time working on the website itself rather than repeating (or
> self
> > maintaining) the building blocks.
> > I moved over from PHP and haven't looked back.
> > Dougal
> >
>
> Actually, I do want to build and maintain the building blocks! That is
> my reason for moving the sites to Python, to increase my knowledge of
> the language.
>
> I have tried googling for examples of MySQL database interaction with
> Django and with Python, but I couldn't really find anything that would
> give me an idea of what I'm getting into. In PHP, I simply connect to
> the database, declare UTF-8, then make a query. Each step is done in a
> line of code or three. This seems to be in line with both Python and
> Django. However, in PHP there are many rich functions for manipulating
> the data returned from the query. Python does not seems to have
> functions meant for manipulating returned queries, and I could not
> find any mention of whether or not Django does. I did find MySQLdb on
> the Django site which seems to apply to Python as well, but I'm not
> really sure what it helps with.
>
> --
> Dotan Cohen
>
> http://what-is-what.com
> http://gibberish.co.il
>
> >
>

--~--~-~--~~~---~--~~
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: Is Django right for me?

2009-03-31 Thread Dotan Cohen

> Yup. The ORM goes out of its way to make safe strings. You can circumvent it
> but that's naturally on your head. The Form classes also go a long way to do
> the same. Forms go some distance further to make validation really simple
> too.
>

Interesting, thanks. I did not know what ORM means but it seems to be
some abstraction layer between the DB and the code, quite nice for not
worrying about sanitation.

> And you say you're not interested in Templating, but you will be once you've
> used it a few times.
>

I can be led astray :)

> Okay for this bit, I have three models in play. User (built into Django),
> UserProfile (an extension of User, locked in with a foreign key) and
> Company, referred to by UserProfile. In real DB terms there are 4 tables
> there.
>
> Say I want to list users that are part of a given company. Easy:
>
>     users = [u.user for u in UserProfile.objects.filter(company=company)]
>

So that's done right on the database abstraction layer? No SQL?

>
> How about I want to filter another Model that has an FK on User, again,
> given a company? Still super easy:
>
>     data = AnotherModel.objects.filter(user__in = [u.user for u in
> UserProfile.objects.filter(company=company)])
>
>
> How about dynamic sorting? Here's how I exposed table-header based sorting
> so you can sort by a named column and specify an order, with defaults if
> nothing is specified:
>
>     data = data.order_by('%s%s' % (request.GET.get('order', '-'),
> request.GET.get('orderby', 'when')))
>

I don't think that it is safe to pass from the querystring directly
into the database like that, unless there is some serious sanitation
going on. I'd be wary, though. However, I get the point of the code
and it does look tidy, though as I already know SQL I would probably
prefer to query the DB directly.

> These sorts of things can be nauseating to implment. They're usually easy
> but time consuming. Now they're just easy.
>

:)

> To find out how it'll effect you though, you just need to get stuck in.
>

Naturally, but I wanted to get an idea if Django is right for me first.

Actually, it looks like I will start with just Python in the beginning
and I will convince myself to move to Django after I fall into a
gotcha or two.

I appreciate the time and advice!

-- 
Dotan Cohen

http://what-is-what.com
http://gibberish.co.il

--~--~-~--~~~---~--~~
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: Is Django right for me?

2009-03-31 Thread Dotan Cohen

> Django has really great documentation
> http://docs.djangoproject.com/en/dev/
>
> There is a tutorial to get a feeling for the framework
>

Thanks, I went through the docs briefly but I have yet to follow the
tutorial. I will do that.

-- 
Dotan Cohen

http://what-is-what.com
http://gibberish.co.il

--~--~-~--~~~---~--~~
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: Is Django right for me?

2009-03-31 Thread Oli Warner
On Tue, Mar 31, 2009 at 12:35 PM, Dotan Cohen  wrote:

>
> > Dotan, I think once you've got your head around some of the key concepts
> > (urls, models, template inheritance and forms) and have a first site set
> up,
> > you'll never ever look back.
> >
>
> Again, I am not interested in the templating but rather I would like
> to know what other features Django offers the web developer. I want to
> maintain control of the output, as my intention is to learn Python in
> a general sense. However, I do not want to reinvent security-related
> wheels such as sanitizing user input before sending to database, and
> such. Does Django offer this?


Yup. The ORM goes out of its way to make safe strings. You can circumvent it
but that's naturally on your head. The Form classes also go a long way to do
the same. Forms go some distance further to make validation really simple
too.

And you say you're not interested in Templating, but you will be once you've
used it a few times.


> > The Python is the easy bit. It mostly "just makes sense" until you see
> the
> > crazy-short ways of doing really quite complicated, cross entity data
> > filtering in a single line. And by that time you're hooked anyway ;)
> >
>
>
> Can you save me some googling and provide a link? While the Django
> community is growing, I am not having much luck finding real world
> code examples.


Okay for this bit, I have three models in play. User (built into Django),
UserProfile (an extension of User, locked in with a foreign key) and
Company, referred to by UserProfile. In real DB terms there are 4 tables
there.

Say I want to list users that are part of a given company. Easy:

users = [u.user for u in UserProfile.objects.filter(company=company)]


How about I want to filter another Model that has an FK on User, again,
given a company? Still super easy:

data = AnotherModel.objects.filter(user__in = [u.user for u in
UserProfile.objects.filter(company=company)])


How about dynamic sorting? Here's how I exposed table-header based sorting
so you can sort by a named column and specify an order, with defaults if
nothing is specified:

data = data.order_by('%s%s' % (request.GET.get('order', '-'),
request.GET.get('orderby', 'when')))


These sorts of things can be nauseating to implment. They're usually easy
but time consuming. Now they're just easy.

To find out how it'll effect you though, you just need to get stuck in.

--~--~-~--~~~---~--~~
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: Is Django right for me?

2009-03-31 Thread Brot

Django has really great documentation
http://docs.djangoproject.com/en/dev/

There is a tutorial to get a feeling for the framework

On Mar 31, 1:35 pm, Dotan Cohen  wrote:
> > Dotan, I think once you've got your head around some of the key concepts
> > (urls, models, template inheritance and forms) and have a first site set up,
> > you'll never ever look back.
>
> Again, I am not interested in the templating but rather I would like
> to know what other features Django offers the web developer. I want to
> maintain control of the output, as my intention is to learn Python in
> a general sense. However, I do not want to reinvent security-related
> wheels such as sanitizing user input before sending to database, and
> such. Does Django offer this?
>
> > The Python is the easy bit. It mostly "just makes sense" until you see the
> > crazy-short ways of doing really quite complicated, cross entity data
> > filtering in a single line. And by that time you're hooked anyway ;)
>
> Can you save me some googling and provide a link? While the Django
> community is growing, I am not having much luck finding real world
> code examples.
>
> --
> Dotan Cohen
>
> http://what-is-what.comhttp://gibberish.co.il
--~--~-~--~~~---~--~~
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: Is Django right for me?

2009-03-31 Thread Dotan Cohen

> Dotan, I think once you've got your head around some of the key concepts
> (urls, models, template inheritance and forms) and have a first site set up,
> you'll never ever look back.
>

Again, I am not interested in the templating but rather I would like
to know what other features Django offers the web developer. I want to
maintain control of the output, as my intention is to learn Python in
a general sense. However, I do not want to reinvent security-related
wheels such as sanitizing user input before sending to database, and
such. Does Django offer this?

> The Python is the easy bit. It mostly "just makes sense" until you see the
> crazy-short ways of doing really quite complicated, cross entity data
> filtering in a single line. And by that time you're hooked anyway ;)
>

Can you save me some googling and provide a link? While the Django
community is growing, I am not having much luck finding real world
code examples.

-- 
Dotan Cohen

http://what-is-what.com
http://gibberish.co.il

--~--~-~--~~~---~--~~
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: Is Django right for me?

2009-03-31 Thread Dotan Cohen

> django would be a perfect fit as it's templates with inheritance would 
> automate
> your site and it's ORM would automate your database access too. btw, last I
> heard, Qt uses C++.

There are Qt bindings for Python as well. And I find Python's learning
curve to be more in step with my hobbist nature, and not that as a
programmer.

-- 
Dotan Cohen

http://what-is-what.com
http://gibberish.co.il

--~--~-~--~~~---~--~~
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: Is Django right for me?

2009-03-31 Thread Dotan Cohen

> You might want to look at the Django templating system. It's far more
> powerful and flexible than using a simple PHP script and including other
> files.
> Django wouldn't be overkill - it would make all of the features you
> mentioned really easy as it does them out of the box. Allowing you to spend
> all your time working on the website itself rather than repeating (or self
> maintaining) the building blocks.
> I moved over from PHP and haven't looked back.
> Dougal
>

Actually, I do want to build and maintain the building blocks! That is
my reason for moving the sites to Python, to increase my knowledge of
the language.

I have tried googling for examples of MySQL database interaction with
Django and with Python, but I couldn't really find anything that would
give me an idea of what I'm getting into. In PHP, I simply connect to
the database, declare UTF-8, then make a query. Each step is done in a
line of code or three. This seems to be in line with both Python and
Django. However, in PHP there are many rich functions for manipulating
the data returned from the query. Python does not seems to have
functions meant for manipulating returned queries, and I could not
find any mention of whether or not Django does. I did find MySQLdb on
the Django site which seems to apply to Python as well, but I'm not
really sure what it helps with.

-- 
Dotan Cohen

http://what-is-what.com
http://gibberish.co.il

--~--~-~--~~~---~--~~
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: Is Django right for me?

2009-03-31 Thread Oli Warner
Dotan, I think once you've got your head around some of the key concepts
(urls, models, template inheritance and forms) and have a first site set up,
you'll never ever look back.

The Python is the easy bit. It mostly "just makes sense" until you see the
crazy-short ways of doing really quite complicated, cross entity data
filtering in a single line. And by that time you're hooked anyway ;)


> btw, last I heard, Qt uses C++.
>

Its Python bindings work just fine.

--~--~-~--~~~---~--~~
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: Is Django right for me?

2009-03-31 Thread Kenneth Gonsalves

On Tuesday 31 March 2009 16:05:42 Dotan Cohen wrote:
> Would Django be overkill for this type of website? Is there a better
> alternative? One of my goals in switching to Python is to broaden my
> exposure to the language as I intend to move into developing Qt
> applications soon.

django would be a perfect fit as it's templates with inheritance would automate 
your site and it's ORM would automate your database access too. btw, last I 
heard, Qt uses C++.
-- 
regards
kg
http://lawgon.livejournal.com

--~--~-~--~~~---~--~~
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: Is Django right for me?

2009-03-31 Thread Dougal Matthews
You might want to look at the Django templating system. It's far more
powerful and flexible than using a simple PHP script and including other
files.
Django wouldn't be overkill - it would make all of the features you
mentioned really easy as it does them out of the box. Allowing you to spend
all your time working on the website itself rather than repeating (or self
maintaining) the building blocks.

I moved over from PHP and haven't looked back.

Dougal


---
Dougal Matthews - @d0ugal
http://www.dougalmatthews.com/



2009/3/31 Dotan Cohen 

>
> I have been writing websites as a hobby in PHP for a few years, but I
> want to switch to Python for various reasons. I have been advised to
> look into Django, but I am not sure that it fits my needs. My sites
> are mostly static HTML, generated from a header.inc and footer.inc
> file with code like $title and the page including that
> sets the $title variable before calling the include. This way, I don't
> have to code the website design into each page, and I can make changes
> to just the include files to be propogated across the site. I also
> have some pages the interact with a MySQL database, and I parse the
> query string extensively in those situations to keep friendly urls.
> See my photo gallery, for instance, which is all database driven, but
> has nice urls for all pages:
> http://dotancohen.com/eng/pictures/index.html
>
> Would Django be overkill for this type of website? Is there a better
> alternative? One of my goals in switching to Python is to broaden my
> exposure to the language as I intend to move into developing Qt
> applications soon.
>
> Thanks for any and all advice.
>
> --
> Dotan Cohen
>
> http://what-is-what.com
> http://gibberish.co.il
>
> >
>

--~--~-~--~~~---~--~~
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: Is Django right now me?

2005-12-27 Thread oggie rob

Tom Tobin wrote:
> I don't know; I couldn't tell which of the dozen of your (accidentally, I 
> assume) copy-and-pasted sections of your email to read.  :-p

Then the answer is obvious - since the post is so obviously distinct
from DRY, Django is not the right solution!

Next?