Re: How to load only the body of a page?

2009-06-26 Thread Jani Tiainen
uot;" {%% extends "full.html" %%} {%% block body_contents %%} {%% include "%s" %%} {%% endblock body_contents %%} """ % template_name ) if context_instance: context_instance.update(dictionary)

Re: MS Word Characters

2009-07-28 Thread Jani Tiainen
f UTF-8 character. Except that it can't be quote but punctuation dash -- Jani Tiainen --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to djan

Re: javascript variable in url resolver template tag

2009-08-10 Thread Jani Tiainen
Sven Richter kirjoitti: > Ok, i think i understand the problem now. > So i have to hardcode the url in my javascript function? > That was what i wanted to circumvent. No you don't have to. There is two ways, either you just use base URL like {% url url_name %} and send parameters as POST (or we

Re: Ajax in Django

2009-08-12 Thread Jani Tiainen
t I don't remember or are aware of) -- Jani Tiainen --~--~-~--~~~---~--~~ 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

Re: Theory: Models/Apps

2009-08-14 Thread Jani Tiainen
sing a single models.py for > many entities, I would rather to keep separate files for each of entity > .. in a scenario like a huge team is working on a project, this approach > will create unnecessary noise. Any answers? http://docs.djangoproject.com/en/dev/intro/tutorial01/#id3 There

Re: Using glovar vars

2009-08-14 Thread Jani Tiainen
d only live time of request (meaning from the moment URL is parsed and reponse is sent to your browser). What happens to your "global" after that? It wouldn't exist on next request. -- Jani Tiainen --~--~-~--~~~---~--~~ You received this mess

Re: Using glovar vars

2009-08-15 Thread Jani Tiainen
Graham Dumpleton kirjoitti: > > > On Aug 14, 10:13 pm, Jani Tiainen wrote: >> Steve Patrick kirjoitti: >> >>> Hi everybody, >>> I´m new in Django and maybe my problem is a bit stupid...I would like >>> to use a global variable (for all the appl

Re: models with filestore backend (no database)

2009-09-07 Thread Jani Tiainen
aking code to inject new entries to sqlite db is quite trivial. And since sqlite is embededd it doesn't need externel dependencies. And it's been included in python since version 2.5. -- Jani Tiainen --~--~-~--~~~---~--~~ You received this message because y

Django, Dojo and JSON-RPC

2009-04-06 Thread Jani Tiainen
I've been trying to find out nice solution to handle JSON-RPC with Django and Dojo (Dojango). So far not much avail. Has anyone succeeded with this? Care to share what kind of packages do I need to make it working with preferably automated SMD generations. -- Jani Ti

Re: Django, Dojo and JSON-RPC

2009-04-06 Thread Jani Tiainen
ieve. Wolfram suggested below > solution to me a while ago and I'm happy with it. > > Rob > > On Apr 6, 2009, at 3:14 AM, Jani Tiainen wrote: > >> >> I've been trying to find out nice solution to handle JSON-RPC with >> Django and Dojo (Dojango). >>

Re: Run context processor conditionally?

2009-05-06 Thread Jani Tiainen
text processor only for views defined in that >>>> app's URL conf or something? >>> You can specify extra context processors to use with RequestContext in >>> your view: >>> >>> <http://docs.djangoproject.com/en/dev/ref/templates/api/#id1&

Splitting monolithic

2009-05-12 Thread Jani Tiainen
nctions So how to split it up in smaller independent apps? Build some core that contains model + business logic that is not application specific and then separate form, JSON-RPC functions and application specific business logic in this same a

Plugin technology

2009-05-23 Thread Jani Tiainen
ore" application template: templates/mycore/mycore.html: {% for plugin in allplugins %}{{ plugin.provide_link }}{% endfor %} Any pointers to such apps or snippets that uses this (or similiar) tehcnique would be appreciated. -- Jani Tiainen --~--~-~--~~~---~--~-

Re: Plugin technology

2009-05-23 Thread Jani Tiainen
George Song kirjoitti: > On 5/23/2009 5:13 AM, Jani Tiainen wrote: >> I'm designing application (site) that is supposed to rely heavily on >> pluings. >> >> i didn't found much of references how I can create plugin that can >> provide something

Re: Plugin technology

2009-05-23 Thread Jani Tiainen
Kai Diefenbach kirjoitti: > Hi Jani, > > On 23 Mai, 14:13, Jani Tiainen wrote: >> I'm designing application (site) that is supposed to rely heavily on >> pluings. >> >> i didn't found much of references how I can create plugin ... > > You may

Re: Plugin technology

2009-05-23 Thread Jani Tiainen
George Song kirjoitti: > On 5/23/2009 8:53 AM, Jani Tiainen wrote: >> Kai Diefenbach kirjoitti: >>> Hi Jani, >>> >>> On 23 Mai, 14:13, Jani Tiainen wrote: >>>> I'm designing application (site) that is supposed to rely heavily on >>>&g

Re: Connecting to Legacy Oracle Tables

2009-05-23 Thread Jani Tiainen
l. You can also edit the generated sql by hand before > running it, if you need finer-grain control. In development version there is also very handy "managed" meta option that works very well with legacy apps when set to 'false'. -- Jani Tiainen --~--~-~--~-

Re: reset button question

2009-05-25 Thread Jani Tiainen
com/alertbox/20000416.html -- Jani Tiainen --~--~-~--~~~---~--~~ 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 thi

Re: How to pass 2 list as one in template

2009-05-28 Thread Jani Tiainen
em,item1 in combinedlist %} > {{item}} {{item1}} > > {% endfor%} {% endfor %} > You could try that one. Of course, if you can put values in tuples while generating list(s) it would be much more efficient than joining them afterwards. -- Jani Tiainen --~--~-~--~~--

