Re: Storing API Passwords

2010-03-02 Thread Dougal Matthews
On 2 March 2010 14:11, hcarvalhoalves wrote: > Sorry, I just saw Twitpic's documentation now [1]. > > What I can say, is that their implementation is a joke. > It's not that simple. Twitpic is usually used by 3rd party programs - not directly. So for example with Tweetdeck, if they wanted to int

Re: Django in the enterprise?

2010-02-24 Thread Dougal Matthews
You may find this thread of django-developers interesting; "What The Enterprise wants from Django" http://groups.google.com/group/django-developers/browse_frm/thread/c89e028a536514d3 It's a discussion about some of the things that Django is missing that the enterprise wants/needs - the good news

Re: allowing other chars in User.username

2010-02-22 Thread Dougal Matthews
On 22 February 2010 11:56, Aljosa Mohorovic wrote: > what are security concerns if username is allowed to contain chars > like ".,;-() " and non-ascii alphabet letters? > will orm still properly escape string before querying the database? > > Aljosa > > In short, yes it will. All strings passed th

Re: Best way to access 'request' in pre_save

2010-02-19 Thread Dougal Matthews
On 19 February 2010 10:27, Paul Stone wrote: > > > That's fine for one or two models. But what if I want to do this for a > > > number of models, in every view? What's the best way to do that > > > without code repetition? > > > > Using a ModelForm? > > > > http://docs.djangoproject.com/en/dev/to

Re: Best way to access 'request' in pre_save

2010-02-19 Thread Dougal Matthews
On 19 February 2010 09:28, Paul Stone wrote: > > > Presumably you have a view which is updating this object. The view has > > access to the HttpRequest. Therefore, the easy, simple, clean and > > elegant way is... to have the view set the value of that field. So do > > that and ignore anyone who

Re: any suggestions for managing DB schema with visual ERD tool?

2010-02-18 Thread Dougal Matthews
On 18 February 2010 00:03, snfctech wrote: > I just built a complicated schema with MySQL workbench and am looking > at Python frameworks to start implementation. > > Does anybody in the Django community do this? What's your practice > for going back and forth between the ERD and the ORM? I saw

Re: template rendering problem plz look at this.

2010-02-17 Thread Dougal Matthews
The django-developers mailing list is for the discussion about the development of django itself, not using django. Please use the django-users mailing list and don't cross post between the two. Dougal On 17 February 2010 09:26, chiranjeevi muttoju < chiranjeevi.mutt...@gmail.com> wrote: > > H

Re: What's the going rate for a Django developer?

2010-01-29 Thread Dougal Matthews
I think the answer to that is probably "it depends". 1. Permanent or contractor? 2. What country? 3. Often it even matters what city? 4. How much experience do they have? It's probably best for you to look at job adverts and see what they are offering. Some listings on http://djangogi

Re: I am new to the Django community

2010-01-26 Thread Dougal Matthews
In a shameless plug, you could try your hand at doing some testing with django. This follows on from the tutorial. http://dougalmatthews.com/articles/2010/jan/20/testing-your-first-django-app/ Otherwise... I'd just read the Django docs - they are fantastic. Read what people post here; http://www.

Re: getting the object with max value

2010-01-25 Thread Dougal Matthews
model.objects.annotate(Max('handicap')).order_by('-handicap__max') I think something like that does what you need. Dougal --- Dougal Matthews - @d0ugal http://www.dougalmatthews.com/ 2010/1/25 Kenneth Gonsalves > hi, > > I have a model 'Player' and

Re: About unit testing

2010-01-22 Thread Dougal Matthews
If you look at the tests in django-shorturls you can see how they created models that were only used for the tests: http://github.com/jacobian/django-shorturls/tree/master/src/shorturls/tests/ --- Dougal Matthews - @d0ugal http://www.dougalmatthews.com/ 2010/1/22 Gabriel Reis > Hi, &g

Re: how to do a form with elements drawn from database (not hard-wired in forms.py)?

