style guide/autoformatter/linter for Django templates?

2009-11-27 Thread Steve Howell
I am wondering if there is a style guide anywhere for writing Django templates. Also, are there programs to automatically format your templates...to indent block tags, for example? I know there are autoformatters for HTML, but I am not aware of any tools that handle Django tags. Also, it would b

Re: Stuck with simple query

2009-11-28 Thread Steve Howell
On Nov 28, 8:36 am, Benjamin Wolf wrote: > Hi, > > I'm trying to create a query like this with django: > SELECT count(*) As total FROM `disposal` group by(salesman_id) > > This gives me the number of total sales for every salesman. > In django I tried this: > data = Disposal.objects.annotate(tota

Re: A Design Question

2009-11-29 Thread Steve S.
This /is/ outside the scope of Django. "Database normalization" and "Database design" are the google query you're looking for to learn more about this, though. Here are some links that may steer you in the right direction: http://en.wikipedia.org/wiki/Database_normalization http://databases.about

Re: Chart tool

2009-11-29 Thread Steve S.
For in-page charts, I use flot, as Javier suggested. I plan to look into pycha based on Skylar's suggestion, though. There is no need for client-side chart drawing with my use case. On Nov 25, 3:31 pm, Javier Guerra wrote: > reportlab allows you to generate PDFs, which can be as high quality as

Re: how to get remote port number

2009-11-29 Thread Steve Holden
h as you have observed the Django administrator can configure the server to listen on any desired port. But the client really doesn't care - it just expects the server to reply to the same port number it sent its request from. regards Steve -- Steve Holden+1 571 484 6266 +1 800 494 311

Re: how to get remote port number

2009-11-29 Thread Steve Holden
On Sun, Nov 29, 2009 at 8:33 PM, Nick Arnett wrote: > On Sun, Nov 29, 2009 at 4:01 PM, Steve Holden wrote: > > >> >>> Not at all. The client will typically use an "ephemeral" port (one it >> obtains by saying to its local TCP layer "gimme a p

Re: style guide/autoformatter/linter for Django templates?

2009-11-30 Thread Steve Howell
Just following up on this a few days later, in case it got lost in the shuffle due to the weekend and U.S. holiday. On Nov 27, 2:18 pm, Steve Howell wrote: > I am wondering if there is a style guide anywhere for writing Django > templates.  Also, are there programs to automatically forma

Re: style guide/autoformatter/linter for Django templates?

2009-12-01 Thread Steve Howell
On Dec 1, 3:33 am, Tom Evans wrote: > On Tue, Dec 1, 2009 at 7:33 AM, Steve Howell wrote: > > Just following up on this a few days later, in case it got lost in the > > shuffle due to the weekend and U.S. holiday. > > > On Nov 27, 2:18 pm, Steve Howell wrote: > >

announcement: SHPAML (alternative to haml)

2009-12-19 Thread Steve Howell
hanks, Steve -- 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, v

Looking to hire Django developers in Pleasantville NY

2010-04-22 Thread Steve Bywater
Hopefully it's ok to post job openings here... The team that brought you HudsonValleyHelpWanted.com and 300+ other job boards around the US and Canada and Cupid.com (and then sold it all... yes those were options you wished you were in on) has started a new project: 10LocalCoupons.com! We're look

change an object from parent to child

2010-05-04 Thread Steve Bywater
Given... class Place(models.Model): name = models.CharField(max_length=50) class Restaurant(Place): serves_hot_dogs = models.BooleanField() ...it is trivial to create either a place or restaurant. But how do you take an instance that is already a place and create a restaurant from it? Is

Re: change an object from parent to child

2010-05-05 Thread Steve Bywater
child Supervisor class from its parent Employee class. I could do this directly through sql by creating a record in app_supervisor setting employee_ptr_id to the id of the app_employee record, but I'm hoping that django has more direct support for migrating a parent object to a child object. -

Re: How to reload an object's member field?

2010-05-14 Thread Steve Bywater
I needed to do something similar just yesterday, and did it the same way you discovered. I agree, kinda weird: foo = Foo.objects.get(foo.id) On May 13, 12:25 pm, Chia Hao Lo wrote: > I have a model Foo. If I've got a model instance foo, and I know that > foo.value may be changed after I got it.

DjangoCon Early Bird Regstrations End Soon!

2010-06-07 Thread Steve Holden
Django users: If you are coming to DjangoCon 2010 (in Portland, OR from September 7-9) then you should sign up soon to get early bird savings on your registration. Early bird pricing closes on June 8! http://djangocon.us/ Hope to see you there! regards Steve -- You received this message

Re: Get all tables in one query that use OneToOne relationship

2010-07-17 Thread Steve Holden
CREATE VIEW AS ), joining all the necessary tables, that Django could then treat as a (preferably read-only) model to give you access to the joined tables? If you are competent enough to write a special-purpose Manager to load the columns lazily when the code requested them. regards Steve > >