Re: How to pass 2 list as one in template

2009-05-28 Thread Jani Tiainen
Masklinn kirjoitti: > On 28 May 2009, at 15:30 , Alex Gaynor wrote: >> On Thu, May 28, 2009 at 8:11 AM, Masklinn >> wrote: >> >>> On 28 mai 09, at 14:55, Jani Tiainen wrote: >>>> laspal kirjoitti: >>>>> Hi, >>>>> I h

Re: Saving Oracle Connection across requests

2009-09-15 Thread Jani Tiainen
l variable has different values depending of the > process. > > Any ideas how to keep a persistent connection across requests? > > Thanks > > > > > > -- Jani Tiainen --~--~-~--~~~---~--~~ You received this message

Multi table inheritance and reverse lookup

2009-09-22 Thread Jani Tiainen
solution, specially it hits database for every subitem tried. Any better way to achieve same without hitting that much database? -- Jani Tiainen --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django use

Re: Multi table inheritance and reverse lookup

2009-09-22 Thread Jani Tiainen
Jani Tiainen kirjoitti: > model.py: > > from django.db import models > > class Order(models.Model): > name = models.CharField(max_length=64) > > def __unicode__(self): > return self.name > > class Product(models.Model): > na

Re: how to open a new page when clicking a url

2009-09-22 Thread Jani Tiainen
li kai kirjoitti: > Hi, > > How to implement this in my template html file? > > When an user clicks an url address, a new webpage will pop up. That is standard behaviour of any browser that I know of. Or did you meant something else? -

Re: how to open a new page when clicking a url

2009-09-22 Thread Jani Tiainen
y > current web browser window. > But I expect it open a new web browser window and jump to the web address. > > Just like this: > We click the search results of google search result, and a new page > will pop up. > > Did I make it clear? > > On Wed, Sep 2

Re: is this a sane way to show total number of objects in pagination?

2009-09-25 Thread Jani Tiainen
ct from DB to Python - which you might not want specially if queryset is large. .count() executes count query on DB side returing only single scalar value to Python. Figure out which one is faster... -- Jani Tiainen --~--~-~--~~~---~--~~ You received this me

Re: What JavaScript framework do you use and why?

2009-09-27 Thread Jani Tiainen
markup to achieve same thing. Dojango is pretty nice. I just don't use (model)forms all. -- Jani Tiainen --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send e

Re: Performing a db operation at session end

2009-09-28 Thread Jani Tiainen
tion lifetime (and tell it to user too). Like "your book is reserved for you exclusively next 10 minutes". After that it will be free for next reservation. And buyer might need to wait in queue to get his/her book. -- Jani Tiainen --~--~-~--~~~---~--~~ You

Re: Does the auto_now attribute do updates even if the same data is inserted?

2009-09-28 Thread Jani Tiainen
uot;10" >>> a.id = "10" >>> a.save() > Yes. Django doesn't have "dirty" flag in models or do field by field compare. So it will always issue insert/update clause when you do "save". -- Jani Tiainen --~--~-~--~~--

