Re: django sample (without admin site)

2013-10-18 Thread Thomas Lockhart
On 10/18/13 10:04 AM, Sanjaya Vitharana wrote: Hi, I am newbie to django looking for a simple sample. I'd suggest picking up a package built on top of Django. Maybe Mezzanine (I've enjoyed working with that). But there are several which will get you going quickly. hth

Re: Python 3

2013-10-23 Thread Thomas Weholt
My main reason to porting as many as possible of my python projects to Python 3 is proper unicode support. As a Norwegian developer is been terrible to support local characters in some projects with lots of dirty hacks to get it working. In py3 it just works. Thomas On Wed, Oct 23, 2013 at 5:36

1.5.4 /static/ serving 500 error

2013-10-24 Thread Thomas Murphy
Hi all, with structure |myproject |---static |---picture.jpg |--myproject ---settings.py settings.py import os MYPROJECT_PATH = os.getcwd() DEBUG = True *** STATIC_ROOT = os.path.join(MYPROJECT_PATH, 'static') STATIC_URL = '/static/' STATICFILES_DIRS = (STATIC_ROOT,) in Django 1.

Re: Python shell displays Segmentation Fault: 11 after upgrade to Mavericks OS

2013-10-24 Thread Thomas Lockhart
On 10/24/13 2:34 PM, Don Fox wrote: ... Segmentation fault: 11 This type of thing just started after upgrade. I assume there's a connection. I found a similar symptom with another application after doing piecemeal updates in MacPorts packages, and my problems went away with a more rigoro

Re: Django traffic control

2013-10-25 Thread Thomas Orozco
You could use middleware, or a view decorator On Oct 25, 2013 5:33 PM, "Nuno Lopes" wrote: > Hi guys/girls, > > I have a project in Django and I want to control the access to an API. > Basically just know and register who is using it. > I could go to each controller and do this by hand using the

Re: 1.5.4 /static/ serving 500 error

2013-10-30 Thread Thomas Murphy
http://www.tangowithdjango.com/book/chapters/templates_static.html#serving-static-media) I believe tangowithdjango is written for 1.5.4, so I'll follow up with them as well. (Are they on this list)? Best, Thomas On Thu, Oct 24, 2013 at 4:56 PM, Mike Dewhirst wrote: > On 25/10/2013 6:1

Re: Seeking reviewers for a "Guide to Idiomatic Django Deployment"

2013-11-06 Thread Thomas Murphy
e subscribed to the Google Groups > "Django users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to django-users+unsubscr...@googlegroups.com. > To post to this group, send email to django-users@googlegroups.com. > Visit this g

Re: Problem with Oauth and 1.6

2013-11-07 Thread Thomas Murphy
users@googlegroups.com. > Visit this group at http://groups.google.com/group/django-users. > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-users/18c6c4b0-5368-40b5-bb76-23808a9c238b%40googlegroups.com. > For more options, visit https://groups.google.co

Re: Deploying Django apps with nginx

2013-11-10 Thread Thomas Orozco
Using Nginx, you don't tun the django app "inside" Nginx like you would using mod_wsgi. Instead, you use Nginx for reverse proxying (see the proxy_pass directive), and use a Python webserver for your app(s), e.g. uwsgi, gunicorn. Serving multiple apps is easy. Just use multiple location blocks an

ANN: DSE 1.0.0-RC1