Re: URL to specify when accessing subdomains using Django

2010-07-17 Thread Steve Holden
t; > Please forgive my ignorance in this matter. > Servers in different subdomains are different sites, so you may want to read up about Django's sites framework. http://docs.djangoproject.com/en/dev/ref/contrib/sites/ regards Steve -- Steve Holden +1 571 484 6266 +1

Re: Which Python are people using on OSX?

2010-07-19 Thread Steve Holden
And don't consider replacing the OS X standard Python with your own, as there is no guarantee that any other version will run standard OS X functionality. regards Steve On 2/6/2009 2:05 PM, Graham Dumpleton wrote: > > > > On Feb 6, 9:27 pm, "Adam Radestock" wrote

Re: Working with URL Fields in django test.

2010-07-26 Thread Steve Holden
here a good fix for this? > Start a local server and access that? regards Steve -- 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,

Re: how to create a custom django template filter(please help)

2010-07-26 Thread Steve Holden
#x27;customTags' is not a valid tag library: Could > not load template library from django.templatetags.customTags, No > module named customTags > > > if u know please tell me > It's very unlikely that you are actually using Django 0.96, so perhaps you should be reading

Re: Stability of auto IDs

2010-07-27 Thread Steve Holden
tly look things up by primary key across relationships: to select a user or a product then selection on the other attributes leads to a much more satisfactory user experience. POOR: Change the price of widget #345,231 to $3.14 GOOD: Change the price of the "2 cm left-handed tap widget&

Re: Stability of auto IDs

2010-07-27 Thread Steve Holden
could it? A dump includes the numerical values for the foreign keys, so the related primary keys have to stay the same to maintain relational integrity. regards Steve -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, s

Re: ModelChoiceField Question

2010-08-01 Thread Steve Holden
filter(user=user) > You can, but shouldn't you be calling the suplerclass's __init__() as well do make sure any necessary initialization gets performed? Of course there is no reason (except efficiency) that says the form has to be constructed once, and no reason why it can't be create

Re: django_session not in "default" DB

2010-08-02 Thread Steve Holden
That was a simple typo in Dennis' reply. Use \ if model == 'Session' instead and that error will disappear. regards Steve On 7/30/2010 1:03 PM, Jocelo wrote: > Hi, Thanks for your previous reply. I'm still having problems... now > I'm getting the

Re: through/unique_together usage

2010-08-02 Thread Steve Holden
Yes. regards Steve On 8/2/2010 5:55 AM, Dave wrote: > Each patient can have multiple images. Each image can only be of a > single patient. Have I got the model wrong? Should it be a ForeignKey > in ImageRecord to Patient? > > On Jul 29, 6:06 pm, Dennis Kaarsemaker wrote: >&

Re: Which program will run when we execute "djano-admin.py startproject mysite" command?

2010-08-02 Thread Steve Holden
that your system is conditioned to run the Python interpreter on programs with the ".py" extension. Otherwise you need to run python c:\PythonXX\Scripts\django-admin.py ... and make sure that the Python interpreter is found on your path. regards Steve On 8/2/2010 12:03 PM, balu wrote:

