Re: Should we have a database independent SQL like query language in Django?

2012-10-06 Thread Jeremy Sandell
On Sat, Oct 6, 2012 at 10:38 AM, Yugal Jindle  wrote:

> *Note :*
>
>  - I know we have `Django ORM` already that keeps things database
> independent and converts to the database specific `SQL` queries.
>  - Once things starts getting complicated it is preferred to write `raw
> SQL` queries for better efficiency.
>  - When you write `raw sql` queries your code gets trapped with the
> database you are using.
>  - I also understand its important to use the full power of your database
> that can-not be achieved with the `django orm` alone.
>
> *My Question :*
>
>  - Until I use any database specific feature, why should one be trapped
> with the database.
>  - For instance :
>
> We have a query with multiple joins and we decided to write a raw sql
>> query. Now, that makes my website `postgres` specific. Even when I
>> have not used any postgres specific feature.
>
>
> I feel there should be some `fake sql` language which can translate to any
> database's sql query. Even Django's ORM can be built over it. So, that if
> you go out of ORM but not database specific - you can still remain database
> independent.
>
> I asked the same question to `Jacob Kaplan Moss` (In person) :
>
>  - He advised me to stay with the database that I like and endure its
> whole power, to which I agree. But my point was not that we should be
> `database independent`.
>  - My point is we should be database independent until we use a database
> specific feature.
>
> *
> *
> *Please explain, why should be there a `fake sql` layer over the actual
> sql ?*
>
>

If it helps, there's already a database independent 'fake sql' package
available for Python - it's called SQLAlchemy. Granted, it's not "built in"
to Django, as in being tightly coupled with the admin interface like
Django's ORM, but it certainly can be (and has been) used for what you're
describing.

-- 
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: how to run a given project

2010-03-16 Thread Jeremy Sandell
On Mar 16, 4:58 am, hk  wrote:
> hi
>
> Ive just started experiencing DJango i am an undergrad student i was
> given a Django project on which to extend functionality but after
> installing all the necessary apps for it but  i cant seem to run it
> i get "Database wit does not exist " (wit is the database for this
> proj but i dont if i should make it in postrgres or ??,i tries making
> it and then i got other errors)
> im working in Linux
>
> im sure there is a simple way and that im just overcomplicating things
> What can i do to run this project?
>
> kind regards
> hk

Hi,

Is PostGIS already set up on that server? If so, verify that the
table was created from the template_postgis template.

   Just a wild guess. Hope it helps.  :D

Jeremy

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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: How to make django use a different python interpreter located at some random location.

2010-03-11 Thread Jeremy Sandell
On Mar 10, 11:41 pm, Abhinov  wrote:
> Hi All,
>
> How to make my django use a different python interpreter located at
> some random location ?
> Any help will be of great help.
>
> Regards,
> Abhinov

I'll second Bjunix's recommendation of checking out virtualenv. It
will probably do what you need, and it's a far cleaner solution than
manually putting the path to your random interpreter in manage.py. The
latter works for FastCGI, but it's quite ugly.

Jeremy

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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: Django Equivalent to Rails Rumble

2008-10-25 Thread Jeremy Sandell

On Oct 25, 11:45 am, "Keyton Weissinger" <[EMAIL PROTECTED]> wrote:
> Hello everyone!
>
> Long time listener. First time caller
>
> Is there an equivalent to the Rails Rumble for the Django community?
> Shouldn't there be one? What do you think?
>
> Keyton


Having just googled it, I personally haven't seen an equivalent for
Django. That said, there's nothing stopping you (or anyone else) from
throwing it together and hosting one yourself.

To save everyone else from having to look it up, from a quick glance
it appears to be a (yearly?) contest where each contestant has 48
hours to build an application; the submissions are voted on by
registered users (kind of like Cheese Rater). 5 voters are randomly
selected to win $25.00 Amazon gift cards, and various winners are
given prizes which are supplied by sponsors.

It does look like a neat idea.

Jeremy
--~--~-~--~~~---~--~~
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: Boosting your productivity when debugging Django apps

2008-10-06 Thread Jeremy Sandell

winpdb has been a life saver for me, as well. I had been using pyDev +
Eclipse (for the debugger), with the viPlugin (for my sanity). The
amount of ram used just to fire up the debugger made me want to cry.