2010-01-19 Thread Dougal Matthews
2010/1/18 dk > > Is there a way to do what I'm trying? > > As a totally shameless plug I wrote about this fairly recently; http://dougalmatthews.com/articles/2009/dec/16/nicer-dynamic-forms-django/ I don't quite do the step of the database but show how one can create a form on the fly - it could

Re: Top 10 tips to a new Django developer. correct approach?

2010-01-15 Thread Dougal Matthews
If you want your app to be shipped individually and re-used then you shouldn't use the project name. If you make a reusable app and release it then I want to use it, I don't want to have to include the project namespace, i just want the app. However, its your shipping the project as a whole then i

Re: a request for some brain picking

2010-01-02 Thread Dougal Matthews
2010/1/2 Raja > IMO, it would be useful if we get standard templates for django > libraries that are out there, like django-registration, django- > profiles etc. Since the library offers the models and views, it would > be helpful if the templates are also available. The developer could > then ta

Re: a request for some brain picking

2010-01-02 Thread Dougal Matthews
. Dougal --- Dougal Matthews - @d0ugal http://www.dougalmatthews.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-us...@googlegroups.com. To unsubscribe from this group, send email to dj

Re: Making the case for Django (vs. Drupal)

2009-11-02 Thread Dougal Matthews
2009/10/31 shacker > > Things like the announcement that > whitehouse.gov switched to Drupal just cement the deal in many > managers' minds. > > I can't find the source for this (the original tweeter has protected tweets) but if true its an interesting stat. http://twitter.com/pydanny/status/526

Re: de-facto tagging (was: When do snippets get into Django?)

2009-05-23 Thread Dougal Matthews
/2009, martin f krafft wrote: > also sprach Dougal Matthews [2009.05.23.1103 +0200]: >> I don't think tagging is a particularly hard or non-trivial. > > No. All the more reason to push for a standard and prevent dozens > of different implementations, no? > >> Anyway,

Re: de-facto tagging (was: When do snippets get into Django?)

2009-05-23 Thread Dougal Matthews
s very minimal to the developer that uses it. Dougal --- Dougal Matthews - @d0ugal http://www.dougalmatthews.com/ 2009/5/23 Kai Kuehne > > Hi, > > On Fri, May 22, 2009 at 11:52 PM, Dougal Matthews > wrote: > > Pretty must everybody does seem to use django-tagging unless

Re: de-facto tagging (was: When do snippets get into Django?)

2009-05-22 Thread Dougal Matthews
It doesn't. Why should it? --- Dougal Matthews - @d0ugal http://www.dougalmatthews.com/ 2009/5/22 martin f krafft > also sprach Dougal Matthews [2009.05.22.2352 +0200]: > > Pretty must everybody does seem to use django-tagging unless they have > some > > special weird

Re: de-facto tagging (was: When do snippets get into Django?)

2009-05-22 Thread Dougal Matthews
Pretty must everybody does seem to use django-tagging unless they have some special weird use-case. I've used it every time I've needed tagging and don't have a gripe with it yet. Cheers, Dougal --- Dougal Matthews - @d0ugal http://www.dougalmatthews.com/ 2009/5/22 martin f

Re: When do snippets get into Django?

2009-05-22 Thread Dougal Matthews
moment, with 0.7 coming soon. I think there will then be migration/upgrade support from then onwards. I believe its coming but not sure what stage it kicks in. Pinax includes a huge number of apps, like django-tagging and more are being added. Cheers, Dougal --- Dougal Matthews - @d0ugal http

Re: Using Ajax with django from different domain and technology

2009-05-22 Thread Dougal Matthews
with Django though. However, check out django-piston - it my help. http://bitbucket.org/jespern/django-piston/wiki/Home Cheers, Dougal --- Dougal Matthews - @d0ugal http://www.dougalmatthews.com/ 2009/5/22 googletorp > > Hi > AJAX doesn't care what tech is serving the data as long

Re: django captcha

