Re: Re: Why not Django

2006-11-30 Thread Alan Green
On 12/1/06, James Bennett <[EMAIL PROTECTED]> wrote: > Now, does anybody want to talk about Django? Yes! Is anyone writing financial or money-handling applications in Django? Any particular issues or "gotchas" the world should know about? a --~--~-~--~~~---~--~

Re: A Rails/Django Comparison

2006-11-19 Thread Alan Green
have done some work on comparative performance, but couldn't squeeze it into our schedule. If anyone out there would like to do some performance research with the Habitual Readers codebase, you're welcome to, and please drop us a line if we can help in any way. Cheers, Alan. -- Al

Re: A Rails/Django Comparison

2006-11-14 Thread Alan Green
the Rails programmer's prior Ruby experience. Excellent point. Will fix. Thankyou. Cheers, Alan. > > -David Sissitka > > > > -- Alan Green [EMAIL PROTECTED] - http://bright-green.com --~--~-~--~~~---~--~~ You received this message because

A Rails/Django Comparison

2006-11-13 Thread Alan Green
Cheers, Alan. -- Alan Green [EMAIL PROTECTED] - http://bright-green.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@googlegroup

Re: User object available in base template

2006-10-03 Thread Alan Green
'latest_posts': posts, > }) That's it there, I think. RequestContext takes a request object as its first parameter. Try c = RequestContext(request, { 'latest_posts': posts, }) Cheers, Alan -- Alan Green [EMAIL PROTECTED] - http://bri

Re: Primary Key for auth_user is User.__str__() ??

2006-09-26 Thread Alan Green
Fields says, "we don't recommend you use them." http://www.djangoproject.com/documentation/model_api/#one-to-one-relationships One of my applications has a UserProfile object. After trying OneToOneFields and not quite getting the results I wanted, I settled on using a ForeignKey inst

Re: I'm so confused...

2006-09-25 Thread Alan Green
ng your web server and database of choice. Alan. > > -- > > regards > kg > http://lawgon.livejournal.com > http://nrcfosshelpline.in/web/ > > > > > > -- Alan Green [EMAIL PROTECTED] - http://bright-green.com --~--~-~--~~~---~--

Re: Template For Loops

2006-09-25 Thread Alan Green
ice that I substituted the game.id for the forloop.counter. This makes it much easier to retrieve the selected game later, not to mention making the page more resilient to changes in the backing database) Hope all that helps, Alan. -- Alan Green [EMAIL PROTECTED] - http://bright-green.com -

Re: Calling a view from another view in the same app?

2006-09-05 Thread Alan Green
forme detallado de un viaje"- > > def viajes(request): >"Genera listados de viajes por distintos criterios" >clie = 'Todos' >prov = 'Todos' >desde = 'Sin limite' >hasta = 'Sin limite' >paxs = 'Tod

Re: Calling a view from another view in the same app?

2006-09-05 Thread Alan Green
part of the code is > > amxdev/contable/views.py > ... > > def viajes(request): > if request.GET['numero'] != '': > resp = viaje(request) > return resp > > > def viaje(request, numero=None): > ... >

Re: Does "extends" also copy of "load" declarations from base template?

2006-09-05 Thread Alan Green
where the tags are loaded from. Either way wouldn't make much difference to me, though the Django devs obviously have a preference from the current behaviour. Regards, Alan. > > Thanks, > Rob > > > > > -- Alan Green [EMAIL PROTECTED] - http://bright-green.com --~--

Re: How much text in a db field is acceptable?

2006-09-04 Thread Alan Green
may find the Django FlatPage app helpful: http://www.djangoproject.com/documentation/flatpages/ Cheers, Alan. > > > > > -- Alan Green [EMAIL PROTECTED] - http://bright-green.com --~--~-~--~~~---~--~~ You received this message because you are subscr

Re: How to use month/date/year menus for date?