winpdb + vim (with Python bindings) solved that issue very nicely. I
can code on my old Vaio again. (:

I would also suggest checking out the Django Debug Toolbar ;
it's not the same as stepping through breakpoints, but it's saved me a
lot of "print" and "assert False" iterations.


On Aug 22, 4:08 pm, Rajesh Dhawan <[EMAIL PROTECTED]> wrote:
> Hi,
>
> > I'm new to both Python and Django, and right now I feel horribly
> > unproductive without an efficient way to debug things.
>
> Tryhttp://winpdb.org/-- although it's called WinPDB, it's a platform
> independent Python GUI debugger.
>
> -Rajesh D
--~--~-~--~~~---~--~~
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: actual django stack

2008-09-27 Thread Jeremy Sandell


On Sep 26, 1:25 pm, David Zhou <[EMAIL PROTECTED]> wrote:
>
> I've also heard good things about WSGI -- though I haven't heavily  
> tested its stability compared to, say, mod_python.
> ---
> David Zhou
> [EMAIL PROTECTED]

FWIW, WSGI has thus far worked wonderfully for me, and using daemon
mode has solved numerous issues of running Django in a shared hosting
environment. Being able to simply "touch /path/to/project/django.wsgi"
instead of restarting Apache is a nice bonus, as well. (:
--~--~-~--~~~---~--~~
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: Just learning the ropes with Django and authentication

2008-04-01 Thread Jeremy Sandell

Probably the best way to understand how it works is to check the
source. under django/contrib/admin/views/decorators.py is the view
(_display_login_form), and under django/contrib/admin/templates/admin/
login.html is the form itself.

I'd also suggest looking at django/contrib/auth/ for futher insight as
to what's going on there.

Hope this helps.

On Mar 31, 11:26 pm, James <[EMAIL PROTECTED]> wrote:
> I am trying to figure out if there is a way to used the Django built
> in login page (the one used to get into the administration pages) and
> link that to my own site.  I am also just beginning in the website
> business as well.  Does anyone have any suggestions, or anyway that I
> can better understand the template system they used to create that
> login information.
--~--~-~--~~~---~--~~
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: Example application

2008-04-01 Thread Jeremy Sandell

There are some great resources available here:
http://code.djangoproject.com/wiki/DjangoResources

Though you might be better served creating a mockup site in Django,
and implementing such things using the rest of the Django
documentation (outside of the tutorials, I mean).

Anyway, good luck!

On Apr 1, 5:54 pm, "Cruskaya Smith" <[EMAIL PROTECTED]> wrote:
> Hi, I am new to django, and I programed the 4 tutorials site django, I
> want to investigate other examples for have better idea of managing
> code; someone has a small example of handling forms with newforms and
> make such basic tasks: addition, edit, display, lists (especially in
> handling forms with tables relations)
>
> Thanks
>
> Cruskaya
--~--~-~--~~~---~--~~
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: IDE

2008-03-05 Thread Jeremy Sandell


On Mar 5, 3:06 pm, gabriel <[EMAIL PROTECTED]> wrote:
> What do you think about :
>
> eclipse + plugins( pydev + html/css )
> eric4 + django plugin
> SPE - is there plugin for django

Eclipse + Pydev extension (especially with the non-free remote
debugger) is really handy, though I've found Eclipse eats memory like
mad.

I haven't tried the others, but would be most interested in hearing
anyone else's opinions.
--~--~-~--~~~---~--~~
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: Access cycle var in template - gentle hack

2008-03-04 Thread Jeremy Sandell

What I meant was that you could use the catch tag to avoid having to
use html comments to hide it. (:

It's still just as much of a hack, of course, but not quite as visible
after rendering.

On Feb 28, 3:51 am, itpaul <[EMAIL PROTECTED]> wrote:
> ok. like this?
>
> {% for p in post_list %}
>         
>             blah...
>     
> {% endfor %}
> {{ caughtvar }}         <-- contains nothing
>
> also tried like this:
>
> {% cycle 'red' 'blue' as bgcolor %}{% catch as caughtvar %}{% cycle
> bgcolor %}{% endcatch %}
>
> and like this:
>
> {% catch as caughtvar %}{% cycle 'red' 'blue' as bgcolor %}{% endcatch
> %}
>
> but alas nothing worked :(
>
> is this what you meant or I am i missing something?
>
> On Feb 27, 9:43 pm, JeremySandell<[EMAIL PROTECTED]> wrote:
>
> > Unless I've misunderstood what you're trying to do, this tag should do
> > what you're needing:
>
> >http://code.djangoproject.com/wiki/CatchTag
>
> > Hope this helps!
>
> > On Feb 27, 2:01 pm, itpaul <[EMAIL PROTECTED]> wrote:
>
> > > Big headache. Cycles "context" var seems to be available only in the
> > > loop its declared in. I need access to it in a template tag thats
> > > outside the loop. (There's some waffle about being "nesting safe"
> > > somewhere. Really...)
>
> > > Ive hacked about a bit and worked out that if I declare the
> > > variable(s) to be used by cycle *before* the loop (you need a custom
> > > tag to set context variables for this 
> > > -http://code.djangoproject.com/ticket/1322
> > > ), I can get at them inside and back out the other end...
>
> > > with one major caveat...
>
> > > I have to access it ( {% cycle bgcolor %} ) again before it will stick
> > > the variable back in the context. Sadly, by doing this, you have to
> > > print the value out.
>
> > > hack complete 
>
> > > before i finished writing this post i realised i could just use html
> > > comments to hide it:
>
> > > 
>
> > > I'm posting anyway in case anybody finds it useful and in the hope
> > > that someone knows how to avoid this ugliness.
>
> > > [mumble]...nesting safe...[/mumble]
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---