Re: What JavaScript framework do you use and why?

2009-09-30 Thread Jani Tiainen
Joshua Russo kirjoitti: > On Mon, Sep 28, 2009 at 4:00 AM, Jani Tiainen <mailto:rede...@gmail.com>> wrote: > > > Joshua Russo kirjoitti: > > Great links guys, thanks. I'm still in the mindset of frameworks just > > making JavaScript less p

Re: filter magic to support i18n models

2009-10-04 Thread Jani Tiainen
lter) queries, so that the following > statement: > > Product.objects.filter(price=10,language='en') > > to act as > > Product.objects.filter(price=10,producti18n_set__language='en') > > any suggestion ? Have you looked at django-multilingua

Re: ORM

2009-10-07 Thread Jani Tiainen
g else since I'm not sure what you mean by "views" and "triggers" and how they are related to ORM... -- Jani Tiainen --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users&qu

Re: ORM

2009-10-07 Thread Jani Tiainen
les and such are generated or it can be done quite easily manually. Could you provide some examples what you're trying to achieve to shed some light here..? -- Jani Tiainen --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

Re: how to design mobile version of my site based on django?

2009-10-10 Thread Jani Tiainen
page(s) instead of using heavy, large screen pages meant for large display computers. Easiest way is to test your site with mobile and see does it work or not. -- Jani Tiainen --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Go

Re: Model Class Inheritance question

2009-10-10 Thread Jani Tiainen
f you don't want to have own table for Satellite, make it to abstract and then Planet and Satellite both will be pure concrete classes (then of course you can't have single "satellites" but both inherited concrete classes do need their own reverse relations. -- Jani Ti

Re: Distance across a LineString in GeoDjango

2009-10-11 Thread Jani Tiainen
finition. To go beyond that you can use Distance to make math and conversions to another units.. Note that "length" gives linear distance, not spherical so in long distances you get a distorted length. -- Jani Tiainen --~--~-~--~~~---~--~~ You r

Re: Distance across a LineString in GeoDjango

2009-10-13 Thread Jani Tiainen
length of degree varies depending on where your measured points are located at!) You might find this page a bit helpful: http://www.uwgb.edu/dutchs/UsefulData/UTMFormulas.htm > On Oct 12, 2:53 am, Jani Tiainen wrote: >> HARRY POTTRER kirjoitti: >> >> >> >>>

Re: does this get or create code ship with django?

2009-10-14 Thread Jani Tiainen
;t read docs carefully) standard get_or_create actually always creates instance in to database. I first tried to use it just as a template to get object if it didn't existed but it turned out to provide a bit undesired effects, specially with missing null fields... :) -- Jani Tiainen --~-

Re: hosting from /some/url in apache

2009-10-14 Thread Jani Tiainen
've done it settings.py: LOGIN_URL='//login/' And that's it. Of course you have to keep all your apps using hardcoded urls but use reverse url finding always. -- Jani Tiainen --~--~-~--~~~---~--~~ You received this message because you

Re: unable to see SQL even after DEBUG=True in settings

2009-10-15 Thread Jani Tiainen
it has executed number of db queries and I > know for sure there must be some sql. But still I don't see any in > connection.queries. what am I doing wrong? Are you sure that querysets are evaluated? Meaning that you actually access them, just create querysets. Also in y

Re: hosting from /some/url in apache

2009-10-15 Thread Jani Tiainen
Graham Dumpleton kirjoitti: > > > On Oct 15, 5:14 am, Jani Tiainen wrote: >> Chris Withers kirjoitti: >>> Hi All, >>> I need to host my django project from /some/folder in my apache instance. >>> I have the following: >>> WSGIScriptAlias /some

Re: Stored proderures/functions in Django

2009-10-18 Thread Jani Tiainen
m return value(s) of such database spesific calls. And meanwhile you always can call raw sql to anything you want django supports it. -- Jani Tiainen --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django u

Re: Django SAAS projects

2009-10-18 Thread Jani Tiainen
le way but we're doing SaaS Django projects and it's project per customer. And each project will have it's own database (Oracle schema usually) so we can scale up pretty much. -- Jani Tiainen --~--~-~--~~~---~--~~ You received this message bec

Re: concurrency and threading question