2011-04-13 Thread Thomas Weholt
) release candidate of DSE ( http://pypi.python.org/pypi/dse/1.0.0-RC1 ) and if anybody has time/interest to help me iron out any bugs or issues before I label it as stable and release the official 1.0 release that would be great. Thanks for your attention. -- Mvh/Best regards, Thomas Weholt http://www.

Debugging a unittest

2011-04-19 Thread Thomas Weholt
s the best way to do this? -- Mvh/Best regards, Thomas Weholt http://www.weholt.org -- 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 this group, s

Re: Accessing ImageField temporary file to dynamically change upload_to storage path

2011-04-26 Thread Thomas Weholt
rmation about images, metadata and django is appreciated. Regards, Thomas On Tue, Apr 26, 2011 at 8:16 AM, Ian Turner wrote: > I'm in need of direction to access the temporary file that is stored > in memory or on disk from an ImageField/FileField so that I can read > it before i

Cannot operate on a closed database

2011-04-29 Thread Thomas Weholt
I'm trying to run a unittest, but it crashes with an exception, saying "Cannot operate on a closed dabase". I'm not using the orm to insert records, but raw SQL - and raw sql is the only option. When or what closes the connection to the database? -- Mvh/Best regards

ANN: DSE v2.0.0-Beta - DSE uses 1.8% of the time compared to the Django ORM updating 100.000 records.

2011-05-03 Thread Thomas Weholt
ed-to-django.html DSE at pypi: http://pypi.python.org/pypi/dse/ Source at bitbucket.org: https://bitbucket.org/weholt/dse2 Thanks for your attention. -- Mvh/Best regards, Thomas Weholt http://www.weholt.org -- You received this message because you are subscribed to the Google Groups "Django us

Re: ANN: DSE v2.0.0-Beta - DSE uses 1.8% of the time compared to the Django ORM updating 100.000 records.

2011-05-03 Thread Thomas Weholt
Hehe ... yes, that's exactly the kind of things DSE is good at. 1.8% of two days ... that's half an hour?? Mind you, I've so far not inserted that many records, so if you ever get the chance to try that out please let me know how it goes. Thomas On Tue, May 3, 2011 at 1:55 PM,

Re: ANN: DSE v2.0.0-Beta - DSE uses 1.8% of the time compared to the Django ORM updating 100.000 records.

2011-05-03 Thread Thomas Weholt
Hi, Just posted a new blog about more realistic performance of DSE against a real database. Head over to http://weholt.blogspot.com/ to read it. Thanks for your feedback! Regards, Thomas On Tue, May 3, 2011 at 1:55 PM, Brian Bouterse wrote: > This would have been so useful on my last proj

Re: Best practice for async task in django?

2011-05-06 Thread Thomas Weholt
Celery/django-celery. My best tips :-) Thomas 2011/5/6 λq : > Hi guys, > > We have a django product running, one of the view is to track each > request of news and write to MySQL, so when user grows the track > read/write became heavy and it may take a while for the user to get a

Giving inlined models in a form in admin a default value based on order in form?

2011-05-06 Thread Thomas Weholt
_order = 1, 2 and 3. If I click to add a new child item in that same form, it should be giving sort_order = 4, then 5 etc. You get the picture? Is this possible? -- Mvh/Best regards, Thomas Weholt http://www.weholt.org -- You received this message because you are subscribed to the Google Group

using reverse to find the index-page of an app?

2011-05-08 Thread Thomas Weholt
ot getting it. Sorry. -- Mvh/Best regards, Thomas Weholt http://www.weholt.org -- 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

Inserting csrf-token in a form generated by a templatetag?

2011-05-08 Thread Thomas Weholt
I've got a templatetag generating a form, but trying to add a csrf-token failes. What's the correct way to add a csrf-token to a form generated in plain html in a templatetag? -- Mvh/Best regards, Thomas Weholt http://www.weholt.org -- You received this message because you are sub

Ann: django-photofile released - thumbnail generation with automatic rotation based on Exif.Orientation

2011-05-09 Thread Thomas Weholt
-Photofile/ Released as GPL. Alpha status. Testers and comments wanted. Planned features: more metadata handling ( EXIF, IPTC, XMP ) and optional use of pgmagick or similar for better thumbnail quality. -- Mvh/Best regards, Thomas Weholt http://www.weholt.org -- You received this message because you

ANN: Django-photophile v.0.2.0 - templatetag for thumbnail generation with automatic rotation and an abstract model for EXIF-metadata handling.

2011-05-10 Thread Thomas Weholt
downloading. Released as GPL. Source available at https://bitbucket.org/weholt/django-photofile/src. -- Mvh/Best regards, Thomas Weholt http://www.weholt.org -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, sen

Re: performance of model instgance save()

2011-05-11 Thread Thomas Weholt
ster. You might want to check out http://pypi.python.org/pypi/dse/. My tests using postgres showed a 3X performance gain on inserts compared to using the orm and nearly 10X when doing heavy updates on existing data. It takes care of creating SQL for you and respects default values define

How to use django-taggit in admin.py?

2011-05-11 Thread Thomas Weholt
How can I use django-taggit in the admin related to my model? -- Mvh/Best regards, Thomas Weholt http://www.weholt.org -- 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

Problems using django-taggit; tags disappear in the admin