2009-05-21 Thread Dougal Matthews
wnload. Cheers, Dougal --- Dougal Matthews - @d0ugal http://www.dougalmatthews.com/ 2009/5/21 online > > So i have to install svn on mymachine? Why people make download so > complicated... > > > > > > > On May 20, 10:22 pm, jai wrote: > > svn checkoutht

Re: subscription based web app - want to develop - bounty

2009-05-18 Thread Dougal Matthews
good idea to make a copy on github and interested people will watch/fork etc. Cheers, Dougal --- Dougal Matthews - @d0ugal http://www.dougalmatthews.com/ 2009/5/17 AE : > > Hi > > I have looked enough and failed to identify anything that solves or > like "SaaS railskit"

Re: if number <= othernumber

2009-05-13 Thread Dougal Matthews
27;t stop you having your own template tag that allows it. Or using this one that is on djangosnippets; http://www.djangosnippets.org/snippets/1350/ This is the same all the way up to django 1.1 Cheers, Dougal --- Dougal Matthews - @d0ugal http://www.dougalmatthews.com/ 2009/5/13 richardc

Re: Design Question

2009-05-13 Thread Dougal Matthews
Alex Gaynors talk at EuroDjangoCon will probably help you out with some handy Form tips. The slides are here; http://lazypython.blogspot.com/2009/05/eurodjangocon-2009.html The video should be online somewhere at some point. Cheers, Dougal --- Dougal Matthews - @d0ugal http

Re: What debugger do you use?

2009-05-13 Thread Dougal Matthews
pyDev and Wing IDE - I swap between them for a reason I can't quite fathom. Dougal --- Dougal Matthews - @d0ugal http://www.dougalmatthews.com/ 2009/5/13 Gath : > > I use pyDev for eclipse, i think its the best debugger for Python/ > Django. > > Gath > > On May 1

Re: Security with a solo Administrator?

2009-05-11 Thread Dougal Matthews
Why not use django.contrib.auth and only allow super users to access said pages? Or use django's permission system? Dougal --- Dougal Matthews - @d0ugal http://www.dougalmatthews.com/ 2009/5/11 andrew > > Hi,all > >I'm designing a series of admin pages that only

Re: suggestion on querying external database

2009-05-10 Thread Dougal Matthews
This might be useful; http://docs.djangoproject.com/en/dev/howto/legacy-databases/ It describes how to create models for your existing databases. However, it wont stop you being able to make writes with the django ORM. Dougal --- Dougal Matthews - @d0ugal http://www.dougalmatthews.com/ 2009

Re: Overwrite send_mail

2009-05-10 Thread Dougal Matthews
ually going to SMS I think the more hooks django gives you into replacing/customising like this the better. I might go and see how hard it would be to patch... Cheers, Dougal --- Dougal Matthews - @d0ugal http://www.dougalmatthews.com/ 2009/5/10 Will Hardy > > The test runner doe

Re: "-" in template variables

2009-05-10 Thread Dougal Matthews
>From the docs; "Variable names must consist of any letter (A-Z), any digit (0-9), an underscore or a dot." http://docs.djangoproject.com/en/dev/ref/templates/api/#rendering-a-context I suppose you could write a template tag to handle it or something. Not sure. Dougal --- Do

Re: dynamic form wizards

2009-04-23 Thread Dougal Matthews
nerated from my models. Dougal --- Dougal Matthews - @d0ugal http://www.dougalmatthews.com/ 2009/4/23 Dennis Schmidt > > Hi there, > > I need to dynamically create complex forms in my application. Since > version 1.0 django has these form wizards, which can manage complex >

Re: How to relate child instance to Parent?

2009-04-21 Thread Dougal Matthews
in #1 I think you meant; user.save() staff = Staff() staff.user = user staff.save() That might work. Otherwise, I'm not sire. Cheers, Dougal --- Dougal Matthews - @d0ugal http://www.dougalmatthews.com/ 2009/4/21 Joshua Partogi > > Darn, > > It's really difficul

Re: How to relate child instance to Parent?

