Re: learning django and python

2007-11-12 Thread Laszlo Marai

On Mon, 12 Nov 2007 07:35:03 -0800
sebey <[EMAIL PROTECTED]> wrote:

  Hi,

> plus I need to learn it fast as well so I had a look but it looks like
> a lot to go tought thanks thought

diveintopython is actually quite a fast way to learn python. The ToC
looks quite long but the actual pages are very short and clean. You can
read the whole thing in two or three days, maybe less. However you don't
need to know everything to get started with django (or python). You can
use django without learning about SOAP, HTTP based web services (it means
REST in that context I think), XML and HTML processing. Then you can have
a look when you need those.

The django intro documents assume that you already know python so you'll
need to learn that first. But it shouldn't be a problem because you'll
need to know python to build a django app anyway. :)

  Laszlo

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: CSS problem

2007-11-12 Thread Laszlo Marai

On Mon, 12 Nov 2007 14:42:15 -
David <[EMAIL PROTECTED]> wrote:

  Hi,

> On Nov 9, 7:16 pm, David <[EMAIL PROTECTED]> wrote:
> >  I seem to have a similar (stupid) problem, which  I just can't get:
> > (Though it's not the backslashes!)
> >
> > This is from my settings.py:
> > MEDIA_ROOT = 'C:/django/myProject/src/media/'
> > MEDIA_URL = 'http://localhost:8000/media/'
> > ADMIN_MEDIA_PREFIX = '/media/'

I'm very new to django but had the same issue a few weeks ago. The
problem is that all these variables are quite a bit misleading. First if
you serve your (static) media with django then you should leave MEDIA_URL
empty. Then you cannot have the ADMIN_MEDIA_PREFIX the same as the media
prefix for your application (because they both use different
directories). I use /amedia for ADMIN_MEDIA_PREFIX.

> >
> > in my html-template:
> > 
> >
> > in urls.py:
> >  (r'^media/(?P.*)$', 'django.views.static.serve',
> > {'document_root': '/media/'}),

document_root should point to your media directory on the disk (so it
should be C:/django/myProject/src/media/). Maybe you could just use the 
MEDIA_ROOT variable here. (I don't know why we need both. I just wanted
to make my prototype work so I left it this way for know.)

  Laszlo

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: python mvc framework and java mvc framework

2007-10-19 Thread Laszlo Marai

On Sat, 20 Oct 2007 07:40:27 +0530
Kenneth Gonsalves <[EMAIL PROTECTED]> wrote:

> > You can host multiple applications in django but as far as I could see
> > from the mailing list you'll have some problem if you want to have two
> > different django instances running under mod_python.
> 
> not so. There have been reports of over 70 django instances running  
> under mod_python in the same server. I have 12 in one server without  
> problems.

Wasn't there a question here about mod_python a few days ago where the
solution was to configure different interpreters for each django
instances? I might have misunderstood the problem.

  atleta

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: python mvc framework and java mvc framework

2007-10-19 Thread Laszlo Marai

On Sat, 20 Oct 2007 00:53:45 -
Francis <[EMAIL PROTECTED]> wrote:

  Hi,

I'm quite new to django but have a little insight into java.

> On the other hand, java web framework look quite complicated with lot
> of xml and manual configuration with no real advantage. Java verbosity

Well, it depends. There are tons of java frameworks. Some of them need
XML configuration some of them don't but most of them will allow you to
use it. The modern ones will allow you to use annotations which is
quite terse way of expressing configuration. The main difference here is
that django uses 'convention over configuration' while the java
most frameworks don't. Then when you talk about java web frameworks it's
usually really just the web framework without persistence or
authentication, etc. So it's not a full stack. In that world you combine
the components you like into your application while django, as far as I
can see, gives you one option for all of these.

You'll need some XML for the servlet container (web application server)
which you don't really use with django. In the java world you have a
separate server that hosts all of the web applications for a given
machine. Some of them may use one framework some of them may be just
plain servlets. You can deploy them on the same server without any
problem. You can even apply independent pre/post processors (so
called servlet filters). They are like django middlewares (if I got that
right) but they're standard components and can be plugged in
without touching the application. This all needs to be wired together
somehow.

You can host multiple applications in django but as far as I could see
from the mailing list you'll have some problem if you want to have two
different django instances running under mod_python.

So the java solutions need more configuration work but they might be more
flexible in some cases. And don't forget that you're comparing a set of
components (java) against a full stack (django). The configuration work
can be alleviated by pre-assembling a full stack from java components.
There are projects that do just that (e.g. appfuse).

> and static checking may help to find bug earlier than with python.
> Python doesn't force you to include exception, assertion etc.. which
> may lead to spent more time debuging or delevering application that
> broke more often.

It's a matter of taste. I kind of like static type checking some people
don't. I also like having to declare exceptions. There is a more-or-less
valid argument that you have to write unit tests anyway, no matter if
you use a statically or dynamically typed language, and those tests are
supposed to catch (most of the) type errors.

> My question is to someone who actually try both, are they similar in
> productivity and enterprise quality?

For quality you'll need the unit tests. I'm not sure if you need to write
more tests for python to make up for the lack of static type checking or
not. I would think that you should, but I don't have enough experience
yet. But the quality can be assured by good tests and they are needed in
both cases.

I can't really tell anything about the productivity as I'm really slow in
django :) bacause I know very little yet. In java you have to use the
right tools and components to be productive and that's not an easy task.
On the other hand my feeling is that if you know your environment then
there isn't such a big difference between the two. (I know it's quite a
rebell view here :) and I'm actually using django to test this claim.)
Java frameworks have a lot to learn/steal from django to become more
productive. E.g. I don't think that there is any framework out there that
support the generic view concept of django.

If you don't have any background then you'll probably better off starting
with django because it has everything put together.

  atleta

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---