2011-05-11 Thread Thomas Weholt
when I debug the save-method, but when the model instance is shown in the admin the tag-field is empty. >>> from photoapp.models import * >>> d = AdvancedPhoto(title='1', image='/home/thomas/Pictures/test.jpg') >>> d.save() >>> d.

CharField with choices gets no ... choices

2011-05-12 Thread Thomas Weholt
string and I could not set any choice-property. -- Mvh/Best regards, Thomas Weholt http://www.weholt.org -- 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

Re: CharField with choices gets no ... choices

2011-05-12 Thread Thomas Weholt
On Thu, May 12, 2011 at 10:09 AM, Jani Tiainen wrote: > On Thu, 2011-05-12 at 09:59 +0200, Thomas Weholt wrote: >> I got a model looking something like this >> >> class SomeModel(models.Model): >>     somefield = models.CharField(max_length=100, choices=somemethod()

How to choose a license for an app or a project?

2011-05-13 Thread Thomas Weholt
-- Mvh/Best regards, Thomas Weholt http://www.weholt.org -- 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 this group, send email to django-user

Re: How to choose a license for an app or a project?

2011-05-13 Thread Thomas Weholt
of answers in this thread show that it's something several django users care about - at least to some degree. Thomas -- 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

Re: How to choose a license for an app or a project?

2011-05-13 Thread Thomas Weholt
l so I can benefit from bug fixes, added features etc. So I still believe GPL is the right license for me to use. -- Mvh/Best regards, Thomas Weholt http://www.weholt.org -- You received this message because you are subscribed to the Google Groups "Django users" group. To pos

Re: How to choose a license for an app or a project?

2011-05-13 Thread Thomas Weholt
On Fri, May 13, 2011 at 6:55 PM, Jacob Kaplan-Moss wrote: > On Fri, May 13, 2011 at 11:30 AM, Thomas Weholt > wrote: >> Hmmm ... maybe, but because of the reusable app focus in django I >> think some sort of guideline regarding choice of license could be >> important.

How to register JS event handler

2011-05-17 Thread Thomas Guettler
js/jquery lines in every page which uses FooForm? Thomas -- Thomas Guettler, http://www.thomas-guettler.de/ E-Mail: guettli (*) thomas-guettler + de -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email

Re: How to register JS event handler

2011-05-18 Thread Thomas Guettler
On 17.05.2011 13:18, Michal Petrucha wrote: > On Tue, May 17, 2011 at 12:34:05PM +0200, Thomas Guettler wrote: >> Hi, >> >> I want to register some jquery event handler for some widgets of a form >> (FooForm). The >> form gets used in several views. >> >

ANN: DSE 2.0.0-RC1, now using the BSD license.

2011-05-18 Thread Thomas Weholt
under the BSD license ( and that's the only change compared to beta9 ). http://pypi.python.org/pypi/dse/2.0.0-RC1 -- Mvh/Best regards, Thomas Weholt http://www.weholt.org -- You received this message because you are subscribed to the Google Groups "Django users" group. To post

Master/detail in the admin

2011-05-25 Thread Thomas Weholt
e change_list filtered to only show details related to a specific master-record and reuse as much of the admin-code/featurebase as possible. -- Mvh/Best regards, Thomas Weholt http://www.weholt.org -- You received this message because you are subscribed to the Google Groups "Django users&q

Django development with iPad as target platform?

2011-05-27 Thread Thomas Weholt
I just got my hands on an iPad and was wondering if anybody has done any django development where the iPad was the target platform/browser/client? Thanks in advance and expect some django-app aimed at ipad in the near future ;-). -- Mvh/Best regards, Thomas Weholt http://www.weholt.org -- You

How to get user object from RequestContext?

2011-05-30 Thread Thomas Weholt
inst.resolve(context) # Here I'd like to get hold of the user object, but how?? except Exception, e: return '' Thanks in advance, Thomas -- You received this message because you are subscribed to the Google Groups "Django users" group. To p

Re: code 128 or code 39 barcode generation

2011-06-07 Thread Thomas Turner
see https://code.djangoproject.com/wiki/Barcodes On Apr 18, 7:12 pm, Steven L Smith wrote: > There's a great wrapper you can use to generate these in PIL using a > postscript library.http://pypi.python.org/pypi/elaphe/ > > I did something similar with pyqrnative to generate QR Codes for a > confe

Trouble with simple aggregation

2011-06-08 Thread Thomas Weholt
Say I got a model like so: class Article(models.Model): title = models.CharField(max_length=100) text = models.TextField() category = models.CharField(max_length=20) author = models.CharField(max_length=50) Article.objects.create(title="Foo", text="Story about foo", category="adve

Updating static files: Still in browser cache

2011-06-09 Thread Thomas Guettler
Hi, My static files (JS/CSS) are cached in the browser. But if there is a bug in a file, an update won't help people which have already cached the old file. You would need a new URL for every change in the JS/CSS files. How do you handle this? Thomas -- Thomas Guettler, http://www.t

Re: Excel dumps to Office 10

2011-06-09 Thread Thomas Guettler
Hi, That's bad news. I liked this pattern very much: Send the browser a HTML table with content type application/vnd.ms-excel. This is much better than CSV. If you find a solution, please post here. Thomas On 06.06.2011 17:10, Bobby Roberts wrote: > hey - > > we are dumping re

Re: Updating static files: Still in browser cache

2011-06-10 Thread Thomas Guettler
On 09.06.2011 19:18, Malcolm Box wrote: > > > Sent from my iPhone, please excuse any typos > > On 9 Jun 2011, at 14:21, DrBloodmoney wrote: > >> On Thu, Jun 9, 2011 at 9:16 AM, Malcolm Box wrote: >>> On 9 June 2011 08:09, Thomas Guettler wrote: >>>

Django Admin: Add text at runtime next to a field

2011-06-14 Thread Thomas Guettler
s not a solution, since the user can't edit the page any more. It should be just a warning message. One solution would be, to create a custom admin form (easy), and subclass the field, to create a custom field. That's not difficult, but I guess there is a better solution. Tho

Multiple forms into one form/trouble accessing form fields

2011-06-15 Thread Thomas Weholt
fields into one new form. -- Mvh/Best regards, Thomas Weholt http://www.weholt.org -- 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 this group, sen

ANN: django-kolibri - a concept for Asynchronous Processors/Workflow management for django.

2011-06-21 Thread Thomas Weholt
pypi-entry don't get formatted like restructured text that would be swell. Thanks! -- Mvh/Best regards, Thomas Weholt http://www.weholt.org -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send e

Re: ANN: django-kolibri - a concept for Asynchronous Processors/Workflow management for django.

2011-06-21 Thread Thomas Weholt
from processing that instance again. Perhaps the processor could have some extra property saying if it should only be executed once for any given item? A possible 0.2.0 feature :-). Thanks for your interest :-) Thomas -- You received this message because you are subscribed to the Google Groups