2009-04-20 Thread Dougal Matthews
dding to the user object is here; http://docs.djangoproject.com/en/dev/topics/auth/#storing-additional-information-about-users You might find that way easier. Cheers, Dougal --- Dougal Matthews - @d0ugal http://www.dougalmatthews.com/ 2009/4/20 Joshua Partogi : > > Dear all, &g

Re: Models Aliases

2009-04-20 Thread Dougal Matthews
why don't you just access entry.author rather than entry.user? I think perhaps I'm not quite following your question. Dougal --- Dougal Matthews - @d0ugal http://www.dougalmatthews.com/ 2009/4/20 Bastien > > Hi, > > I searched the doc but couldn't find anything a

Re: euro djangocon talks

2009-04-20 Thread Dougal Matthews
Probably best to ask @djangocon or @robertlofthouse on twitter. Cheers, Dougal --- Dougal Matthews - @d0ugal http://www.dougalmatthews.com/ 2009/4/20 Aljosa Mohorovic : > > anybody has any information about possible euro djangocon talks? > or any idea when will talks schedule be

Re: User Profile Problem

2009-04-07 Thread Dougal Matthews
Why do you want to change the User model? This might be a useful read for you if you want to store more info about a user... http://docs.djangoproject.com/en/dev/topics/auth/#storing-additional-information-about-users Dougal --- Dougal Matthews - @d0ugal http://www.dougalmatthews.com/ 2009/4

Re: Beginner's Help needed

2009-04-05 Thread Dougal Matthews
It depends how you mean combine really. You can have them both running on the same server, you can have them share the same database (then you can still manage it with django) Dougal --- Dougal Matthews - @d0ugal http://www.dougalmatthews.com/ 2009/4/5 atik > > Ok. Again Thanks. I w

Re: How do i use dojo in my Django application

2009-04-02 Thread Dougal Matthews
#x27;s the case then you will want to decide how you are going to pass data. You can then just make your views return the appropriate data, be that chunks of HTML, JSON or XML etc. Dougal --- Dougal Matthews - @d0ugal http://www.dougalmatthews.com/ 2009/4/2 Gath > > All, > > I ha

Re: Django Tutorial, Part 3

2009-04-02 Thread Dougal Matthews
Daniel and everybody else can see my reply like I can see your reply to him ;) Just so you know you don't need to reply to each of us individually... Dougal --- Dougal Matthews - @d0ugal http://www.dougalmatthews.com/ 2009/4/2 Loewe, Rosemarie > Hello Daniel, > > just I

Re: Django Tutorial, Part 3

2009-04-02 Thread Dougal Matthews
You error is in urls.py You have; *include('mysite/polls/urls')),* you should have; *include('mysite.polls.urls')),* The path is written python module style (with dots) rather than directory style (with slashes) Dougal --- Dougal Matthews - @d0ugal http://www.dougalmatth

Re: how to django to request a page of the other domain

2009-04-01 Thread Dougal Matthews
It depends what data your fetching I suppose but you might just want to use urllib? JavaScript triggers a view that makes a request to the remote server and outputs the result to your javascript. Dougal --- Dougal Matthews - @d0ugal http://www.dougalmatthews.com/ 2009/4/1 Albert > >

Re: Modifu request.user

2009-03-31 Thread Dougal Matthews
Why do you want to change the request object? Why are you trying to store a user object? Perhaps you want to store it in a session? I think you should explain what you are trying to do. Dougal --- Dougal Matthews - @d0ugal http://www.dougalmatthews.com/ 2009/3/31 Masarliev > > yes it

Re: Is Django right for me?

2009-03-31 Thread Dougal Matthews
Django uses an ORM - so you don't (usually) need to query the database directly. Why don't you go through the Django tutorial and try it out? http://docs.djangoproject.com/en/dev/#first-steps Dougal --- Dougal Matthews - @d0ugal http://www.dougalmatthews.com/ 2009/3/31 D

Re: Is Django right for me?