Re: Splitting LONGTEXT column to its own table?

2010-08-02 Thread Steve Holden
if necessary, you could create properties in the original model > to map the names you have in your application. > > Just my 2 cents. > Another alternative would be to create a view of the joined tables using SQL CREATE VIEW, then treat the view as a table in Django. You do have to be c

Re: djangoproject.com inaccessible?

2010-08-02 Thread Steve Holden
ome with a guarantee, I wonder ... regards Steve -- 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...@google

Re: is it possible to pass a dynamic list of choices to a select widget?

2010-08-03 Thread Steve Holden
he code you present whether create_choices() is supposed to be a function or a method. It refers to self, but it's not obvious how that reference is satisfied. If it's a form method then it should take self as an argument. So it's hard to suggest what will work, but I hope I have

Re: Django, Rails but a cost to pay ?

2010-08-03 Thread Steve Holden
On 8/3/2010 10:19 AM, didier rano wrote: > What do you think about this post > ? http://blog.skeedy.com/django-rails-but-a-cost-to-pay I'd say the whole thing looks like flame bait. When it isn't wrong it's obvious, and when it isn't obvious it's wrong. regard

Re: help

2010-08-03 Thread Steve Holden
h there is nothing to stop GUI based programs using the same database). Netbeans is OK, but how does this relate to Python or Django? Both Wing IDE (commercial) and Eclipse/pydev (open source) offer excellent support for creating and debugging Django apps. regards Steve -- You received this me

Re: is it possible to pass a dynamic list of choices to a select widget?

2010-08-03 Thread Steve Holden
On 8/3/2010 11:12 AM, shofty wrote: > Steve, > > the choices are different for each product in the shop. > some choices are clothing sizes, some physical sizes etc. > > So with that in mind i could go with a bunch of choices hooked up to a > choices field if i can tell

Re: convert mysql database tables into classes of model.py file

2010-08-03 Thread Steve Holden
tabase tables with fields > into a modey.py to create class? > > Thanks > http://docs.djangoproject.com/en/dev/ref/django-admin/#inspectdb You should expect to perform some tweaking on the output, however, as it's difficult for the system to introspect every detail. regards Steve --

Re: modify default admin action - delete_selected

2010-08-03 Thread Steve Holden
ount the books each person has. I presume you have specific efficiency reasons for designing your database with redundant data in it? ("Yes" Is an acceptable answer to this question ...) regards Steve -- You received this message because you are subscribed to the Google Groups "

Re: how to make readonly in change but editable in add?

2010-08-04 Thread Steve Holden
) as: class roForm(forms.Form): def __init__(self, *args, **kwargs): self.readonly = 'readonly' in kwargs if self.readonly: kwargs.pop('readonly') super(roForm, self).__init__(*args, **kwargs) if self.readonly: for key in se

Re: djangoproject access fields of object dynamically

2010-08-04 Thread Steve Holden
ogrammatically by name. I suspect you want for field in allowed_fields: setattr(obj, field, getattr(individual, field)) regards Steve -- I'm no expert. "ex" == "has-been"; "spurt" == "drip under pressure" "expert" == "has-been drip under pre

Re: Strange error overriding changelist_view in ModelAdmin

2010-08-04 Thread Steve Holden
Settings.objects.all()[0].id) > return super(SettingsAdmin, self).change_view(self, request, > object_id, extra_context=None) > Congratulations nevertheless on moving so quickly from "that's a strange error" to "wow, I can fix this!". regards Steve -- I'm no e

Re: View Decorator

2010-08-04 Thread Steve Holden
r. That takes the decorated function as its single argument and returns the decorated function. This is getting a little complex for a beginner. regards Steve -- I'm no expert. "ex" == "has-been"; "spurt" == "drip under pressure" "expert" ==

Re: Django, Rails but a cost to pay ?

2010-08-04 Thread Steve Holden
I don't believe anybody *was* offended - the OP asked "What do you think about this post ?", and he got sincere responses that would, if taken to heart, help to improve that post. regards Steve On 8/4/2010 11:35 AM, Sithembewena Lloyd Dube wrote: > Surprising that anybody wo

