How to get cms like features in Django

2009-09-15 Thread ristretto.rb
Hello All, I have pages like home, contact us, about us, that are on nearly every webapp that I create. The other parts of the webapps are specific to some business requirement, but the *us type pages are not. Unlike the application pages proper, this supporting pages need to be updated

Re: Is it secure "enough" to put login info in the session?

2009-09-09 Thread ristretto.rb
that at this point. I'm just working through when Django saves a cookie, and I think this will work. Gene On Sep 9, 5:54 pm, Craig McClanahan <craig...@gmail.com> wrote: > On Tue, Sep 8, 2009 at 10:20 PM, ristretto.rb<ristretto...@gmail.com> wrote: > > > Hi > > > I w

Is it secure "enough" to put login info in the session?

2009-09-08 Thread ristretto.rb
Hi I want to have a guest concept. You get instant access to my app. There are limits. But, you will be allowed to come back multiple times before I require you to register. When a user comes in as a guest, I will create a user with a bogus username, password and email, and put the user_id

Re: login required

2009-09-08 Thread ristretto.rb
Have you not had a peek in here yet? http://docs.djangoproject.com/en/dev/topics/auth/#topics-auth gene On Sep 9, 4:30 pm, putih wrote: > hii, > > need your help on this matter :- > > 1. how to restrict user for certain page. for example :- > > non-register user

What do you use for a shopping cart (in an existing app?)

2009-08-27 Thread ristretto.rb
Hello, I would like to add shopping cart features to a current web application. Has anyone solved this type of problem? What did you do? Roll your own features (add to cart, view cart, payment, etc)? Use Satchmo? Use something else? Thanks Gene

Getting value from form in formset

2009-08-14 Thread ristretto.rb
Hi, I fear that I just haven't found this in the docs yet. But, here goes I'm using a formset to list out a number of text box fields. The initial number varies based on a couple of factors. But, never grows. The formset has initial_values. In the template, I have to preset the values

Re: Don't understand ModelForm

2009-08-14 Thread ristretto.rb
= forms.MyModelForm(request.POST) Anyone else use this approach? gene On Aug 15, 12:07 pm, "ristretto.rb" <ristretto...@gmail.com> wrote: > This is an excellent thread.  I came here with the same questions as > Marc.  My revelation seems to be that forms are for data, and saving > is con

Re: Don't understand ModelForm

2009-08-14 Thread ristretto.rb
This is an excellent thread. I came here with the same questions as Marc. My revelation seems to be that forms are for data, and saving is control. And these two have separate concerns/goals. Such that fields shouldn't be in forms for the sole reason to make control of the form function

Re: Why two identical entries in django.test.utils.ContextList while testing?

2009-08-06 Thread ristretto.rb
Ah, that's it. Thanks Karen. What an awesome quick response. My mistake. Thanks gene On Aug 7, 10:28 am, Karen Tracey <kmtra...@gmail.com> wrote: > On Thu, Aug 6, 2009 at 5:41 PM, ristretto.rb <ristretto...@gmail.com> wrote: > > > Hello, > > > I'm

Why two identical entries in django.test.utils.ContextList while testing?

2009-08-06 Thread ristretto.rb
Hello, I'm working on some unit tests using the Client that comes with subclassing django.test.TestCase. When run code like this response = self.client.get("/project/usecase") The object response.context is a list type object containing two identical Dictionaries. So, this errors ...

ChoiceField, TypedChoiceField, ModelChoiceField and empty_label

2009-07-02 Thread ristretto.rb
Hello, I have stepped through code, and cruised the django docs, forums, and internet in general looking for how to setup an empty label with TypedChoiceField (or ChoiceField.) I suspected it would be done similar to the way it is done with ModelChoiceField. With ModelChoiceField, we can

Re: What debugger do you use?

2009-05-12 Thread ristretto.rb
I second that! WingIDE is aweome. I'm using NB with xdebug for PHP with one client, and WingIDE Pro (which gladly paid for) for python. I can say, for certain, that I would choose Wing over NB if I had to choose one. Gene Campbell On May 13, 1:54 am, James Matthews

ChoiceField with 0,1, or more than 1 choice, what's the best way to implement?

2009-03-09 Thread ristretto.rb
Hello, I have a page that must show data in one of the follow three ways. A. No choices: Nothing to choose from. Page will show nothing, or probably a message saying something about there being nothing to choose. B. 1 Choice: There is only 1 and you must choose it. So, not much of a

Re: Does a Template Factory system exist, or do I need to build it?

