Re: web hosting

2006-04-12 Thread PythonistL

I use Dreamhost and it works OK.


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



Re: possible to filter ManyToMany results?

2006-04-12 Thread Ivan Sagalaev

nkeric wrote:

>hello, could anybody pls help? I don't want to write dirty sql if I
>could do it via django ORM...
>  
>
Well... The only thing I could work out is this:

articles = [a for a in g.get_article_list() if a.article_type_id == 1]

Drawbacks are obvious: it's always selects all articles for a game 
(which may be slow) and it can filter type only be id. But it can be a 
viable solution.

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



Re: Django vs Rails

2006-04-12 Thread Jeremy Dunck

On 4/12/06, Jeremy Dunck <[EMAIL PROTECTED]> wrote:
> On 4/12/06, Glenn Tenney <[EMAIL PROTECTED]> wrote:
> > 3. Rails supports and integrates well with Ajax.  I know that this is
> > "coming" for Django... sometime "real soon now"... how's it going?
> > When might it be out?
>
> AFAIK, Rails tries to abstract away the generated JS, and in doing so
> makes code that doesn't degrade well.  I hope Django does better than
> that.
...

Sorry for the late and redundant response...

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



Re: Ecommerce & Django

2006-04-12 Thread Kenneth Gonsalves

On Thursday 13 Apr 2006 5:37 am, ZebZiggle wrote:
> It would be great to have all this stuff already done, but the
> processing company only has examples in PHP

fairly trivial to translate the php example to python - i have done 
it in one case, although the processing company said it wouldnt 
work, it worked

-- 
regards
kg

http://www.livejournal.com/users/lawgon
tally ho! http://avsap.org.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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: Django vs Rails

2006-04-12 Thread Jeremy Dunck

On 4/12/06, Glenn Tenney <[EMAIL PROTECTED]> wrote:
> 3. Rails supports and integrates well with Ajax.  I know that this is
> "coming" for Django... sometime "real soon now"... how's it going?
> When might it be out?

AFAIK, Rails tries to abstract away the generated JS, and in doing so
makes code that doesn't degrade well.  I hope Django does better than
that.

> 4. Rails has built-in unit and functional testing support.  I don't
> know, but I'd venture a guess that few Rails apps actually USE the
> built-in testing capabilities, but it *IS* very nice... Is there
> anything like that planned for Django?

Most of core dj has doctests, but other than creating a rake driver
script and scripts directory, I don't know enough about what Rails
does.  I only made it about halfway thru the Agile Rails book...

> 5. Rails has a book or two already out there -- and already out of
> sync with the version of Rails recently released.  Django's book is
> "in the pipeline" but I doubt it'll be out until 0.92 gets released.

I may be overruled, but I doubt it'll be out much sooner than 1.0...

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



Re: Django vs Rails

2006-04-12 Thread simonb

It's a personal choice. Why not take a day and evaluate the contenders
by writing a simple little app (voting/wiki/blog etc.) Find which one
fits with you. Also think about how and where it will be
deployed/hosted and how easy/possible that is with the system you
choose. Personally: having written big web apps in PHP I vowed "never
again" and tried RoR, TG, Plone and DG - for me DG feels right.

I wouldn't read too much into the Ajax thing - I'm doing Ajax now just
fine with DJ and Prototype. Also don't assume that because it looks
easy in a screencast, it will be easy when you try it.

You might like to checkout this video from JPL
http://oodt.jpl.nasa.gov/wiki/display/oodt/Home - Click on "Better Web
App Development" - ignore the bit about DJ not supporting i18N

Cheers

Simon


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



Re: possible to filter ManyToMany results?

2006-04-12 Thread nkeric

hello, could anybody pls help? I don't want to write dirty sql if I
could do it via django ORM...

BiG thanks! :)


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



Re: Problem with threads accessing MySQL database

2006-04-12 Thread kopikopiko

Hi Dave,

Thanks for your comment. That is an ingenious way of getting your tasks
executed by views. Django is so new to me that I'm clinging to my first
conception of how task timing might work lest I become completely lost
:-)