Re: Django, Rails but a cost to pay ?

2010-08-04 Thread Steve Holden
On 8/4/2010 1:38 PM, didier rano wrote: > Back to django development ? > Probably the best idea. regards Steve -- I'm no expert. "ex" == "has-been"; "spurt" == "drip under pressure" "expert" == "has-been drip under pressure&

Re: django mail_admins source code

2010-08-05 Thread Steve Holden
lid(), it is much better to read the data out of the > form.cleaned_data dictionary than directly from the POST as Django > takes care of type coercion, etc. > Good point. regards Steve > Euan > > On Aug 5, 10:31 am, kostia wrote: >> I have a contact form on my sit

Re: Question on databases

2010-08-05 Thread Steve Holden
those who have. > Define "massive". It's usually best to start with one database, and optimize as the load requires. Otherwise you might find yourself optimizing areas where performance is already adequate. regards Steve -- I'm no expert. "ex" == "has-been

Re: View Decorator

2010-08-05 Thread Steve Holden
I don't know whether it will help, but it seems that it isn't the top-level urls.py that the error is complaining about but the one in your persons app. Presumably the top-level urlconf includes that? As to why applying a decorator should trigger the problem, I am a bit stumped. rega

Re: admin framework help

2010-08-05 Thread Steve Holden
ems to be what you are asking about. regards Steve -- I'm no expert. "ex" == "has-been"; "spurt" == "drip under pressure" "expert" == "has-been drip under pressure". -- You received this message because you are subscribed to the Goo

Re: TemplateDoesNotExist: 500.html error when trying to run server

2010-08-05 Thread Steve Holden
ly appreciate some > help. > Do you have the DEBUG setting at False? I thought 500 errors would give a traceback rather than print a 500 response when DEBUG was true. You appear to be getting the error because some part of your logic is raising an uncaught exception. In order to return

Re: Python question about subprocess.Popen() and stdout

2010-08-05 Thread Steve Holden
es() inherently has to see the end of the data stream before it can return a list of all the lines that the data stream contains, so that's hardly surprising is it? Try using readline() in a loop and see if that gives you better results. I don't guarantee it will, but at least you will hav

Re: For tag fails in template

2010-08-06 Thread Steve Holden
On 8/6/2010 1:23 PM, kostia wrote: > The question of clarity: > > What is the best way to do: > project.pk > or > project.id > ? > Well, pk will always work no matter what the field is named, so I tend to prefer that. It's mostly a matter of style, though. regards

Re: queryset field order

2010-08-06 Thread Steve Holden
() and then iterate over that? http://stackoverflow.com/questions/2170228/django-iterate-over-model-instance-field-names-and-values-in-template might give you some ideas. regards Steve > On Aug 6, 10:18 am, Daniel Roseman wrote: >> On Aug 6, 6:08 pm, owidjaya wrote: >> >>

Re: TemplateDoesNotExist: 500.html error when trying to run server

2010-08-06 Thread Steve Holden
On 8/6/2010 3:59 PM, meenakshi wrote: > Hi Steve, > I do have the DEBUG setting on False. The reason is that when I > set DEBUG to True, I get the following message: > > > Page not found (404) > Request Method: GET > Request URL: http://127.0.0.1:8000/ >

Re: Footer dynamic data

2010-08-06 Thread Steve Holden
but I'm django newbie, so please, > keep your pulse. > The usual way to do this is by using a context processor. This is very well explained in the following bog post by James Bennett: http://www.b-list.org/weblog/2006/jun/14/django-tips-template-context-processors/ regards St

Re: Footer dynamic data

2010-08-06 Thread Steve Holden
On 8/6/2010 5:40 PM, kostia wrote: > Great, it works and is easy to understand. And that is despite an old > article. > Thank you, man. > No problem. I found out about them pretty much the same way you just have :) -- I'm no expert. "ex" == "has-been"; "spurt" == "drip under pressure" "expert" ==