2009-03-31 Thread Dougal Matthews
spend all your time working on the website itself rather than repeating (or self maintaining) the building blocks. I moved over from PHP and haven't looked back. Dougal --- Dougal Matthews - @d0ugal http://www.dougalmatthews.com/ 2009/3/31 Dotan Cohen > > I have been writing w

Re: QuerySet.only()?

2009-03-30 Thread Dougal Matthews
I think you are looking for get() facilityList = Facility.objects.get(name = facilityName) http://docs.djangoproject.com/en/dev/topics/db/queries/#field-lookups Dougal --- Dougal Matthews - @d0ugal http://www.dougalmatthews.com/ 2009/3/30 famousactress : > > Hello folks. I&#x

Re: Installing Django

2009-03-28 Thread Dougal Matthews
Your not giving us anything to go on here. How far do you get? do you get any errors? I am assuming you followed the very detailed instructions here; http://docs.djangoproject.com/en/dev/topics/install/#topics-install Dougal --- Dougal Matthews - @d0ugal http://www.dougalmatthews.com

Re: Django wont display images on my CSS file

2009-03-27 Thread Dougal Matthews
Isn't it just because you don't have quotes around the image address? background: url('/site_media/header_background.gif') no-repeat top left; Dougal --- Dougal Matthews - @d0ugal http://www.dougalmatthews.com/ 2009/3/27 Brian Neal : > > On Mar 27, 7:33 am, Gath

Re: 1 django project, 2 targets (fastcgi and GAE) - best practices?

2009-03-25 Thread Dougal Matthews
I've never actually tried this but i often hear it mentioned. It may do what you need (or at least, help)... http://code.google.com/p/google-app-engine-django/ Dougal --- Dougal Matthews - @d0ugal http://www.dougalmatthews.com/ 2009/3/25 cgarvey : > > Hi, > > Does anyon

Re: Map events in space on a django app

2009-03-20 Thread Dougal Matthews
You might find this useful. It's an app aimed at google map usage with django. http://code.google.com/p/django-googlemap/ Dougal --- Dougal Matthews - @d0ugal http://www.dougalmatthews.com/ 2009/3/20 Alessandro : > > On Fri, Mar 20, 2009 at 3:23 AM, Andy Mckay wrote: >&g

Re: simple venue representation

2009-03-18 Thread Dougal Matthews
If you just want to store the location you could just store the address or latitude and longatude in the model? I think GeoDjango has way more than you'll need unless your missing out some features... Dougal --- Dougal Matthews - @d0ugal http://www.dougalmatthews.com/ 2009/3/18 Viktor

Re: Model inheritance vs. User.get_profile()

2009-03-17 Thread Dougal Matthews
http://www.google.co.uk/search?q=django+extending+user (granted, lots of it is old) Dougal --- Dougal Matthews - @d0ugal http://www.dougalmatthews.com/ 2009/3/17 ntoll > > Guys, > > Asking for advice here. > > What is the best way to extend the User class in > django.con

Re: Username Blacklist

2009-03-17 Thread Dougal Matthews
--- Dougal Matthews - @d0ugal http://www.dougalmatthews.com/ 2009/3/17 Andrew Turner > > 2009/3/17 P M : > > why don't you use > > ABSOLUTE_URL_OVERRIDES = { > >'auth.user': lambda o: "/user/%s/" % o.username, > > } >

Re: Setting up Facebook Connect for your test environment

2009-03-17 Thread Dougal Matthews
http://123.123.123.123/xd_reciever/ ? However, you will need to make the django dev server viewable externally (other than from the localhost) - I'm not sure how/if you can do that. Dougal --- Dougal Matthews - @d0ugal http://www.dougalmatthews.com/ 2009/3/17 Roboto > > Hey guys, >

Re: User, Auth, Group

2009-03-17 Thread Dougal Matthews
Indeed, the admin doesn't really enforce this. The admin is for trusted users and thus the filter just helps people out but isn't for security. You would be better building your custom admin I think. If you start using model forms etc. its not really that hard. Dougal --- Douga