I'm working on a system to automate interactive TV and synchronise
components with external triggers so having the ability to run threads
that kick off frame-accurately is pretty mandatory. What I find amazing
is how easy it is to make an application like that in python (less than
100 lines of code) and how useful Django is in providing a
reconfigurable data structure and web front end.

Cheers,
Mike


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



Re: Problem with threads accessing MySQL database

2006-04-12 Thread kopikopiko

Hi Dave,

Thanks for your comment. That is an ingenious way of getting your tasks
executed by views. Django is so new to me that I'm clinging to my first
conception of how task timing might work lest I become completely lost
:-)

I'm working on a system to automate interactive TV and synchronise
components with external triggers so having the ability to run threads
that kick off frame-accurately is pretty mandatory. What I find amazing
is how easy it is to make an application like that in python (less than
100 lines of code) and how useful Django is in providing a
reconfigurable data structure and web front end.

Cheers,
Mike


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



Re: Django time-zone chaos

2006-04-12 Thread [EMAIL PROTECTED]

I did set everything to GMT (even computer time), so now it is fine.
There is something wrong Django Timezone.
Thanks 
John


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



Re: Problem with threads accessing MySQL database

2006-04-12 Thread kopikopiko

Hi Eugene,

Thank you for your advice - that makes sense. At the level I'm working
at (first project) and given that locking the single connection doesn't
kill my application (actions can still be performed in real time and
the only delay is to writing logs and statuses back to the database)
I'm happy with Django's capabilities.

What amazes me (beyond how useful Django is to me) is how responsive
people involved in the project are to uninformed queries like mine.
Thank you for your time and effort.

Regards,
Mike


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



Re: ManyToMany with related_name?

2006-04-12 Thread Russell Keith-Magee
On 4/13/06, Dave St.Germain <[EMAIL PROTECTED]> wrote:
I'm trying to create a model that relates back to itself with a ManyToManyField.  Here's my model:I'd like to use a simple ManyToMany, but the objects don't have a distinction between "inserted into" and "insert of".  
Does that make sense?Yup. The problem here is that Django assumes that if you have a ManyToMany field on self, then the relationship is symmetrical: for example:class Person:
   friend = ManyToManyField('self')If I am your friend, then presumably you are my friend. To avoid confusion, the reverse representation of the relationship (person_set, or whatever related_name specifies) is not added to instances of Person.
Obviously, there are some use cases (such as yours) where this is not the case - to handle these, you need to set symmetrical=False:
insert_into = models.ManyToManyField('self',
  null=True,
  blank=True,
  related_name='insert'
  symmetrical=False)

This will add the related_name member on the related object, and will be a distinct set; adding to PressRun.insert_into is not the same as adding to PressRun.insertHope this helps,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 [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/django-users  -~--~~~~--~~--~--~---


Re: Ecommerce & Django

2006-04-12 Thread ZebZiggle

I'm just going through the same thing myself. For my particular
application, I'm not doing a shopping cart, just a lump sum
non-recurring payment. I was going to do all the HTTPS stuff myself to
the transaction handler for approval and I'll accept the "means of
payment" screens myself in Django.

It would be great to have all this stuff already done, but the
processing company only has examples in PHP (and java / asp/ cgi/ etc).


-Zeb


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



Re: Using _pre_delete() to stop execution

2006-04-12 Thread Norbert

Thanks for the quick reply, Arthur.

I've gone over the MR version of doing this, by overwriting delete(), 
which seems to be like a good approach. I have not tried to add it to 
my code, because due to some bad management, I'm currently not 
working on that particular code. In a way, the problem fixed 
itself. ;-)

I will probably come back to it soon, and I intend on using it.

I also agree with Glenn. As a relative python newb, my first thought 
was "Oh, so I shouldn't raise an exception if the delete fails? Hmmm, 
probably because it would make the admin app do wierd things."