2009-10-21 Thread Jani Tiainen
one per visitor? I need to > ensure that I only have one queue manager running on the server, not > one per visitor. I would be using Apache and either mySQL or sqlite3 > as the database, in case that matters. -- Jani Tiainen --~--~-~--~~~---~--~~ You r

Re: inspectdb Oracle

2009-10-26 Thread Jani Tiainen
user's tables and I need > also the two views. How can I do? Is it possible? Handcrafing. So you need to construct those two views by hand. Also I suggest that you override save() method to raise exception if someone tries to save something in view

Re: Django templates, break a for after an if

2009-10-26 Thread Jani Tiainen
> {% endifequal %} > {% endfor %} > {% endfor %} > > How can I do this? You can't and shouldn't. It's template language, not progamming language. It's function to define _how_ to show data. You need to make that decision in a view which is meant f

Login over HTTPS

2009-10-26 Thread Jani Tiainen
th mod_wsgi and I've total control over my webserver config. -- Jani Tiainen --~--~-~--~~~---~--~~ 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@g

Re: Discovering the ip/port in use by runserver

2009-10-27 Thread Jani Tiainen
s any local address (localhost), port 8000. Anything beyond that you know since you have to specify it explicitly. -- Jani Tiainen --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post

Re: Login over HTTPS

2009-10-27 Thread Jani Tiainen
ise a username might be sent back to the > client outside the SSL connect. > > Haven't looked for it yet, but I do want to implement that myself. Lets post > if we find anything :) > > Regards, > > Gerard. > > > > Jani Tiainen wrote: >> I'm tryi

Re: render_to_response taking 50 seconds!

2009-11-02 Thread Jani Tiainen
o speed this up? > Answer is maybe. First you have to provide model, view and template code you're using to render your code, second the way you measured this 50 seconds. -- Jani Tiainen --~--~-~--~~~---~--~~ You received this message because you a

Re: redirect or reload page after pdf file generation.

2009-11-02 Thread Jani Tiainen
sm exists in HTTP protocol so what you're asking might not be really possible. With little JS (ajax iframe download) you can achieve that kind of refresh like functionality. But it relies on ajax functionality. -- Jani Tiainen --~--~-~--~~~---~--~~ You rece

Re: render_to_response taking 50 seconds!

2009-11-02 Thread Jani Tiainen
Low Kian Seong kirjoitti: > On Tue, Nov 3, 2009 at 1:33 PM, Jani Tiainen wrote: >> Low Kian Seong kirjoitti: >>> I have about 3k plus record in my db table and am trying to do a >>> simple render_to_response of a template sending it the results of a >>> query

Re: render_to_response taking 50 seconds!

2009-11-02 Thread Jani Tiainen
Your model was not-so-good Python/Django code style so it was bit hard to read but... Low Kian Seong kirjoitti: > On Tue, Nov 3, 2009 at 3:07 PM, Jani Tiainen wrote: >> Low Kian Seong kirjoitti: >>> On Tue, Nov 3, 2009 at 1:33 PM, Jani Tiainen wrote: >>>> Low

Re: How can we capture the login time in Django

2009-11-03 Thread Jani Tiainen
gets closed forcefully - like it crashed? Of course I'm happy to hear how you resolved such an issues. Login time control is rather easy and you had one solution for that already. -- Jani Tiainen --~--~-~--~~~---~--~~ You received this message because yo

Re: connection.queries show no queries

2009-11-17 Thread Jani Tiainen
ave executed any in your shell process. Try debug toolbar for example to be able to see what actually happens under the hood. -- Jani Tiainen -- 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: Per-object permissions

2009-11-24 Thread Jani Tiainen
Most promising solution I've seen is django-authority. I haven't (yet) used it but I'm planning to do that at some point. Quick peek revealed that branch you mentioned is a quite outdated, last update is "only" two and half years old.. On Tue, 2009

Re: Translate models

2009-11-25 Thread Jani Tiainen
pretty much makes same thing just a bit different way. -- Jani Tiainen -- 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

Re: multilingual flatpages

2009-12-01 Thread Jani Tiainen
t has (among other features), multilingual flatpages application. -- Jani Tiainen -- 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 emai

Re: ModelForm save() cleans data first?

2009-12-01 Thread Jani Tiainen
ture. So answer is yes, it cleans data if it hasn't been cleaned before calling save. -- Jani Tiainen -- 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.c

Re: ORM using tons of memory and CPU