Re: Linkedin Search

2010-08-07 Thread Steve Holden
ow this relates to Django. This list is busy enough with on-topic questions, so it is helpful if everyone can confine their inquiries to Django matters. regards Steve -- I'm no expert. "ex" == "has-been"; "spurt" == "drip under pressure" "expert&quo

Re: question about urlpatterns

2010-08-07 Thread Steve Holden
ws the matching of URLs with no corresponding views, since there is no longer anything limiting the first path component to "boys" or "girls". regards Steve -- I'm no expert. "ex" == "has-been"; "spurt" == "drip under pressure&

Re: how to query foreign keys down more than one level

2010-08-07 Thread Steve Holden
h.objects.filter(chapter__book__library__branch='Covent Garden') and so on. If you are dealing with an existing database whose column names cannot be changed you can use the db_column attribute, as in: chapter=models.ForeignKey(Chapter,related_name="paragraphs",

Re: how to query foreign keys down more than one level

2010-08-07 Thread Steve Holden
On 8/7/2010 5:04 PM, rmschne wrote: > Thanks to Steve and Daniel. Cool. > > I'm learning as I go about naming fields. Going back and fixing where > possible (but sometimes a lot of work). Agree right to do the first > time; but learning! > And don't expect to get e

Re: Search Field on All Pages

2010-08-08 Thread Steve Holden
mplates/#template-inheritance regards Steve -- I'm no expert. "ex" == "has-been"; "spurt" == "drip under pressure" "expert" == "has-been drip under pressure". -- You received this message because you are subscribed to the Goog

Party Time at DjangoCon

2010-08-08 Thread Steve Holden
Thanks to our sponsors for this: http://djangocon.us/blog/2010/08/08/party-time-djangonauts/ regards Steve -- I'm no expert. "ex" == "has-been"; "spurt" == "drip under pressure" "expert" == "has-been drip under pressure".

Re: Django interactive shell shows invalid datetime

2010-08-08 Thread Steve Holden
;ll guess that your time zone is ten hours away from Chicago. Django uses the zone from the settings.py file., regards Steve -- I'm no expert. "ex" == "has-been"; "spurt" == "drip under pressure" "expert" == "has-been drip under pressure

Re: Registration

2010-08-09 Thread Steve Holden
tly, their email addresses). What is "a foreign email address"? regards Steve -- I'm no expert. "ex" == "has-been"; "spurt" == "drip under pressure" "expert" == "has-been drip under pressure". -- You received this messa

Re: MySQL-Python and Python 2.7

2010-08-11 Thread Steve Holden
. regards Steve On 8/11/2010 7:48 PM, Sithembewena Lloyd Dube wrote: > Cootetom, there's nothing wrong with using Python 2.6 (which I would > prefer) except that the current 2.x download on the Python site is that > of 2.7. > > On Thu, Aug 12, 2010 at 12:24 AM, cootetom <

Re: dynamic forms and custom methods

2010-08-12 Thread Steve Holden
se them. Surely the important thing is the weightings and their relative values. You can simply divide each weighting by the sum of all weightings before you apply them. regards Steve > On Aug 11, 3:58 pm, Nick wrote: >> Are you trying to create a save function that evaluates all the >> wei

Re: Many to many fields to string

2010-08-12 Thread Steve Holden
he browsers don't care. You can omit the irrelevant whitespace in your output using the {% spaceless %} tag - see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#spaceless So my own personal taste is to lay everything out for maximum ease of understanding. regards S

Re: csv files

2010-08-13 Thread Steve Holden
starting at the end of the file - did you see no data at all? regards Steve -- DjangoCon US 2010 September 7-9 http://djangocon.us/ -- 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...@googl

Re: Different Django instances running on the same server

2010-08-13 Thread Steve Holden
by the Host: header coming on from the clients then you will have to front-end them with a redirecting server, in much the way that Web Faction do. It's quite possible, but it needs a little more work to put that extra layer in. regards Steve -- DjangoCon US 2010 September 7-9 http://djangoc