2008-12-03 Thread ristretto.rb
Bloody brilliant! thanks for the reply Malcolm. gene On Dec 4, 4:40 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Wed, 2008-12-03 at 19:19 -0800, ristretto.rb wrote: > > Hello, > > > I have a site that we plan to localize for different countries (

Does a Template Factory system exist, or do I need to build it?

2008-12-03 Thread ristretto.rb
Hello, I have a site that we plan to localize for different countries (all English speaking at this point.) Most of the templates in the site will localize fine as they are, but a few will need to be changed. I would like to have one set of templates that is the international (default) set,

Re: What do you use as a build tool (like Ant or make)

2008-09-11 Thread ristretto.rb
Thanks very much for the replies. I was really considering Vellum, and I still am. But, that was a very informative post from Kevin on zc.buildout. I'll have to give both a look. Look forward to your blog post Dan!! cheers gene On Sep 10, 9:58 pm, Dan Fairs <[EMAIL PROTECTED]> wrote: > > I

Re: What do you use as a build tool (like Ant or make)

2008-09-09 Thread ristretto.rb
t; Waf (http://code.google.com/p/waf/), which happens to be written in > Python (including the configuration files). > > > > On Tue, 2008-09-09 at 01:14 -0700, ristretto.rb wrote: > > Hello, > > > What do you use to build a Django project?  By build I mean, > > > *

What do you use as a build tool (like Ant or make)

2008-09-09 Thread ristretto.rb
Hello, What do you use to build a Django project? By build I mean, * run unit tests * copy files to a distribution set based on a target (production, staging, clustered, etc.) * include config files specific to the target, and not including source control files and other development time

Re: django.views.generic.simple.direct_to_template doesn't support text/xml in urls.py?

2008-09-01 Thread ristretto.rb
I'm using 1.0 alpha, and had the same problem. Adding 'mimetype':'text/xml' as noted worked perfectly. thanks for the post!! On Aug 9, 8:25 pm, Valery <[EMAIL PROTECTED]> wrote: > Hi Julien, > > thank you for the answer. > > I've just tested your code, the effect is the same. Namely, >

Re: Another django db memory leak?

2008-08-27 Thread ristretto.rb
, "ristretto.rb" <[EMAIL PROTECTED]> wrote: > For some reason, when I do > > x.save()     over an over, it takes about 200k, too. > > either I have something really messed up, or there is a real problem > with this api. > > On Aug 28, 10:34 am, "ristretto.rb&q

Re: Another django db memory leak?

2008-08-27 Thread ristretto.rb
For some reason, when I do x.save() over an over, it takes about 200k, too. either I have something really messed up, or there is a real problem with this api. On Aug 28, 10:34 am, "ristretto.rb" <[EMAIL PROTECTED]> wrote: > To summarize - I double checked that DEBU

Re: Another django db memory leak?

2008-08-27 Thread ristretto.rb
On Aug 28, 10:17 am, "ristretto.rb" <[EMAIL PROTECTED]> wrote: > Previously I found get_or_create() to be leaky, so I stopped using > it.  Now I'm seeing filter() to be leaky. > > First, yes, I have DEBUG=False, and I have double checked that > connection.queries is e

Another django db memory leak?

2008-08-27 Thread ristretto.rb
Previously I found get_or_create() to be leaky, so I stopped using it. Now I'm seeing filter() to be leaky. First, yes, I have DEBUG=False, and I have double checked that connection.queries is empty. Suppose the following model class Page(models.Model): type =

Re: What is the fastest way to come up to speed with Django?

2008-07-09 Thread ristretto.rb
to bother upgrading to the KomodoIDE. I'm not too impressed so far. Thanks for the pointer to comp.lang.py On Jul 10, 9:31 am, bruno desthuilliers <[EMAIL PROTECTED]> wrote: > On 9 juil, 04:08, "ristretto.rb" <[EMAIL PROTECTED]> wrote: > > > I leading a project based

Re: In admin, unable to save many-to-many relation objects with intermediate table

2008-07-09 Thread ristretto.rb
Wow, Karen, you're amazing. Thanks for that. I can say I learned a lot about Django today with your help. thanks!! On Jul 9, 6:38 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > On Wed, Jul 9, 2008 at 12:57 AM, ristretto.rb <[EMAIL PROTECTED]> > wrote: > &g

Re: What is the fastest way to come up to speed with Django?

2008-07-08 Thread ristretto.rb
008-07-08 at 19:08 -0700, ristretto.rb wrote: > > I leading a project based on Django, and I come from 12 years of Java, > > and 0 years of Python.   > > You won't get any crap from me, at least. The more languages people > know, the better. > > > I'm currently digging

Re: In admin, unable to save many-to-many relation objects with intermediate table

2008-07-08 Thread ristretto.rb
/__init__.py where a the HiddenField class is defined. A validator is passed in called "_curried". I have no idea what that is. Going to stop here. thanks! On Jul 9, 2:47 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > On Tue, Jul 8, 2008 at 9:57 PM, ristretto

What is the fastest way to come up to speed with Django?

2008-07-08 Thread ristretto.rb
I leading a project based on Django, and I come from 12 years of Java, and 0 years of Python. I'm currently digging into the django-trunk on many an occasion, trying to explain things that I can't find in the docs. Because I don't understand how Django was designed, and can't guess too

Re: In admin, unable to save many-to-many relation objects with intermediate table

2008-07-08 Thread ristretto.rb
? On Jul 9, 1:28 pm, ristretto.rb <[EMAIL PROTECTED]> wrote: > OK, I took core=True off, and added it to the reference_no field.  The > problem seems to go away for the case when no there are no > pre-existing joins.   Clearly, I don't understand what core is for. > I'll read the d

In admin, unable to save many-to-many relation objects with intermidiate table

2008-07-08 Thread ristretto.rb
Hello, I'm stuck. Any help will be much appreciated. I followed http://www.djangoproject.com/documentation/models/m2m_intermediary/ to make a Many-to-many relationship via an intermediary table. class LeftSide(models.Model): : class RightSide(models.Model): : class JoinTable(models.Model):

Re: Need help including a queryset in every view

2008-06-27 Thread ristretto.rb
> I have a navigation list powered by a model in my base site template. > So, I need to create a queryset object that will be available to every > view. Middleware comes to mind (see the docs), but I'm new to django, and perhaps that's not the best way. I'd be interested to see what other