Re: ANN: django-kolibri - a concept for Asynchronous Processors/Workflow management for django.

2011-06-22 Thread Thomas Weholt
On Wed, Jun 22, 2011 at 2:01 PM, Ethan Jucovy wrote: > On Tue, Jun 21, 2011 at 5:09 PM, Thomas Weholt > wrote: >> >> Proof of concept. Need comments. Released under a modified BSD-license. >> >> http://pypi.python.org/pypi/Kolibri/0.1.0a >> >> or better

Re: Possible interest in a webcast/presentation about Django site with 40mil+ rows of data??

2011-06-22 Thread Thomas Weholt
hear more about ( and sorry for the self promotion ). Regards, Thomas On Wed, Jun 22, 2011 at 3:15 PM, Cal Leeming [Simplicity Media Ltd] wrote: > Hi all, > Some of you may have noticed, in the last few months I've done quite a few > posts/snippets about handling large data sets

Re: Possible interest in a webcast/presentation about Django site with 40mil+ rows of data??

2011-06-22 Thread Thomas Weholt
On Wed, Jun 22, 2011 at 3:36 PM, Cal Leeming [Simplicity Media Ltd] wrote: > Hey Thomas, > Yeah we actually spoke a little while ago about DSE. In the end, we actually > used a custom approach which analyses data in blocks of 50k rows, builds a > list of rows which need changing to th

Re: Possible interest in a webcast/presentation about Django site with 40mil+ rows of data??

2011-06-22 Thread Thomas Weholt
ope this makes sense, let me know if I didn't explain it very well lol. > Cal Actually, I started working on something similar, but tried to find sets of fields, instead of just updating one field pr update, but didn't finish it because the actual grouping of the fields seem to take alot