2006-09-03 Thread Alan Green
e fields, it may be worthwhile coding up your own subclass of django.forms.FormField or django.forms.HiddenField, which renders the three drop-down lists and does the validation. Alan. > > Regards, >Jakub > > > > > -- Alan Green [EMAIL PROTECTED] - http://br

Re: Custom SQL in Q objects

2006-08-30 Thread Alan Green
ot; = > %s','"django_content_type"."model" != %s'], ['%profile', > 'users','profile']) Thanks for the sample. The only thing I'd add is that, if your custom Q object may be combined with other Q objects in the same query, Dj

Re: included templates to load own objects

2006-08-28 Thread Alan Green
if the Ticker is required for every request. If not, you might consider writing a custom tag that can be called by ticker.html and would load the context with the correct variables. Hope it works out for you, Alan. -- Alan Green [EMAIL PROTECTED]

Re: Admin "View on site" link broken

2006-08-27 Thread Alan Green
On 8/27/06, Michael van der Westhuizen <[EMAIL PROTECTED]> wrote: > On 8/27/06, Alan Green <[EMAIL PROTECTED]> wrote: > > I'm having a problem with the Admin "View on site" button. According > [snip] > > My model objects have a get_absolute_url() metho

Re: included templates to load own objects

2006-08-25 Thread Alan Green
19c3bbf9a52c375?lnk=st&q=included+template+object+django&rnum=3&hl=en#819c3bbf9a52c375 > post about inclusion tags, and it's not exactly what I want. As far as > I can tell, inclusion tags would allow me to load an object in the > paren

Re: Removing old permissions from auth_permission

2006-08-24 Thread Alan Green
iour? syncdb only ever adds records to the database. The code that does this is in django/contrib/auth/management.py. So, yes, this is normal behaviour. When you say 'stale records' do you mean records for permissions for tables that no longer exist? Cheers, Alan. > > > &g

Re: Outer joins as extras()

2006-08-24 Thread Alan Green
On 8/22/06, Russell Keith-Magee <[EMAIL PROTECTED]> wrote: > On 8/22/06, Alan Green <[EMAIL PROTECTED]> wrote: > > Has anybody found a way to add an table to query with an outer join? > It isn't really a documented feature, and I haven't worked through the &

Re: Distribute Django program to run on a local computer

2006-08-21 Thread Alan Green
ttp://www.voidspace.org.uk/python/movpy/ > 2. Can I kick off Django via my run.py script but not have it throw up > a command window? I'm guessing maybe something with Tk/Tkinter but I'd > like to avoid those extra dependencies if I can. pythonw.exe (in your python install di

Re: [Fwd: multiple forms]

2006-08-21 Thread Alan Green
_data = dict(template.__dict__) By the way, be really careful about accessing the __dict__ attribute in Django code. Django sprinkles all kinds of interesting stuff into its own objects, so you may sometimes get a surprise. Alan. -- Alan Green [EMAIL PROTECTED] - http://bright-green.com --~--~--

Outer joins as extras()

2006-08-21 Thread Alan Green
s. It works, but it's ugly. Anybody got a different way to do it? Alan. -- Alan Green [EMAIL PROTECTED] - http://bright-green.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" g

Re: {% include %} tag: documentation?

2006-08-17 Thread Alan Green
t a fragment of HTML - just that part that needs to go on both pages. It should not have HTML, HEAD or BODY tags. Make sense? If not let us know and I'm sure you'll get a fuller explanation. Alan -- Alan Green What's that Django template doing the

Re: login requires only one argument?

2006-08-17 Thread Alan Green
t object to the login > method, then it goes into infinite recursion Are you confusing the login method from django.contrib.auth with the login method from django.contrib.auth.views? Both take a request as the first parameter, but the first has two positional parameters, while the second as o

Re: compare integers in template (newbie question)

2006-08-15 Thread Alan Green
{% endif %} > > To display an appropriate number of stars for a video clip in a > template. Hi Mae, The widthratio tag may be helpful: http://www.djangoproject.com/documentation/templates/#widthratio Alan. -- Alan Green [EMAIL PROTECTED] - http://bright-green.com --~--~-~--~--