Re: Using localhost in MEDIA_URL causing very slow django

2010-08-16 Thread Steve Holden
the page I tried changing the setting to 127.0.0.1 as well > and for some reason the problem went away. > > I'm curious to know if someone know why this was a problem?¨ > I would suspect a DNS issue - though this doesn't off-hand explain to me why the page loaded so quickly the f

Re: Foreignkeys and variables in a view

2010-08-16 Thread Steve Holden
; {% endif %} > > The problem is the candidate for loop returns the exact same > candidates for every single race. How do I get it so that the > candidates query is specific to the race in the for loop? > First of all, note that you are setting candidates in a for loop. So what

Re: mod_wsgi and first django app

2010-08-16 Thread Steve Holden
Congratulations! Don't worry about sounding "stupid". Most people will make allowances for the fact that you are writing in a foreign language. regards Steve On 8/16/2010 9:56 PM, John Yeukhon Wong wrote: > I added the wsgi scripts and incluced that in my views.py > It work

Re: Foreignkeys and variables in a view

2010-08-16 Thread Steve Holden
e.objects.select_related().filter(type=rtyp) # then whatever you decide needs to be done with the races Hope this helps. regards Steve > How do I limit the candidate_set(s) for each race to the statuses > mentioned above? I have a very duct taped solution in my template but >

Re: Foreignkeys and variables in a view

2010-08-16 Thread Steve Holden
{% for race in state_races %} {{race.name}} - {{race.type}} {% for cand in race.cands %} {{ cand.name }} - {{cand.id }} {% endfor %} {% endif %} I am pretty sure this isn't the recommended way to proceed, but with luck someone on the list will advise us as to what is ... regards Steve >

Re: Another question: how to apply custom variable into django template automatically?

2010-08-17 Thread Steve Holden
t; Thank you! > Indeed, James Bennett has already written exactly the blog entry you need. It shows you how to write a context manager, which will allow you to inject common material into the context of every request: http://www.b-list.org/weblog/2006/jun/14/django-tips-template-context-processors

Re: passing parameter from view to template

2010-08-17 Thread Steve Holden
ht not contain an integer you will need error checking and handling. If it's actually verified by the urlconf pattern, however, then errors won't occur. regards Steve -- DjangoCon US 2010 September 7-9 http://djangocon.us/ -- You received this message because you are subscribed to the Go

Re: passing parameter from view to template

2010-08-17 Thread Steve Holden
.. > > > thus I think zxc was empty, but i may be wrong... > > > waiting again for suggestions. tanks. > OK, so what URL are you using to access this page, and what does the corresponding entry in your urlconf (urls.py) look like? regards Steve > On 17 Ago, 20:22, Ste

Re: Django Setup

2010-08-17 Thread Steve Holden
gt; django-admin.py is not an executable? > > Am I suposed to be in the pyrhon interpreter? > Usually you just invoke the python interpreter with the arguments given, as in python django-admin.py startproject mysite This should work, because python is available (otherwise you would not

Re: Django Setup

2010-08-17 Thread Steve Holden
gt; django-admin.py is not an executable? > > Am I suposed to be in the pyrhon interpreter? > Oops. Sorry, read "manage.py" where you said "django-admin.py". Please ignore the first response. regards Steve -- DjangoCon US 2010 September 7-9 http://djangocon.us/ -- Yo

Re: Displaying images

2010-08-19 Thread Steve Holden
p in the generated HTML there? It's possible that MEDIA_URL isn't being included in the request context. regards Steve -- DjangoCon US 2010 September 7-9 http://djangocon.us/ -- You received this message because you are subscribed to the Google Groups "Django users" grou

Re: Displaying images

2010-08-19 Thread Steve Holden
render_to_response() function allows you to provide additional context through its "context_instance" argument. By creating a RequestContext form the request and passing it to render_to_response() you ensure that MEDIA_URL is available to the template. regards Steve > On Thu, Aug 19,

Re: admin interface titles

2010-08-20 Thread Steve Holden
uot;Categories" and you should be good to go. See http://docs.djangoproject.com/en/dev/ref/models/options/ for more options. regards Steve -- DjangoCon US 2010 September 7-9 http://djangocon.us/ -- You received this message because you are subscribed to the Google Groups "Django users"

Re: django-admin.py cleanup large scale

2010-08-20 Thread Steve Holden
lete these rows without using the cleanup function. This would allow you to delete them in chunks small enough to have much lower impact on the database. regards Steve -- DjangoCon US 2010 September 7-9 http://djangocon.us/ -- You received this message because you are subscribed to the Google

Re: Path mess

2010-08-21 Thread Steve Holden
, e)) > ImportError: Could not import settings 'myproject.settings' (Is it on > sys.path? Does it have syntax errors?): No module named > myproject.settings > > Is it on sys.path? Yes Sir, i appended to sys.path > Does it have syntax errors? I believe not Sir. > > An