Re: Possible interest in a webcast/presentation about Django site with 40mil+ rows of data??

2011-06-22 Thread Thomas Weholt
increase is huge using the method described here, even compared to my current solution ( using cursor.executemany ), which is considerably faster than the django orm allready. My testing so far have been using postgresql, not sure how mysql will perform. I expect to release DSE v.2.2.0 with th

Ann: DSE v.3.0.0 Beta #1

2011-06-23 Thread Thomas Weholt
using DSE must be updated to work. New syntax: with Person.delayed as d: d.insert({'name': 'Thomas', 'age': 36, 'sex': 'M'}) d.update({'id': 1, 'name': 'John'}) d.delete(10) # Deletes r

Re: Ann: DSE v.3.0.0 Beta #1

2011-06-23 Thread Thomas Weholt
tely clear to me > what bulk-update means from a SQL perspective, and why it isn't just a > thin layer of data manipulation over the top of a couple of existing > Django update calls. > > For the record, #7596 is the ticket for bulk insert. > > Yours, > Russ Magee

Split up .po files for Internationalization

2011-06-24 Thread Thomas M
ou in advance, Thomas M -- 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 this group, send email to django-users+unsubscr...@googlegroups.com. For more

Re: Split up .po files for Internationalization

2011-06-24 Thread Thomas M
not the standard lib. Can I change this somehow? Or do you know a better documentation for this as the django one? Thanks and regards, Thomas M On 24 Jun., 14:06, Kenneth Gonsalves wrote: > On Fri, 2011-06-24 at 04:54 -0700, Thomas M wrote: > > I want to use the django internationaliza

Re: Ann: DSE v.3.0.0 Beta #1

2011-06-24 Thread Thomas Weholt
On Fri, Jun 24, 2011 at 2:40 PM, Cal Leeming wrote: > This is all great news :) Thomas, perhaps we should each make a proposal as > to how we envisage this in the core, and submit to the list. Ill prob have > some spare time to write something up after the webcast. That way we h

Re: Split up .po files for Internationalization

2011-06-24 Thread Thomas M
Great, putting it into the app directories worked fine and solved the import error as well. Thank you very much. Thomas M On 24 Jun., 14:58, Kenneth Gonsalves wrote: > On Fri, 2011-06-24 at 05:43 -0700, Thomas M wrote: > > It was explained somewhere in this tutorial:

Custom Admin Login Page

2011-06-27 Thread Thomas Guettler
nyone else who has this problem, or a solution? Thomas -- Thomas Guettler, http://www.thomas-guettler.de/ E-Mail: guettli (*) thomas-guettler + de -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Media (JS/CSS) handling outsite Forms

2011-06-29 Thread Thomas Guettler
media files to a global (thread safe) variable and a middleware includes them into the result. Not a nice solution, but I see no better solution. How do you handle this? Thomas -- Thomas Guettler, http://www.thomas-guettler.de/ E-Mail: guettli (*) thomas-guettler + de -- You received this

Re: ANN: django-iadmin

2011-07-04 Thread Thomas Weholt
Did you have any screenshots? Didn't see any. Thomas On Mon, Jul 4, 2011 at 2:55 PM, Stefano Apostolico wrote: > Hi all, > > I would like some feedback on > https://github.com/saxix/djangoscreenshots-home-page-iadmin. > > Documentation in progress,  but de

Re: ANN: django-iadmin

2011-07-04 Thread Thomas Weholt
Just by looking at the screenshots makes me like it! Alot! :-) Keep up the great work. I'll see if I get the time to test it and provide you with more feedback. Regards, Thomas On Mon, Jul 4, 2011 at 4:42 PM, sax wrote: > Sorry, > wiki still in progress. > anyway demo

Calling a custom templatetag inside a block/extrahead-block?

2011-07-04 Thread Thomas Weholt
i_imports', expected 'endblock' or 'endblock extrahead' So; How can I call a defined templatetag inside my {% block extrahead %}-block? I've tried {% block extrahead %} {{kolibri_imports }} But that didn't produce anything. This is probably simple, but ... tha

Re: Calling a custom templatetag inside a block/extrahead-block?