2009-12-14 Thread Jani Tiainen
other > index. Django's is the first ORM I have ever used and these sneaky > performance issues are making me wonder... > If you have DEBUG=True setting Django also records _every_ SQL query made to database and depending on a case, it might use quite lot of memory. -- Jani Tia

Re: Django editor for Debian

2009-12-16 Thread Jani Tiainen
all depends on your preferences. Personally I'm quite happy with eclipse + pydev. -- Jani Tiainen -- 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 unsubscri

Re: Rails-style form value deserializer?

2009-12-19 Thread Jani Tiainen
Result is stored in request.POST (or you can do same with get params, ?foo=one&foo=two). for example request.POST.getlist('foo'). Default getitem implementation returns only last occurence from list. See: http://docs.djangoproject.com/en/1.1/ref/request-response/#querydict-objectsfor more info

Re: Django Admin - m2m widget with blank=true, null=true - How to unselect all FKs?

2010-04-18 Thread Jani Tiainen
't seem to unselect it. Clicking out of the widget simply seems to unfocus the widget, but the selected items still seem selected. Click one item, then (at most os/computers/browsers) press CTRL down and click selected entry. It should clear selection. -- Jani Tiainen -- You received this

Re: Django Admin - m2m widget with blank=true, null=true - How to unselect all FKs?

2010-04-19 Thread Jani Tiainen
ular component and there is quite little you can do about it. -- Jani Tiainen On 04/19/2010 08:45 AM, Victor Hooi wrote: Jani, Aha, that worked, thanks =). Don't know why I didn't think about using Ctrl...lol. However, do you think it'd be obvious to new users, to use ctrl? C

Re: Multi-table inheritance - knowing the child object from the parent

2010-05-18 Thread Jani Tiainen
mple discriminator field to tell what type of child you must also fetch to make data complete. -- Jani Tiainen -- 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 unsubs

Re: How can I test the correctness of my models against the schema of a database?

2010-05-31 Thread Jani Tiainen
gives you other problems. In any case this seems not to > > be the correct way. > > > > Has anyone of you faced this situation before? Any clues? > > > > Thank you in advance. > > > > Best Regards, > > David Horat -- Jani Tiainen -- You received

Re: How To Create POST data without an actual POST?

2010-06-29 Thread Jani Tiainen
gested you can do various middle formats (like json) or send even "real" request from parser. You could do even custom command that accepts "post data" as json and pushes it to database through the form you've created. Even forms normally take in request.POST using them

Re: Best way to find near people

2010-07-29 Thread Jani Tiainen
and GeoDjango (django.contrib.gis). Spatialite, Postgis, Mysql or oracle. All supports at spatial to some extent. And there you can do easily simple filtering: Person.objects.filter(person_coordinates__dwithin(me.coordinates, distance)) ...and geodjango + spatial engine behind it will take care of all that co

Re: Reporting Library??

2010-08-12 Thread Jani Tiainen
ilt on top of ReportLab and has pretty good Django support as well. -- Jani Tiainen -- 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: High memory consumption when going through all records

2010-08-12 Thread Jani Tiainen
objects get really high. I don't understand why python garbage > collector does not free them. I see this with development server, debug on > and mysql as a DB backend. That is your problem. when DEBUG = True Django ORM records every SQL query made in a request - or in case of script whol

Re: jsonrpclib 403 error

2010-08-20 Thread Jani Tiainen
using my own solution for that: http://drpinkpony.wordpress.com/2010/01/12/django-json-rpc-service/ It works pretty nicely with Dojotoolkit at least, and it's been battle tested now in production environments. -- Jani Tiainen -- You received this message because you are subscribed to t

Re: What is best practice for pluggable modules in app

2010-08-24 Thread Jani Tiainen
o, specially if your apps need to contribute to ui. Note that appname is only last part of python namespace and it must be unique within one django project. For example you can't have "shipping.modules.ups" and "invoicing.modules.ups" due the limitations of Django itself

Re: Caching JSON in Django

2010-08-25 Thread Jani Tiainen
hat. View code would be helpful and don't forget the caching parts. -- Jani Tiainen -- 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 th

Re: Caching JSON in Django

2010-08-25 Thread Jani Tiainen
Is your AJAX query POST or GET query? Because as you may know, POST queries are not cached, GET queries are. Note that if you're still using large pieces of JSON data, upstream caches are not used (data is always sent from Django) which makes some extra load on Django app. > Thanks for you rep