I was actually curious if it would be appropriate to take this a step 
further. Have a "can_delete()" which would check if the logged in 
user can do some action. After all, you don't want to give a user 
false hope by showing them a widget which will just return an error. 
I realize that this may be done with group permissions, but it's just 
not the same amount of control. Imagine if I allowed logged in users 
to delete their own stuff, but not someone elses. Then, you have 
managers who can delete stuff that belongs to them or to one of their 
team members. And then you have admins who can do whatever they want. 
Since Django currently doesn't have "can delete self only" 
permissions, could I fake it with a psuedo-delete inside the Model?

This would require accessing current user in the model function. Maybe 
this patch? 
http://code.djangoproject.com/attachment/ticket/1132/current_user_field_patch.2.diff

These are just some random thoughts, feel free to ignore them.

Thanks for the great software, I'm hoping to devote more time to it as 
soon as I get a chance. ;-)

Norbert.

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



Re: Django vs Rails

2006-04-12 Thread James Bennett

On 4/12/06, Glenn Tenney <[EMAIL PROTECTED]> wrote:
> 3. Rails supports and integrates well with Ajax.  I know that this is
> "coming" for Django... sometime "real soon now"... how's it going?
> When might it be out?

I put in the patch for the initial Django/Dojo mashup (Dojo is the
JavaScript toolkit we're going to ship with Django) just the other
day, and I've had a tarball of a modified Dojo-enabled Django admin
app up for a while.

Note, however, that this is not "AJAX integration" in the sense that
Rails has it; we'll be including Dojo in Django and offering the admin
app as an example of how you can take advantage of it to build useful
JavaScript functionality into your own applications. There's been talk
of a generic Django web-service system which would make it much easier
to do remote JavaScript calls (or programmatic calls from any
language, really), and when that's built in there will undoubtedly be
a JavaScript library included with Django which can take advantage of
it, but I don't think the extreme level of "AJAX integration" in Rails
is something that would feel right in Django.

> 4. Rails has built-in unit and functional testing support.  I don't
> know, but I'd venture a guess that few Rails apps actually USE the
> built-in testing capabilities, but it *IS* very nice... Is there
> anything like that planned for Django?

AFAIK Django ships unit tests for all of its own components. Writing
tests for your own applications wouldn't be particularly hard, given
the ease of testing in Python.

> 5. Rails has a book or two already out there -- and already out of
> sync with the version of Rails recently released.  Django's book is
> "in the pipeline" but I doubt it'll be out until 0.92 gets released.

While I can't speak for the authors, I'd say it'll be a good long
while after 0.92 is released when the book hits the shelves.

--
"May the forces of evil become confused on the way to your house."
  -- George Carlin

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



Re: Django vs Rails

2006-04-12 Thread Adrian Holovaty

On 4/12/06, Glenn Tenney <[EMAIL PROTECTED]> wrote:
> 5. Rails has a book or two already out there -- and already out of
> sync with the version of Rails recently released.  Django's book is
> "in the pipeline" but I doubt it'll be out until 0.92 gets released.

Django 0.92 will *definitely* be out before the book comes out.
Possibly Django 1.0 will be out before the book.

Adrian

--
Adrian Holovaty
holovaty.com | djangoproject.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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Django vs Rails

2006-04-12 Thread Glenn Tenney

Several friends have been pushing me to look at Rails, so I've been reading
through "Agile Web Development with Rails".  

Some quick thoughts... with a couple of questions thrown in...

1. Ok, there IS the Ruby vs Python thing... I'll leave that to some
*other* place for THAT flame fest as I do NOT want that here!

2. In Rails you need to declare your SQL code *and* tell Rails about
your schema, but in Django it's all very nicely put into an object
oriented description in your model.  A big win, to me, for Django.

3. Rails supports and integrates well with Ajax.  I know that this is
"coming" for Django... sometime "real soon now"... how's it going?
When might it be out?

4. Rails has built-in unit and functional testing support.  I don't
know, but I'd venture a guess that few Rails apps actually USE the
built-in testing capabilities, but it *IS* very nice... Is there
anything like that planned for Django?

5. Rails has a book or two already out there -- and already out of
sync with the version of Rails recently released.  Django's book is
"in the pipeline" but I doubt it'll be out until 0.92 gets released.

Any other major differences that I missed?

-- 
Glenn

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



Re: Ecommerce & Django

2006-04-12 Thread Michael
I'm working on similar project in m-r . Currently ready only categories,products - so catalog website ready - shopping cart  -work in progress  - need to finish checkout. I've been thinking to open a project page for this - could happening in next few days(weeks?)
Michael

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


Model that has more options

2006-04-12 Thread beewee

Hi,

I'm trying to create a model where the user can either upload an image
or enter a URL to an image or select an given image by a combobox.
How this would be possible? (I hope, I'm understandable...)

Thanks for your help,

Benjamin Wiegand


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



Re: check for none

2006-04-12 Thread Ivan Sagalaev

Jiri Barton wrote:

>I want to be able to discern among None, empty list, and non-empty
>list; then, I want to tell the user - say nothing, "nothing found",
>"found the following:" resp.
>  
>
I had a similar (but a bit more complex) thing solved for me by wrapping 
a list in a dict:

result={} - means there were no actions
result={'items':[]} - means there was a search but nothing is found
result={'items':['...',...,'...']} - found

And the template is like this:

{% if results %}

{% if results.items %}

{% for item in result.items %}
...
{% endfor %}

{% else %}
Nothing found
{% endif %}

{% endif %}



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



Re: Ecommerce & Django

2006-04-12 Thread olive

I'm currently working on rewriting a store (for my wife too;) I have
originaly wrote in OmniMark language (isn't it exotic ?).

It is pretty straightforward with Django, I have already achieve the
shopping cart management, user registration, shipping (Chronopost,
France), discounts.

But the model is far from generic unless you want to sell CDs, DVDs,
books, music and dance events and accessories.

It is not yet plugable, has not been port to Magic Removal branch (this
is the next step before going on dev).

I am wiilling to share my experience and participate to such a project.

Olivier.


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



Re: Ecommerce & Django

2006-04-12 Thread olive

I'm currently working on rewriting a store (for my wife too;) I have
originaly wrote in OmniMark language (isn't it exotic ?).

It is pretty straightforward with Django, I have already achieve the
shopping cart management, user registration, shipping (Chronopost,
France), discounts.

But the model is far from generic unless you want to sell CDs, DVDs,
books, music and dance events and accessories.

It is not yet plugable, has not been port to Magic Removal branch (this
is the next step before going on dev).

I am wiilling to share my experience and participate to such a project.

Olivier.


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



Re: Pluggable User/Registration/Authentication App?

2006-04-12 Thread Max Battcher

Esteban wrote:
> I am pretty much fresh blood to Django and I am looking for a pluggable
> application that will provide some sort of front end interface to
> handle user registration and authentication to an existing project.
> For many sites a user system is key, I have been reading around and
> found the authentication model page:
> 
> http://www.djangoproject.com/documentation/authentication/
> 
> However it would be great if there was some sort of pluggable
> application that does the basics, like I said most developers/designers
> would find this useful for their projects.  So any ideas where to start
> on this?  Does anyone know if anyone has already made something like
> this to build off of?

There are several "generic" auth views: login, logout, password change, 
password reset.  These can be found scattered across django.views in 
trunk/0.91 or in django.contrib.auth.views in M-R.  These give you the 
action code and then you just need to write the templates for your site 
and wire the views somewhere in your urls.

-- 
--Max Battcher--
http://www.worldmaker.net/
"I'm gonna win, trust in me / I have come to save this world / and in 
the end I'll get the grrrl!" --Machinae Supremacy, Hero (Promo Track)

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



ManyToMany with related_name?

2006-04-12 Thread Dave St.Germain
I'm trying to create a model that relates back to itself with a ManyToManyField.  Here's my model:class PressRun(models.Model):    starttime = models.DateTimeField(db_index=True)    endtime = models.DateTimeField
(validator_list=[endAfterStartValidator])    name = models.CharField(maxlength=100,blank=True)    recurringitem = models.ForeignKey(RecurringPressRun,blank=True,null=True)    edition = models.IntegerField(choices=EDITION_CHOICES,blank=True,null=True)
    press_id = models.IntegerField(choices=PRESS_CHOICES,blank=True,default=1)    insert_into = models.ManyToManyField('self',  null=True,  blank=True,  related_name='insert')
The problem is that the model doesn't seem to use the related_name option.  PressRun objects have an insert_into property, but no insert property.  I'm actually trying to say that the result of a PressRun can be "inserted" into another PressRun, but I don't want to make a separate object (like PressRunInsert or something).  I'd like to use a simple ManyToMany, but the objects don't have a distinction between "inserted into" and "insert of".  
Does that make sense?Dave

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


Ecommerce & Django

2006-04-12 Thread Chris Moffitt

Hello everyone,

I've been lurking around here for a little bit, trying to get a feel for
Django.  I recently had the need to set up an eCommerce site for my wife. 
After looking at all the alternatives, I chose OsCommerce which seems to
be the dominate Open Source ecommerce application.  It is pretty mature &
has thousands of users.  For the most part, it does what it says it does. 
However, after I've spent the last couple of months trying to get it
working the way I like, the PHP warts & overall design are getting to me. 
My site is now functional but I'm really scared to make any changes for
fear of the whole house of cards coming down on me.

I'm no PHP expert and won't go through the cons of the language but let's
just say that the more I worked with PHP, the more I wished I were working
with Python!  So, I started looking at frameworks to setup my site using a
python based solution.  After looking around, Django looks like a good
bet.

There are certain problems with OsCommerce which are going to be
non-issues with a Django site:
- Templating:  In OsCommerce there are some options but they're kludgy and
can interfere with other pieces of code or add-on modules.  Obviously
templating is a core part of Django.
- Search Engine Optimize URLs:  Before diving into this project, I didn't
realize how many people worked so hard to get URLs looking nice so that
they show up higher in search engine results.  As you can imagine, trying
to modify these through PHP can be painful.  Django's URL capabilities
should make this another non-issue.
- Performance and Caching:  Scalability and general performance are huge
issues.  In stock OsCommerce, you can have nearly 100 db queries for 1
simple page.  Without caching, you have some real performance headaches.
The caching capability & proven scalability lead me to believe that Django
will make these issues less of a concern going forward.

There are some concerns I have around Django for this application:
- Lack of ecommerce modules:  There are lots of things like FedEx, USPS or
UPS shipping interfaces that are available that would have to be re-coded.
 Also, payment processing modules would have to be created from scratch. 
I don't think these are show stoppers but it is a challenge.
- Admin interface:  I'm a little concerned about whether or not the
default admin capabilities within Django will be usable for store
management.  I might have to come up with some other alternatives & it
feels like that's uncharted territory in some aspects.
- Deployment on shared hosts:  This probably isn't too big a deal but it's
certainly not as straightforward or ubiquitous as PHP app deployment.

So, what is the point of my lengthy post?  I know some people have started
(or have completed) work on their own stores.  Is there any framework out
there that I can leverage or do I have to "roll my own?"  I think it would
be a great thing for this community to create a store framework.  The
Django plusses I mentioned would be awesome in a complete solution.  I
think it would also attract a lot of users to the project.

Is there interest or any activity in this area?  I'm willing to hack
through by myself but I think if there's anyone that is an expert, we
could move through this a lot more quickly.

Thanks,
Chris

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



Re: where is the meta?

2006-04-12 Thread Adrian Holovaty

On 4/12/06, yi huang <[EMAIL PROTECTED]> wrote:
> today i update the django magic-removal svn,and install new version
> i read new db-api.html , and see
> models.ForeignKey(Poll, edit_inline=meta.TABULAR
>
> but where to import meta module.
>
> and the old code "models.TABULAR" is wrong now.

"svn update" your magic-removal code, and all should be well.

Adrian

--
Adrian Holovaty
holovaty.com | djangoproject.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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



check for none

2006-04-12 Thread Jiri Barton

Hello girls and boys,

how do I check if a variable is None in a template? The following do
not work...

{% ifequal variable None %}

{% ifequal variable|default_if_none:"skip" "skip" %}

I want to be able to discern among None, empty list, and non-empty
list; then, I want to tell the user - say nothing, "nothing found",
"found the following:" resp.

Thank you.
Jiri


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



Re: Strange exception when creating a user.

2006-04-12 Thread Justin

I've actually seen that error as well with the M-R branch. It used to
show up every once in a while, maybe one out of 10 or 15 times when I
was creating a new post in my blog model. Whatever it was, it seems to
have been fixed as of a week or two ago, so I never really bothered to
report it.

-Justin


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



Re: Problem with threads accessing MySQL database

2006-04-12 Thread DavidA

Hi kopikopiko,

I thought I'd chime in on how I'm solving a similar problem. I also
have a task scheduling app written in Django, but I actually run the
tasks through Django rather than outside of it: I have a special view
(/tasks/trigger) which remembers the last time the view ran and checks
for any tasks that should have run since the last trigger time. It then
simply loads and runs each task in sequence.

Outside of Django I have a schedule NT/Windows task that runs every 5
minutes and just does an HTTP get of the trigger view url.

I can get away with this since my tasks are simple and usually take a
few seconds to run so I don't mind running them synchronously. I did
think about your approach, though, and I was going to load all the DB
data that defines the task, then fire off the task on a background
thread, then have those tasks update the DB with their stats directly
(each making their own MySQL connection and doing direct SQL). I was
going to do it that way since I didn't want my task scripts to be
dependent on Django's ORM.

But like I said, I never went down the multi-threaded route because I
wanted to keep it simple and at this point, I don't need to.
-Dave


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



Re: where is the meta?

2006-04-12 Thread Dave St.Germain
models.TABULAR should workOn 4/12/06, yi huang <[EMAIL PROTECTED]> wrote:
today i update the django magic-removal svn,and install new versioni read new db-api.html , and see models.ForeignKey(Poll, edit_inline=meta.TABULAR

but where to import meta module.and the old code "models.TABULAR" is wrong now.
-- http://codeplayer.blogbus.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 [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/django-users  -~--~~~~--~~--~--~---


where is the meta?

2006-04-12 Thread yi huang
today i update the django magic-removal svn,and install new versioni read new db-api.html , and see models.ForeignKey(Poll, edit_inline=meta.TABULAR
but where to import meta module.and the old code "models.TABULAR" is wrong now.
-- http://codeplayer.blogbus.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 [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/django-users  -~--~~~~--~~--~--~---



Re: querying for an empty set in m-r?

2006-04-12 Thread Brian Elliott

Russell,

Just wanted to thank you for responding to my post.  You did  
interpret my question correctly, though I was obviously hoping to  
avoid using raw SQL.  Anyway, thanks again.

Brian

On Apr 12, 2006, at 1:10 AM, Russell Cloran wrote:

>
> Hi,
>
> On Tue, 2006-04-11 at 21:20 -0400, Max Battcher wrote:
>> if sometag.article_set.count() == 0:
>> pass # your code here
>
> This will test if one tag has an empty article_set. AFAICT, the  
> question
> is on how to find all tags which have an empty article_set. Yes, you
> could do it this way, but it means querying the DB again for every  
> tag.
>
>>> Each Article can be associated with multiple Tags and vice versa.
>>> How can I query the Tag model to obtain all Tags with no associated
>>> articles?  (m-r)  I basically want to delete unused tags.
>
> Unfortunately, it seems that you have to drop to SQL. See the thread
> started by me on the subject yesterday,
>
> http://groups.google.com/group/django-users/browse_thread/thread/ 
> e708abca0baf6a32/15ae0b421f607983
>
> Russell
>
>
> >


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



Re: querying for an empty set in m-r?

2006-04-12 Thread Brian Elliott

Max,

Just wanted to thank you for responding to my question.  You are  
correct that the list comprehension is pythonic, though I was ideally  
looking for a efficient method from a database perspective.

Thanks,
Brian

On Apr 12, 2006, at 2:16 AM, Max Battcher wrote:

>
> Russell Cloran wrote:
>> Hi,
>>
>> On Tue, 2006-04-11 at 21:20 -0400, Max Battcher wrote:
>>> if sometag.article_set.count() == 0:
>>> pass # your code here
>>
>> This will test if one tag has an empty article_set. AFAICT, the  
>> question
>> is on how to find all tags which have an empty article_set. Yes, you
>> could do it this way, but it means querying the DB again for every  
>> tag.
>
> Oh, right.  You could do:
>
> tags = [tag for tag in Tag.objects.all() if tag.article_set.count()  
> == 0]
>
> n queries for n tags, but it is "pretty" Python.  Doing db-cleanup
> shouldn't happen all that often, so you probably don't need the best
> performance, and I'd just stick with the list comprehension.
>
> Too bad there isn't some cool easy Python way to make a list
> comprehension/generators like that as Lazy as the Descriptors...
> Byte-code parsing, anyone?
>
> http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/442447
>
> -- 
> --Max Battcher--
> http://www.worldmaker.net/
> "I'm gonna win, trust in me / I have come to save this world / and in
> the end I'll get the grrrl!" --Machinae Supremacy, Hero (Promo Track)
>
> >


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



Re: web hosting

2006-04-12 Thread Jeremy Dunck

On 4/12/06, tgone <[EMAIL PROTECTED]> wrote:
>
> Does anyone know of a good hosting company that already has Django
> installed?

http://code.djangoproject.com/wiki/DjangoFriendlyWebHosts

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



Pluggable User/Registration/Authentication App?

2006-04-12 Thread Esteban

I am pretty much fresh blood to Django and I am looking for a pluggable
application that will provide some sort of front end interface to
handle user registration and authentication to an existing project.
For many sites a user system is key, I have been reading around and
found the authentication model page:

http://www.djangoproject.com/documentation/authentication/

However it would be great if there was some sort of pluggable
application that does the basics, like I said most developers/designers
would find this useful for their projects.  So any ideas where to start
on this?  Does anyone know if anyone has already made something like
this to build off of?


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



web hosting

2006-04-12 Thread tgone

Does anyone know of a good hosting company that already has Django
installed?


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



Re: possible to filter ManyToMany results?

2006-04-12 Thread nkeric

Ivan Sagalaev wrote:
> g.get_article_list(article_type_id__exact=1)
> It's g.get_article_list(article_type__id__exact=1). Note 2 underscores
> before "id" which means field "id" of a parent table.

sorry for mistyped that, I tried this:

>>> g.get_article_list(article_type__id__exact=1)
Traceback (most recent call last):
  File "", line 1, in ?
  File "/usr/lib/python2.4/site-packages/django/utils/functional.py",
line 3, in _curried
TypeError: method_get_many_to_many() got an unexpected keyword argument
'article_type__id__exact'

doesn't work either... :(


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



Re: querying for an empty set in m-r?

2006-04-12 Thread Max Battcher

Russell Cloran wrote:
> Hi,
> 
> On Tue, 2006-04-11 at 21:20 -0400, Max Battcher wrote:
>> if sometag.article_set.count() == 0:
>> pass # your code here
> 
> This will test if one tag has an empty article_set. AFAICT, the question
> is on how to find all tags which have an empty article_set. Yes, you
> could do it this way, but it means querying the DB again for every tag.

Oh, right.  You could do:

tags = [tag for tag in Tag.objects.all() if tag.article_set.count() == 0]

n queries for n tags, but it is "pretty" Python.  Doing db-cleanup 
shouldn't happen all that often, so you probably don't need the best 
performance, and I'd just stick with the list comprehension.

Too bad there isn't some cool easy Python way to make a list 
comprehension/generators like that as Lazy as the Descriptors... 
Byte-code parsing, anyone?

http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/442447

-- 
--Max Battcher--
http://www.worldmaker.net/
"I'm gonna win, trust in me / I have come to save this world / and in 
the end I'll get the grrrl!" --Machinae Supremacy, Hero (Promo Track)

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