2011-07-04 Thread Thomas Weholt
On Mon, Jul 4, 2011 at 6:09 PM, Ian Clelland wrote: > On Monday, July 4, 2011, Thomas Weholt wrote: >> I've created a templatetag called {% kolibri_imports %} which I use >> the in the head-section of my templates. It imports related to >> stylesheets, javascript li

Re: django/python performance vs play/java

2011-07-06 Thread Thomas Guettler
on is much slower. Thomas On 06.07.2011 01:31, drakkan wrote: > Hi, > > thanks for your comments, I installed django-debug toolbar and I can > confirm I'm doing similar queries from both django and play. The query > I do with hibernate in play should be slower since I'm d

ANN : Kolibri v.0.2.0 - framework for background processing built on celery

2011-07-06 Thread Thomas Weholt
option of taking input from the user before executing background tasks. Screencast at www.weholt.org. Thanks for your attention. -- Mvh/Best regards, Thomas Weholt http://www.weholt.org -- You received this message because you are subscribed to the Google Groups "Django users" grou

Re: Some thoughts on a package/stack compile system for easy distribution of webapps..

2011-07-06 Thread Thomas Weholt
't seen it. Thomas On Wed, Jul 6, 2011 at 9:03 PM, Cal Leeming [Simplicity Media Ltd] wrote: > Hi all, > > After seeing the Facebook video about how their development team > compiles everything into a single binary for easy distribution between > thousands of servers, I tota

Re: django/python performance vs play/java

2011-07-08 Thread Thomas Guettler
n the result. Please post them to the list. Thomas -- Thomas Guettler, http://www.thomas-guettler.de/ E-Mail: guettli (*) thomas-guettler + de -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to dja

Re: What is an "application instance"

2011-07-08 Thread Thomas Denmark
folders with a few files: models.py, views.py and urls.py. That is what happens, when one writes 'admin.py startapp foo'. Is it possible to make several instances of such an application? Thomas On Jul 8, 12:02 pm, Tom Evans wrote: > On Fri, Jul 8, 2011 at 10:45 AM, Thomas Larsen Wes

Re: Django API

2011-07-12 Thread Thomas Guettler
n my company some developer started to create api documentation with epydoc for django. AFAIK they never used it much, I guess it took more time to configure epydoc, than time was spent to read the created stuff. Thomas -- Thomas Guettler, http://www.thomas-guettler.de/ E-Mail: guettli (*) thoma

Re: lost admin on upgrade to django 1.3

2011-07-30 Thread Thomas Orozco
Django 1.3 shipped with staticfiles for static documents, maybe you could look that way. Le 30 juil. 2011 02:10, "zignorp" a écrit : > Hello, > I just upgraded to 1.3 and thought all was well until I tried to access > LOCALHOST/admin/ > Can anyone tell me why I'm getting this exception > > Excepti

Re: Komodo IDE better screenshots (worth reading!)

2011-08-01 Thread Thomas Weholt
have been fixed now, but I got a license for PyCharm cuz of DSE and haven't looked at anything else since. Big thanks to JetBrains for the free license. Apply for a license here : http://www.jetbrains.com/eforms/openSourceRequest.action?licenseRequest=PCOSL. Regards, Thomas On Wed, Jul 20,

Re: Django can't see my static files

2011-08-01 Thread Thomas Orozco
If your css file is locatedr in your staticfiles dir, you should use something such as {{ STATIC_URL }}main.css, assuming your CSS file is called main and is located in one of the STATIC_DIRS. Using staticfiles_dirs in a template makes no sense. Not only your are passing a parameter that has to do

Re: Django can't see my static files

2011-08-02 Thread Thomas Orozco
hings, static is for your actual static files, and media for user-uploaded files, both work pretty much the same way, so it's not a fix to use one in place of the other. Le 2 août 2011 10:28, "Guillaume Chorn" a écrit : > > Thomas and Lokesh, > > Thanks very much for yo

Re: Django can't see my static files

2011-08-02 Thread Thomas Orozco
:28, "Guillaume Chorn" a écrit : > Thomas and Lokesh, > > Thanks very much for your help. I've modified the link in my HTML file to > be: > > /> > > where "stylesheet" is the name of the CSS file, and this file is located > inside the directory l

Re: Django can't see my static files

2011-08-02 Thread Thomas Orozco
Last thing, I made a typo, the address you could use should start with http, like: http://127.0.0.1/static/ Le 2 août 2011 12:01, "Thomas Orozco" a écrit : > A little detail, but you never know: you should put some ' ' in your link. > Like this : > > > > &g