Re: SERIALIZING

2010-11-04 Thread Jani Tiainen
ed in documentation come back and ask. [1] http://www.catb.org/~esr/faqs/smart-questions.html#homework -- Jani Tiainen On Wednesday 03 November 2010 15:15:49 sami nathan wrote: > HOW TO GET XML RESPONSE in following > THIS IS HOW MY URL.PY LOOKS LIKE > > from django.conf.urls.default

Re: grouping of fields inside a model into a class

2010-11-07 Thread Jani Tiainen
ough it's not that intuitive but looks similiar. Also you need to be very careful about reverse relations. See more at: http://docs.djangoproject.com/en/1.2/topics/db/models/#abstract-base-classes http://docs.djangoproject.com/en/1.2/topics/db/models/#be-careful-with- related-name -- Jani Tiain

Re: Mysql Quires using raw()

2010-11-09 Thread Jani Tiainen
o 1.2 version. > where I am wrong? Nowhere. Output is correct and as documented - you get back *RawQuerySet*. Not a single value. So you have to do something like: maxid = Client.objects.raw('SELECT MAX(job_no) as max_job_no FROM CLIENT').values_list('max_job_no', flat=True)

Re: Mysql Quires using raw()

2010-11-11 Thread Jani Tiainen
o 1.2 version. > where I am wrong? Nowhere. Output is correct and as documented - you get back *RawQuerySet*. Not a single value. So you have to do something like: maxid = Client.objects.raw('SELECT MAX(job_no) as max_job_no FROM CLIENT').values_list('max_job_no', flat=True)

Re: Newbie question: empty is not empty?

2009-12-31 Thread Jani Tiainen
f you do - it will get submitted (exception being unselected checkboxes) with empty value - and thus existing as empty string in GET/POST parameters. None of standard middlewares don't mangle POST/GET parameters. To make something useful out of it, use Django forms to post process form to disti

Re: Newbie question: empty is not empty?

2009-12-31 Thread Jani Tiainen
On Thu, 2009-12-31 at 03:20 -0800, BobAalsma wrote: > Thanks Masklin, I've just tried your suggestion and there is no > change. > > I'm somewhat mystified by the 'u' that gets added to all answer > messages - is this something to do with unicode? Could this be the > root of (some) evil? Again, yo

Re: adding custom variables to the Meta class

2010-01-05 Thread Jani Tiainen
d idea IMHO) > > or simply: > > 5/ document the fact that the 'lat_lng' field name MUST be named > 'lat_lng', period !-) > > > My 2 cents... > Or... :) from django.db import models models.options.DEFAULT_NAMES += ('my_first_val', 'my

Re: Namespace Security

2010-01-12 Thread Jani Tiainen
s - admins/staff. It's never was intended to be used for an end user activity management, which leads to utterly complex solutions trying to overcome this problem. It probably could be simpler to create custom admin site for this purpose than trying to get around limitations of standard admin si

Re: Table with 4 Milions of rows

2010-01-12 Thread Jani Tiainen
I've only 21 million rows in one of my tables and querying it is not a problem. First check that suggested function based index, it might help and you don't need to do anything. istartswith uses "not so good" format. We have got around it using additional field that is autopopulated, in your case

Re: A question about database models

2010-01-14 Thread Jani Tiainen
ng the_driver, or the_co_driver, the error is gone. And if you didn't guessed yet, you have to still add "related_name" argument for field definition. What it means can be found at django documentation: <http://docs.djangoproject.com/en/1.1/ref/models/fields/#django.db.models.Foreig

Re: Remove items from queryset?

2010-01-22 Thread Jani Tiainen
ng all objects from your queryset. -- Jani Tiainen -- 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..

Re: Plugin for Eclipse

2010-04-13 Thread Jani Tiainen
me in duplicate implementation. Regards, Zbiggy Don't know does there exist any other alternative but your plugin seemed to do pretty good job. One of the last features I've been missing from Eclipse+PyDev package. -- Jani Tiainen -- You received this message because you are su

Re: Django REST

2012-03-04 Thread Jani Tiainen
ibe from this group, send email to > django-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > -- Jani Tiainen -- You received this message because you are subscribed to the Google Groups "Django u

Re: GeoDjango distance queryset filter with distance value stored within model

2012-03-04 Thread Jani Tiainen
am trying to? Any help is appreciated! > > PS: I have posted this also to StackOverflow at > http://stackoverflow.com/q/**9547069/755532?sem=2<http://stackoverflow.com/q/9547069/755532?sem=2> > > Thanks in advance! > > -- > Kind regards > Daniel > > -- > You

Re: Django hgwebdir

2012-03-08 Thread Jani Tiainen
ify the sender immediately by return e-mail, delete this communication and destroy all copies. -- Jani Tiainen -- 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.

Re: Problems creating django project in Windows 7

2012-03-08 Thread Jani Tiainen
dows OS and tools and just use a linux machine as a test server. since it doesn't need a lot of power for that, you can avoid dedicating a real machine by using a virtual one. -- Jani Tiainen -- You received this message because you are subscribed to the Google Groups "Django user

Re: "Dynamyc" modells

2012-03-13 Thread Jani Tiainen
RDBMS. Also all database CRUD operations would be handcrafted still. I would definitely look using those document oriented databases which would allow doing all that fancy stuff without too much sweat. -- Jani Tiainen -- You received this message because you are subscribed to the Goo

Re: Django is very slow on windows server 2003, mssql database

2012-03-13 Thread Jani Tiainen
from foreignkey / m2m tables which might create quite lot of data. I had fun times with my customer foreignkey to address model with 21 million rows in address... :) -- Jani Tiainen -- You received this message because you are subscribed to the Google Groups "Django users" group.