Re: User, Auth, Group

2009-03-17 Thread Dougal Matthews
they edited. I wrote an example of that here; http://blog.dougalmatthews.com/2008/10/filter-the-django-modeladmin-set/ Dougal --- Dougal Matthews - @d0ugal http://www.dougalmatthews.com/ 2009/3/17 Bro > > Hi, > > I am using the User model with additional information. This model is

Re: Port in use Error

2009-03-16 Thread Dougal Matthews
It means another program is using the port you are trying to use. Do you have another server running? or skype by any chance? If you can still view the website in the browser, its not a problem. If you can't you should use another port or close the program using the same port. Dougal --- D

Re: Strip empty lines in rendered templates?

2009-03-16 Thread Dougal Matthews
aware of is it messes up some tags, like and Dougal --- Dougal Matthews - @d0ugal http://www.dougalmatthews.com/ 2009/3/16 Benjamin Buch > > Thank you for your replies! > > What I essentially want to do is: > 1: Keep the template output readable for the frontend coder I&

Re: Simple sites framework question

2009-03-16 Thread Dougal Matthews
I think these are the relevant docs you need; http://docs.djangoproject.com/en/dev/topics/db/queries/#related-objects Dougal --- Dougal Matthews - @d0ugal http://www.dougalmatthews.com/ 2009/3/16 bax...@gretschpages.com > > In my model, I've got > >sites = models.Man

Re: latitude/longitude field type

2009-03-16 Thread Dougal Matthews
That looks very cool for me and quite useful but I don't think the django-googlemap supports the DMS format. Also its not Django 1.0 ready. Sergio, Don't you just want to create a custom field with a regular expression validator for DMS? Dougal --- Dougal Matthews - @d

Re: Where do we put our templates?

2009-03-15 Thread Dougal Matthews
Correct, basically as long as Python can access it your all good. Just put it somewhere that makes sense. Dougal --- Dougal Matthews - @d0ugal http://www.dougalmatthews.com/ 2009/3/15 Joshua Partogi > > Thanks Doug. > > I kinda get the gist now. It seems that template is parse

Re: Vanity urls: Eg mysite.com//....

2009-03-15 Thread Dougal Matthews
Hi, I've used a similar approach once - works fine. Although, you might want to sacrifice such a short url for something that is easier to read/understand that 'u' and 'g'. Cheers, Dougal --- Dougal Matthews - @d0ugal http://www.dougalmatthews.com/ 2009/3/15 ldm9

Re: Strip empty lines in rendered templates?

2009-03-15 Thread Dougal Matthews
Something like this might be able to help you? http://www.davidcramer.net/code/369/spaceless-html-in-django.html Dougal --- Dougal Matthews - @d0ugal http://www.dougalmatthews.com/ 2009/3/15 Benjamin Buch > > Hi, > > is there a way to tighten up the output that Django renders?

Re: Where do we put our templates?

2009-03-14 Thread Dougal Matthews
You can put them where you want but generally they go inside the application folder that uses that template. You may find this an interesting/helpful read; http://www.djangobook.com/en/2.0/chapter04/ Dougal --- Dougal Matthews - @d0ugal http://www.dougalmatthews.com/ 2009/3/14 Joshua

Re: Localize URLs

2009-03-12 Thread Dougal Matthews
OH yeah, Make sure you look at the cms2 branch in SVN. It's wy better!<http://trac.django-cms.org/trac/browser/branches/django-cms2> http://trac.django-cms.org/trac/browser/branches/django-cms2 Cheers, Dougal --- Dougal Matthews - @d0ugal http://www.dougalmatthews.com/ 2009/3

Re: Localize URLs

2009-03-12 Thread Dougal Matthews
rstand the > readability argument I don't know if it's a good idea technically > speaking. Any help, point of view, documentation, already exisiting > app would be welcome. > > Thanks > > > > -- Sent from my mobile device --- Dougal Matthews - @d0ugal h