Django raises IOerror in csrf.py middleware

2011-08-02 Thread Thomas Orozco
Hello, I received a traceback from Django and I'm unable to figure out where the error comes from. The form is a basic picture upload form, I've read that this kind of errors do happen when the connection is broken before all data was sent, but here, the crash occured in csrf.py, which it was not

Re: HttpRequest.META['SERVER_PORT'] is a string?

2011-08-02 Thread Thomas Orozco
Basically everything (ok, almost) in request.META is strings, so I guess it would be pretty consistent if for some reason server port wasn't. It's usually your job to normalize data that comes into your application anyways. Le 2 août 2011 23:04, "Roy Smith" a écrit : > I'm running django 1.3. If

Re: if condition in template not working

2011-08-06 Thread Thomas Orozco
In your context you passed your 'lists' object as 'book'. So {% if book %} would work, but your current syntax won't. Le 6 août 2011 19:32, "shakthi" a écrit : > The if condition in my html template is not working, only else is > executing. > > view function is > def test(request): > lists=Book.o

Re: sendmail question

2011-08-08 Thread Thomas Orozco
Open works files that are on your hard drive, not with urls. That is : open('/var/www/myfile') works, but open('http://mysite/myfile') doesn't. You should not use the url of the file but its location on the disk (like /var/mymedia/myfile on Linux). If you really want to open it through the inter

Re: Passing tuple values to a model choices field

2011-08-08 Thread Thomas Orozco
Check out get_FOO_display, there: https://docs.djangoproject.com/en/dev/ref/models/instances/ Le 8 août 2011 11:06, "Kayode Odeyemi" a écrit : > In the Django [1], the example as described below shows how to build Forms > that are tied to a model. > > from django.db import models > from django.for

Re: Passing tuple values to a model choices field

2011-08-08 Thread Thomas Orozco
to do. What I got stuck with is that > the tuple values are not displayed as options in the form select > field(choices). > > Thanks > > On Mon, Aug 8, 2011 at 10:40 AM, Thomas Orozco wrote: > >> Check out get_FOO_display, there: >> https://docs.djangoproject

Re: Passing tuple values to a model choices field

2011-08-08 Thread Thomas Orozco
Like they do in the admin, right ? You might want to check Django's source for the admin forms and templates to get some inspiration then. Hard coding the choices is never a satisfactory solution but I suggest you retrieve them from your models file so you stay DRY compliant and then it's pretty

Re: Set order from admin

2011-08-10 Thread Thomas Orozco
You can use a single foreign key and store last changed in your B model. You can then use object_a.b_set.order_by('myTimeStamp') Le 10 août 2011 10:23, "Isaac" a écrit : -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, se

Keep filtering from change_list in admin in custom page?

2011-08-10 Thread Thomas Weholt
up on the right side of the page. But I want to have a custom page for displaying the actual photos using the same filter set in the change_list page. Is this possible? -- Mvh/Best regards, Thomas Weholt http://www.weholt.org -- You received this message because you are subscribed to the Google

Re: Keep filtering from change_list in admin in custom page?

2011-08-10 Thread Thomas Weholt
Hmmm ... Not sure how to do that. You could say I want an alternative change_list page, but not by overriding or extending the existing default one. Do you know of any example or documentation on how to achive this? Anyway, thanks for your input :-) Regards, Thomas On Wed, Aug 10, 2011 at 11

Re: Keep filtering from change_list in admin in custom page?

2011-08-10 Thread Thomas Weholt
ferent layout, using a different template. Perhaps I'm not understanding what you're saying, but I need the standard change_list as well as the alternative one. But thanks for your help. I see you're very active on the list today. Very good :-) Thomas > If you are go

"Great circle" using the django ORM?

2011-08-11 Thread Thomas Weholt
k and probably the best solution performance wise, but if it has to be done in python I'll do that too. Ref question on stackoverflow: http://stackoverflow.com/questions/4610717/django-determining-if-geographic-coordinates-are-inside-of-an-circle -- Mvh/Best regards, Thomas W

Re: "Great circle" using the django ORM?

2011-08-11 Thread Thomas Orozco
The distance is: Sqrt( Sqr(lat1-lat2) + Sqr(long1-long2) ) Le 11 août 2011 17:09, "Thomas Weholt" a écrit : > I got a model with longitude and latitude and want to be able to find > other objects nearby a selected object. Can this be done using the > django orm? What is the