Re: flash messages

2006-08-09 Thread Alan Green
er's session: http://www.djangoproject.com/documentation/sessions/ Kind regards, Alan. > > The todo "Todo object" was deleted successfully. > > > > > -- Alan Green [EMAIL PROTECTED] - http://bright-green.com --~--~-~--~~~---~--

Re: Function kills page?

2006-08-09 Thread Alan Green
ar.id"? 4. You might also try using a Django query rather than looping over the data in code. Something like: def get_events(self): return SerialNumber.objects.filter(year = self.year.id) Alan. -- Alan Green [EMAIL PROTECTED] - http://bright-green.com --~--~-~--~~--

Re: whith errors my form loose his url parameters

2006-08-07 Thread Alan Green
l2python(new_data) > new_place=manipulator.save(new_data) > return HttpResponseRedirect(new_place.get_absolute_url()) > else: > errors = {} > new_data = manipulator.flatten_data() > new_data.update(dict(request.GET.items())) > form

Re: when is 1 != 1? (according to 'ifequal' in template)

2006-08-07 Thread Alan Green
o ensure that type of data in request.session.pfilter matches the type of data in project.id. Either that, or create your own filter. Alan. > > > > > -- Alan Green [EMAIL PROTECTED] - http://bright-green.com --~--~-~--~~~---~--~~ You received th

Re: Work with FileField directly

2006-08-07 Thread Alan Green
="multipart/form-data" to the form, then Django will put the uploaded files into request.FILES. You can then verify the uploaded files and save them wherever you want to in the file system. HTH, Alan. -- Alan Green [EMAIL PROTECTED] - http://bright-green.com On 8/7/06, Adam Seering &l

Re: Django covered in podcast with Guido

2006-08-06 Thread Alan Green
On 8/5/06, Simon Willison <[EMAIL PROTECTED]> wrote: > > http://www.twit.tv/floss11 > > Django gets some good discussion about 50 minutes in. Guido sure says nice things about Django. Congratulations! a -- Alan Green [EMAIL PROTECTED] - http:

Re: multiple choices in model

2006-08-06 Thread Alan Green
Field not suitable for that case. For just one field in just one application, I recommend treating it as a regular text field and implementing your own rendering and validation. HTH, Alan. > > -- > -- > Michael > > > -- Alan Green [EMAIL PROTECTED] - http://bright-green.c

Re: Creating User Accounts

2006-08-06 Thread Alan Green
ou may need a custom AddManipulator, or perhaps even a form manipulator. These are not difficult to use, and you should be up and going within a few hours. Alan > > Thanks, > medhat > > > > > -- Alan Green [EMAIL PROTECTED] - http://bright-green.com --~--~-~--~~--

Re: problem with the structure of our site (sharing user-data)

2006-08-06 Thread Alan Green
ng userdata I havenĀ“t > thought about ... suggestions are more than welcome. > > hope I put the issue across ... > > thanks, > patrick > > > > -- Alan Green [EMAIL PROTECTED] - http://bright-green.com --~--~-~--~~~---~--~~ You rec

Re: method as default field option

2006-08-03 Thread Alan Green
example. Callable defaults - impressive! a -- Alan Green [EMAIL PROTECTED] - http://bright-green.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group

Re: put some initial data in the db

2006-08-02 Thread Alan Green
application_data_.html Alan. > > > Gen > > > > > -- Alan Green [EMAIL PROTECTED] - http://bright-green.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users"

Re: Is AJAX Alone Reason to Use TG?`

2006-08-02 Thread Alan Green
e at the right time and its simplejson module makes short work of servicing AJAX requests. The only hoop I've had to jump through with AJAX is relearning the DOM - I have dabbled in DHTML previously, but the functionality I'm now implementing requires more than dabbling. Alan. -- Alan Gr

Re: recursive transaction support

2006-07-14 Thread Alan Green
- for example, if method a raises an exception, which b catches and doesn't re-raise. a -- Alan Green [EMAIL PROTECTED] - http://bright-green.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users&q