Re: Models, field like a list

2012-03-19 Thread Jani Tiainen
Hi, All depends on a few factors will simple foreign key or many to many be correct solution. If single model B can be assigned only on a single model A then foreign key from B to A is right choice. But if requirement is that model B can be assigned multiple times to model A then it's definitely

Re: Running manage.py commands in Windows Power Shell

2012-03-19 Thread Jani Tiainen
Hi, I (and all my other teammates) are have been developing in windows with standard Python (+ Django + lot of other interesting stuff) in WinXP, Vista, Win7. To keep everyone on same line, we use TCC/LE (Take Command Console/LE) which is augmented CMD. Has lot of nice features. And it's free. O

Re: Problem with tuncated Admin pages in apache + mod_fcgid

2012-03-19 Thread Jani Tiainen
Hi, Since we use same setup except one part: we use mod_wsgi instead of mod_fcgi. (Since wsgi is considered to be defacto protocol). Could you try to use it? On Mon, Mar 19, 2012 at 7:04 PM, Another Django Newbie < another.xxx.u...@gmail.com> wrote: > > > On Thursday, March 15, 2012 1:05:53 PM

Re: Question about threading a view[REPOSTED]

2012-03-19 Thread Jani Tiainen
course you can still test your long running process but in unit tests you don't test that communication between broker and running system. HTH, Jani Tiainen On Mon, Mar 19, 2012 at 11:17 PM, Arruda wrote: > Some one also gave me that tip. > I was reading it, but I couldn't see much

Re: Question about threading a view[REPOSTED]

2012-03-20 Thread Jani Tiainen
27;s say 20 minutes your AJAX call will definitely be terminated (timed out). So that is not a right solution. Using AJAX to query long running status makes a lot of sense though. -- Jani Tiainen -- You received this message because you are subscribed to the Google Groups "Django us

Re: Question about threading a view[REPOSTED]

2012-03-20 Thread Jani Tiainen
Hi, Your solution will work perfectly in single process environment (For example with manage.py runserver ) But when you put your app behind webserver you usually invoke several processes. For example if you're using single round-robin loadbalancing over 5 different Django instances. What w

Re: Problem with Django starting up

2012-03-20 Thread Jani Tiainen
21.3.2012 7:50, Samuel Muiruri kirjoitti: I can't get the first part to work I assume that you have python installed to c:\python27\ You need to add c:\python27\scripts to your path. Or alternatively: c:\python27\scripts\django-admin.py startproject mysite -- Jani Tiainen -

Re: Problem with tuncated Admin pages in apache + mod_fcgid

2012-03-21 Thread Jani Tiainen
20.3.2012 16:45, Another Django Newbie kirjoitti: On Tuesday, March 20, 2012 10:28:49 AM UTC, Another Django Newbie wrote: On Tuesday, March 20, 2012 10:01:36 AM UTC, Tom Evans wrote: On Mon, Mar 19, 2012 at 5:24 PM, Jani Tiainen wrote: >

  1   2   3   4   5   6   7   8   >