Re: Need some help with URL layout

2010-08-21 Thread Steve Holden
huge database queries except when you try to rank across all countries. regards Steve > Widoyo > > On Aug 21, 7:35 am, Uwe Schuerkamp wrote: >> ranking/de/hf Country: Germany, District: Herford (I'll be using >> german number plates here to discriminate among d

Re: check email duplication at registration

2010-08-21 Thread Steve Holden
his email address has been > registered with an existing user.') > > > > How should I rewrite it properly? Thanks!! > Shouldn't clean_email() be a method of the form it's a part of? You appear to have written it as a stand-alone function, so it probably isn&

Re: Trouble comparing variables in a view

2010-08-21 Thread Steve Holden
sight into why the equality comparison is failing. And be prepared to learn that the comparison *isn't* failing, but that the logic guarded by the if is not operating the way you think it does. regards Steve -- DjangoCon US 2010 September 7-9 http://djangocon.us/ -- You received this messa

Re: check email duplication at registration

2010-08-21 Thread Steve Holden
At the moment they are functions, and Django has no way of knowing they "belong"to the form. regards Steve > Full source code > > > > /code begins > > > > > import re > from django import forms > from django.contrib.auth.models import U

Re: DJANGO + Google App Engine, Getting Started Tutorial

2010-08-23 Thread Steve Holden
ntation flaws you find should be reported to > Google, not to us. > And, by the way, that's "Django", not "DJANGO" - it isn't an acronym, it's a tribute to a gypsy guitarist. regards Steve -- DjangoCon US 2010 September 7-9 http://djangocon.us/ -- You rec

Re: Best practice for auth.User/UserProfile division?

2010-08-23 Thread Steve Holden
o.contrib.auth.models.User instance. The recommended one-to-one relationship between User and UserProfile allows you to ensure that there is only one profile per user. regards Steve -- DjangoCon US 2010 September 7-9 http://djangocon.us/ -- You received this message because you are subscribed to

Re: How does Django handle auto-increment PK when a model is sharded horizontally into multiple databases?

2010-08-23 Thread Steve Holden
try to do better myself. http://en.wikipedia.org/wiki/Mersenne_twister regards Steve -- DjangoCon US 2010 September 7-9 http://djangocon.us/ -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to d

Re: How does Django handle auto-increment PK when a model is sharded horizontally into multiple databases?

2010-08-23 Thread Steve Holden
On 8/23/2010 8:08 AM, Russell Keith-Magee wrote: > On Mon, Aug 23, 2010 at 7:53 PM, Steve Holden wrote: >> On 8/23/2010 7:48 AM, Russell Keith-Magee wrote: >>> On Mon, Aug 23, 2010 at 7:32 PM, Andy wrote: >> [...] >>>> Also how random is random - w

Re: stream (large) files from the back-end via Django to the user?

2010-08-23 Thread Steve Holden
rkus > Surely the whole point of a content delivery network is to act as a proxy for the data source. Buffering it through Django means it's no longer a CDN, it's just a data store. regards Steve -- DjangoCon US 2010 September 7-9 http://djangocon.us/ -- You received this message bec

Re: Strange problem accessing JS for admin

2010-08-25 Thread Steve Holden
ver" >> >> I checked the directories and all the js files are in the right place. >> Anyone encounter this before? > I presume you are using a parallel server to serve static content - have you looked at the logs? Permissions are the glitch that first comes to mind. If

Re: double for in the template

2010-08-25 Thread Steve Holden
king of the template language as a programming language. It is deliberately designed to frustrate such ambitions, since logic like that beloings in your views, not on your templates. regards Steve -- DjangoCon US 2010 September 7-9 http://djangocon.us/ -- You received this message because yo

Re: Building a generic list template - where should I start?

2010-08-25 Thread Steve Holden
e objects (rows), and then an inner loop to display the individual fields (columns). Don't forget that if you want to insert table headers your logic will need to account for a variable number of those too. regards Steve -- DjangoCon US 2010 September 7-9 http://djangocon.us/ -- You received t

Re: Overriding flatpages class meta

2010-08-25 Thread Steve Holden
es a Meta class which is a subclass of Flatpage.Meta? regards Steve -- DjangoCon US 2010 September 7-9 http://djangocon.us/ -- 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.

Re: How to create navigation urls in an intelligent manner

2010-08-26 Thread Steve Holden
rtainly look into that! Of course you're right about having to > change two spots in case I ever decide to redesign my URL's, so a > refactoring is in order! > As long as you acknowledge it as an ugly hack I suspect your reputation will survive ... regards Steve -- DjangoCon

Re: permissions and ownership

2010-08-26 Thread Steve Holden
On 8/26/2010 12:40 PM, Bradley Hintze wrote: > I got it :) > See how effective this group is? You just have to post to it and you find the answers to your questions by yourself! :-) Glad you worked in out. regards Steve -- DjangoCon US 2010 September 7-9 http://djangocon.us/ -- You re