Re: "Great circle" using the django ORM?

2011-08-11 Thread Thomas Orozco
hu, Aug 11, 2011 at 12:43 PM, Thomas Orozco > wrote: >> The distance is: Sqrt( Sqr(lat1-lat2) + Sqr(long1-long2) ) >> >> Le 11 août 2011 17:09, "Thomas Weholt" a écrit : >>> I got a model with longitude and latitude and want to be able to find >>> oth

Re: "Great circle" using the django ORM?

2011-08-11 Thread Thomas Orozco
Thank you both for the details! Le 11 août 2011 23:04, "Gelonida N" a écrit : > On 08/11/2011 06:43 PM, Thomas Orozco wrote: >> The distance is: Sqrt( Sqr(lat1-lat2) + Sqr(long1-long2) ) > > Try the formula close to the poles and you notice that there is > something

Re: "Great circle" using the django ORM?

2011-08-12 Thread Thomas Weholt
es and interest :-) Regards, Thomas On Thu, Aug 11, 2011 at 7:51 PM, Bill Freeman wrote: > I've done this sort of thing in the past without the aid of geo-django, using > a > reasonably ordinary model. > > I did it as a two step process, first calculating a bounding box, which

Re: "Great circle" using the django ORM?

2011-08-12 Thread Thomas Weholt
after the weekend. Perhaps there's more things features we could add too, like google maps integration, some form of widget to use in the admin etc. Feel free to steal the code or suggest ideas. Thomas On Fri, Aug 12, 2011 at 10:33 AM, Mike Dewhirst wrote: > Thomas > > Don't know if

Re: "Great circle" using the django ORM?

2011-08-12 Thread Thomas Weholt
perly. The current implementation doesn't rely on heavy math operations and seems to be database agnostic, only using the orm. This is old code and worked using sqlite. Not sure how well it plays against postgres or mysql. Thanks for your attention once again. Thomas On Fri, Aug 12, 2

Re: Defunct Processes on Server

2011-08-12 Thread Thomas Orozco
You could avoid starting the child process in your view. If it's a long running process I would actually advocate doing so. This might be due to limited understanding on my part, but what happens when Apache wants to kill its child process because MaxRequests was reached? If you don't need the jo

Re: 3rd party Apps in Django

2011-08-15 Thread Thomas Weholt
Hmmm... Using pip will take care of requirements the package might have and install it in the right python lib folder so several projects can use it among other things. Are there good reasons NOT to use pip/easy_install or at least python setup.py install? Thomas On Mon, Aug 15, 2011 at 2:59

Re: Django-Registration, How can a beginner work with this 3rd party App?

2011-08-15 Thread Thomas Weholt
nline documentation of third-party apps won't be so cryptic. Thomas On Mon, Aug 15, 2011 at 8:38 PM, Andre Lopes wrote: > Hi, another question from a beginner. > > I am getting some trouble to get Django-Registration working. The > on-line > documentation(http://readthedocs.org

Using {% url somenamedview %} in a custom page extending admin templates

2011-08-15 Thread Thomas Weholt
nts '()' and keyword arguments '{}' not found. So the question is; how can I use the url template tag in templates extending the standard admin templates and refer to a view defined in my app by name? What am I now seeing here? -- Mvh/Best regards, Thomas Weholt http://www.weh

Re: New user - Trouble starting

2011-08-15 Thread Thomas Weholt
you dive into python first before getting into django. Thomas On Mon, Aug 15, 2011 at 11:54 PM, squirrel wrote: > I'm trying to start the tutorial (on Windows by the way) and I can't > get anywhere. When I enter "django-admin.py startproject mysite" into > either the i

Re: Detecting camera type from image file

2010-12-22 Thread Thomas Weholt
//groups.google.com/group/django-users?hl=en. > -- Mvh/Best regards, Thomas Weholt http://www.weholt.org -- 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.co

Re: Too many items in my drowndown list

2011-01-03 Thread Thomas Guettler
he dropdownlist? > > > Thanks > -- Thomas Guettler, http://www.thomas-guettler.de/ E-Mail: guettli (*) thomas-guettler + de -- 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...@

<    4   5   6   7   8   9   10   11   12   >