Re: Template not found

2010-08-27 Thread Steve Holden
lems that google your post in > 2012. They'll want more than a "got it" :-) > Or at least give us some hintze ... sorry, you'll have heard that one a million times before. regards Steve -- DjangoCon US 2010 September 7-9 http://djangocon.us/ -- You received this message b

Re: Template not found

2010-08-27 Thread Steve Holden
tion for this would be to use group permissions to give the web server access to the files, since editing will normally only change the user ownership and not the group ownership. If group ownership also changes, use the sticky bit on directories, which IIRC can set group ownership to follow the owners

Re: variable name spaces

2010-08-27 Thread Steve Holden
the data in the session object. The server maintains a separate session for each originating IP address (I think - close enough for a beginner, anyway), so data from different users does not get mixed up. regards Steve -- DjangoCon US 2010 September 7-9 http://djangocon.us/ -- You received this messag

Re: mod_python, apache and django

2010-08-27 Thread Steve Holden
;s obsolete now. regards Steve -- DjangoCon US 2010 September 7-9 http://djangocon.us/ -- 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, s

Re: Django, syncbd just stopped working, can't figure out why

2010-08-27 Thread Steve Holden
you might want to look at the South migration tool. regards Steve -- DjangoCon US 2010 September 7-9 http://djangocon.us/ -- 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...@googlegrou

Re: potential issue re in memory django file uploading.

2010-08-28 Thread Steve Holden
l me :) > Would you mind trimming your replies to exclude the irrelevant stuff from earlier in the thread. That way, I might actually read them ... ;-) regards Steve -- DjangoCon US 2010 September 7-9 http://djangocon.us/ -- You received this message because you are subscribed to the Google Groups &q

Re: potential issue re in memory django file uploading.

2010-08-28 Thread Steve Holden
On 8/28/2010 6:10 PM, Graham Dumpleton wrote: > On Aug 28, 11:21 pm, dave b wrote: >>>>> So obviously my proposed attack is to simply say "content length is >>>>> tiny" and "this file is actually HUGE". [...] > All up, I would suggest yo

<    1   2   3   4   5   6   7   8   >