feeds and repetition

2009-01-27 Thread Donn
Hi, Dumb question - In a feed situation, I am using something like: return Page.objects.order_by('-date')[:30] That will always return (say) 30 results. They don't change, it's always the same 30, with perhaps a few new ones. Do I have to worry about this sameness -- or does the syndication

Re: Multithreaded development server

2009-01-27 Thread Malcolm Tredinnick
On Tue, 2009-01-27 at 06:21 -0800, Almad wrote: > On Jan 26, 1:19 am, Russell Keith-Magee > wrote: > > On Sun, Jan 25, 2009 at 10:45 PM,Almad wrote: > > > I still feel kinda weird that I must hack around Django so much to > > > make basic testing things

Re: File as data backend for model

2009-01-27 Thread Malcolm Tredinnick
On Tue, 2009-01-27 at 17:13 -0500, Matthias Julius wrote: > I am trying to write a model for which the data can be represented as > a simple array of a fixed number of one byte integers. To use a > SQL database for that would be very much overkill. I would simply use > a file where I can seek

Re: Bound Inline Formset doesn't render FileField's current value, needs to be reentered.

2009-01-27 Thread Malcolm Tredinnick
On Tue, 2009-01-27 at 14:48 -0800, Rodrigo C. wrote: > > This isn't a Django issue. It's a standard property of browsers: you > > can't set an initial value for file input fields. This is a security > > measure, to stop malicious pages uploading files from your hard drive > > without your

Re: how to: munge words and numbers into a URL, then reverse it ?

2009-01-27 Thread Malcolm Tredinnick
On Tue, 2009-01-27 at 16:48 +0100, felix wrote: > > there is some hashing function or combination of URL encoding that can > do this : > > > given some parameters : > > 'music' 'artist' 32L 2L 100 100 > ( artist id 32, 2nd picture, dimensions 100 x 100 ) > > I wish to generate a fake

Re: DateField comparison with date.today()

2009-01-27 Thread Malcolm Tredinnick
On Tue, 2009-01-27 at 22:03 +, Tim Sawyer wrote: > Hi, > > I have a model that includes: > > from datetime import date as pydate, datetime > > date = models.DateField() > > I've overridden delete to do: > > def delete(self): > ... > if self.date < pydate.today(): >

Re: Setup_environ before or after forking?

2009-01-27 Thread Malcolm Tredinnick
On Tue, 2009-01-27 at 12:56 -0800, Andrew Fong wrote: [...] > Question: Does it make more sense to call setup_environ before or > after forking? I'd do it after forking. > > In particular, I don't know how Django sets up its database > connection. A connection is created the first time you

Re: Extending User model

2009-01-27 Thread Malcolm Tredinnick
On Tue, 2009-01-27 at 21:44 +0100, Alex Rades wrote: [...] > my situation is: It's a site for students and companies, where > students can post their data and search for internships, and companies > post their data, internship opportunities, and search for students. > > So, students have to fill

Re: Common fields in an abstract class, with customized db_column values for concrete models

2009-01-27 Thread Malcolm Tredinnick
On Tue, 2009-01-27 at 11:19 -0800, psj wrote: > Hi community -- > > All my models have some common fields, say "created_date" and > "last_modified_date". However, for various reasons not important here, > we have some naming conventions on column names: we like them to have > a prefix that

Re: Changing comments preview form

2009-01-27 Thread Malcolm Tredinnick
On Tue, 2009-01-27 at 20:11 +0100, Florian Lindner wrote: > Hello, > > I'm playing around with the contrib.comments framework. I want to > change the preview form. For that I've copied preview.html to xgm/Blog/ > templates/comments (xgm is my project, Blog is app). My template > loaders

Re: error when using Create, Update generic views

2009-01-27 Thread Malcolm Tredinnick
On Tue, 2009-01-27 at 19:36 -0800, vierda wrote: > Dear all, > > Today I'm learning to use generic views for create and update objects. > It required form_class or model for the argument. My model is User > from django.contrib.auth.models.User and my form as per below : > > from

Re: Adjusting these models for other functionality

2009-01-27 Thread Malcolm Tredinnick
On Tue, 2009-01-27 at 09:57 -0800, Almost George wrote: > -- MODELS -- ( Other, unimportant fields/models have been removed ) > > class Band(models.Model): > name= models.CharField(max_length = 50, unique = True) > > class Venue(models.Model): > name

Re: Problem with encoding and using ifequal in Django templates

2009-01-27 Thread Malcolm Tredinnick
On Tue, 2009-01-27 at 09:25 -0800, Ben Gerdemann wrote: > Hello, > > I'm having problems using {% ifequal s1 "some text" %} to compare > strings with extended characters in Django templates. When string s1 > contains ascii characters >127, I get exceptions in the template > rendering. I know

Re: passing self?

2009-01-27 Thread Malcolm Tredinnick
On Tue, 2009-01-27 at 08:32 -0800, ajlozier wrote: > I have made a little progress on the problem I posted about earlier > (http://groups.google.com/group/django-users/browse_thread/ > thread/100679d9c298dc52/ffa1564be0c4b276?hl=en=gst=tree > +admin#ffa1564be0c4b276">creating tree inputs in the

Re: Splitting a NullBooleanField in a template

2009-01-27 Thread Malcolm Tredinnick
On Tue, 2009-01-27 at 06:53 -0800, chewynougat wrote: > After having a closer look in django, it seems that the > RadioFieldRenderer that renders the radio buttons, renders the entire > set as a single string, therefore it is not possible to split these > fields in the template (using django) -

error when using Create, Update generic views

2009-01-27 Thread vierda
Dear all, Today I'm learning to use generic views for create and update objects. It required form_class or model for the argument. My model is User from django.contrib.auth.models.User and my form as per below : from django.contrib.auth.models import User from django.forms import ModelForm

Re: reverse foreignkey "add" method using multiple INSERTs

2009-01-27 Thread Malcolm Tredinnick
On Tue, 2009-01-27 at 02:17 -0800, Andrew Ingram wrote: > Hi All, > > I'm using something along the following lines to bulk add a bunch of > objects to a model's reverse foreignkey relationship: > > foo.bar_set.add(*bars) > > where bars is a list of Bar objects. > > I've noticed that Django

Re: template: writing "\u20ac 20.000" fails

2009-01-27 Thread Malcolm Tredinnick
On Tue, 2009-01-27 at 00:37 -0800, SanPy wrote: > Thanks a lot, Malcolm, > > You got me on the right track, I just needed to escape the string, > like this: > > var prices=[{% for price in prices %}[{{ price.0 }}, '{{ price.1| > escape }}']{% if not forloop.last %},{% endif %}{% endfor %}]; >

Settings,py - and Update the MySQL connection

2009-01-27 Thread OMGlookBord
Hi all, I recently had a person make me databases for a website and put them on there for me... I use django - anyway, I got a completely new site - same host/domain name/etc - just a new outlook for the site - however the guy who created my databases told me, that in order get the databases

Re: urlresolvers.reverse() breaks when given exactly one arg of more than one character

2009-01-27 Thread Fluoborate
On Jan 27, 9:14 pm, Malcolm Tredinnick wrote: > This isn't anything to do with reverse(). It's a Python thing. The > "args" argument has to be a sequence. A list or a tuple, for example. Ah, I hadn't thought of that. Somewhere deep within the Django source, something

Re: urlresolvers.reverse() breaks when given exactly one arg of more than one character

2009-01-27 Thread Malcolm Tredinnick
On Tue, 2009-01-27 at 18:07 -0800, Fluoborate wrote: > Hello All, > > I have a question. When I use the function > django.core.urlresolvers.reverse(), it works fine with args=(), and it > works fine with args=(string1, string2 [, ...more strings]), and it > even works fine with

Re: urlresolvers.reverse() breaks when given exactly one arg of more than one character

2009-01-27 Thread Dj Gilcrease
Thats because of an anouing thing with tuples where args=('12') is identical to args='12', you would need to do args=('12',) to make it work right Dj Gilcrease OpenRPG Developer ~~http://www.openrpg.com On Tue, Jan 27, 2009 at 7:07 PM, Fluoborate wrote: > > Hello All, >

urlresolvers.reverse() breaks when given exactly one arg of more than one character

2009-01-27 Thread Fluoborate
Hello All, I have a question. When I use the function django.core.urlresolvers.reverse(), it works fine with args=(), and it works fine with args=(string1, string2 [, ...more strings]), and it even works fine with args=(anyOneCharacterLongString). However, if I give it

Automatically printing display of model object's data

2009-01-27 Thread Brian Ray
Here I have a silly function for pretty printing any model object's data. def pprint(res): for instr in dict(res.__dict__): if instr[-3:] == "_id": instr = instr[:-3] displaymeth = "get_%s_display" % instr try: atr =getattr(res,displaymeth) except: atr

Re: ObjectPaginator

2009-01-27 Thread leonel
Patricio Palma wrote: > Hi guys. > I'm trying to use Rosetta ( http://code.google.com/p/django-rosetta/ ) > > in a view (home, a rosetta views) is using a ObjectPaginator and > InvalidPage but i've a execption > cant find module ObjectPaginator. > > Googling I fix it using > > from

ObjectPaginator

2009-01-27 Thread Patricio Palma
Hi guys. I'm trying to use Rosetta ( http://code.google.com/p/django-rosetta/ ) in a view (home, a rosetta views) is using a ObjectPaginator and InvalidPage but i've a execption cant find module ObjectPaginator. Googling I fix it using from django.core.paginator import Paginator as

Re: Form validated before submitted

2009-01-27 Thread Steve Holden
JonUK wrote: > Solved - problem was caused by these lines > > def __init__(self, *args, **kwargs ): >super( ContactForm, self ).__init__( args, kwargs ) > > changing to explicit parameter names fixed it. > The correct generic form would have been def __init__(self, *args, **kwargs ):

"ImportError: cannot import name SimpleCookie" on access to Django

2009-01-27 Thread Jonathan Prater
I have Django 1.0.2 installed, using mod_python compiled against Python 2.6.1 and Apache 2.2.11. Upon accessing my Django project's configured URL, I get the following errors: [Tue Jan 27 19:33:05 2009] [error] [client 127.0.0.1] Traceback (most recent call last): [Tue Jan 27 19:33:05 2009]

Re: Creating test databases. Nose framework

2009-01-27 Thread Russell Keith-Magee
On Wed, Jan 28, 2009 at 5:51 AM, Oleg Oltar wrote: > Hi! > I am trying to create few nose test for my application. > I need to test registration/login, so want to create a test sqlite3 > database, and pre-populate it with some data. > No sure how to do it. > I created a

Re: Form validated before submitted

2009-01-27 Thread JonUK
Solved - problem was caused by these lines def __init__(self, *args, **kwargs ): super( ContactForm, self ).__init__( args, kwargs ) changing to explicit parameter names fixed it. --~--~-~--~~~---~--~~ You received this message because you are subscribed to

Re: How to change python version in ubuntu???

2009-01-27 Thread Steve Holden
DragonSlayre wrote: > > On Jan 27, 4:11 pm, Steve Holden wrote: > >> DragonSlayre wrote: >> >> >>> On Jan 27, 3:15 pm, Steve Holden wrote: >>> DragonSlayre wrote: >>> How do you do this? >>> >>

Re: Multithreaded development server

2009-01-27 Thread Russell Keith-Magee
On Tue, Jan 27, 2009 at 11:21 PM, Almad wrote: > > P.S.: Sorry for the sarcastic tone of my e-mail. I appreciate Your > work as well as Django framework (or at least some parts of it), but I > just don't get it: for each and every project I've written in Django, > I banged my

Form validated before submitted

2009-01-27 Thread JonUK
I have a ModelForm and a view, but the form's validation messages are always rendered on first viewing - any idea why? # ModelForm class ContactForm( ModelForm ): first_name = CharField( 'Firstname' ) last_name = CharField( 'Lastname' ) company = CharField( 'Company' ) tel =

Re: Creating test databases. Nose framework

2009-01-27 Thread Oleg Oltar
thanks for the doc. So if I have to store a User object in db (with fields (name, email, pass) How should I define the fixture? Should I define it in setup? Also, is there a way I can actually create the test db. Still can't import create_test_db :( On Wed, Jan 28, 2009 at 12:49 AM, Jeff

Re: File as data backend for model

2009-01-27 Thread Jeff Hammerbacher
Hey Matthias, To use Django's model object for this task, you will need to implement a custom manager for your file's structure; you can see some basic documentation at http://docs.djangoproject.com/en/dev/topics/db/managers/#topics-db-managers. It should be noted that Django's ORM is not well

Re: Creating test databases. Nose framework

2009-01-27 Thread Jeff Hammerbacher
Hey Oleg, To load some sample data for your tests, see Django's documentation on fixtures: http://docs.djangoproject.com/en/dev/topics/testing/#fixture-loading. Later, Jeff On Tue, Jan 27, 2009 at 1:05 PM, Karen Tracey wrote: > On Tue, Jan 27, 2009 at 3:51 PM, Oleg Oltar

Re: Bound Inline Formset doesn't render FileField's current value, needs to be reentered.

2009-01-27 Thread Rodrigo C.
> This isn't a Django issue. It's a standard property of browsers: you > can't set an initial value for file input fields. This is a security > measure, to stop malicious pages uploading files from your hard drive > without your explicit instruction. I see. If there's no way to set the initial

Re: in what namespace do widgets reside?

2009-01-27 Thread JonUK
great - thanks! --~--~-~--~~~---~--~~ 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

Re: Bound Inline Formset doesn't render FileField's current value, needs to be reentered.

2009-01-27 Thread Daniel Roseman
On Jan 27, 9:11 pm, "Rodrigo C." wrote: > I have model that represents a file, and has a FileField, that I am > rendering via an Inline Formset. When a user fills in the form it gets > saved with no problems. > However, I want the users to be able to continue editing the

Re: How to change python version in ubuntu???

2009-01-27 Thread shaleh
On Tue Jan 27 12:12 , DragonSlayre sent: > >Thanks Waylan - http://achinghead.com/archive/83/installing-multiple-versions-python/ >is just what I needed. > >Thanks Shaleh, > >I appreciate the detailed explanation :) >Yes - the shell is something that I have to get more familiar with - >I've

Article lists

2009-01-27 Thread Oleg Oltar
Hi! I'm planing to add an article list to my application. The idea is to show every article stored in the database but in a truncated way. So I used the following template tags to produce the list {% autoescape off %} {% for article in list_of_articles %} {{article.title}}

Re: Several browser windows, one session object - should I be locking django session objects?

2009-01-27 Thread Michael Newman
On Jan 27, 4:52 pm, Matthias Julius wrote: > mvtango writes: > > my users keep several browser windows open in my application, I need > > to keep session information for all these windows separate. But I have > > only one session object -

File as data backend for model

2009-01-27 Thread Matthias Julius
I am trying to write a model for which the data can be represented as a simple array of a fixed number of one byte integers. To use a SQL database for that would be very much overkill. I would simply use a file where I can seek to the index position and read or write that byte. While this in

Re: trouble with yesno to generate images

2009-01-27 Thread Steve Holden
Margie wrote: > Thanks very much, autoescape did the trick, here is the result for > anyone interested: > > {% autoescape off %} > {{ task.done|yesno:" \" alt=\"False\" />, \"False\" />" }} > {% endautoescape %} > Neat, but I think you need to correct your first alt

Re: how to: munge words and numbers into a URL, then reverse it ?

2009-01-27 Thread Puneet Madaan
P.S ,,, Never use index in name generation, or you will run out of range one day ;) think of that nightmare in advance... i can only wish further schlaf süß, grüß Puneet On Tue, Jan 27, 2009 at 10:25 PM, felix wrote: > > ah, danke dir ! > > that's exactly what I was

Re: Several browser windows, one session object - should I be locking django session objects?

2009-01-27 Thread Matthias Julius
mvtango writes: > my users keep several browser windows open in my application, I need > to keep session information for all these windows separate. But I have > only one session object - modifying it while the user works in window > A and window B in parallel might get

sites framework with multiple machines

2009-01-27 Thread David Lindquist
I have a client that maintains several hundred small web sites running on dozens of different machines all over the world. These sites have common data (footers, privacy policy pages, etc.) he would like to manage through a single CMS. Currently, he uploads all the changes manually using

DateField comparison with date.today()

2009-01-27 Thread Tim Sawyer
Hi, I have a model that includes: from datetime import date as pydate, datetime date = models.DateField() I've overridden delete to do: def delete(self): ... if self.date < pydate.today(): Notification.process(None, self, 'Event deleted') and that works fine If

Re: Django imagefield at development server

2009-01-27 Thread Akhmat Safrudin
felix wrote: > > on my dev server (laptop) I serve the MEDIA_ROOT through the normal > apache localhost. > I do not get django to serve them. > ok, thank's for your attention, the problem is solved, i don't know how it solved, but with deleting table from database, than create it again with

Re: admin list display icons for callable?

2009-01-27 Thread Paddy Joy
Thanks guys, it was staring me in the face but I didn't get it until the 4th or 5th re-read! Creating links in the list display with allow_tags is a great feature. Paddy On Jan 27, 5:42 pm, Malcolm Tredinnick wrote: > On Mon, 2009-01-26 at 21:51 -0800, Paddy Joy

Re: Django imagefield at development server

2009-01-27 Thread felix
on my dev server (laptop) I serve the MEDIA_ROOT through the normal apache localhost. I do not get django to serve them. ie I do not do this at all: urlpatterns += patterns('', (r'^site-media/(?P.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT}), )

Re: how to: munge words and numbers into a URL, then reverse it ?

2009-01-27 Thread felix
ah, danke dir ! that's exactly what I was looking for full encodings here: http://docs.python.org/library/codecs.html#standard-encodings actually I guess in this case I would have a series of numbers; [ content_type_id, object_id, index, width, height ] rather than a string. I can figure that

Bound Inline Formset doesn't render FileField's current value, needs to be reentered.

2009-01-27 Thread Rodrigo C.
I have model that represents a file, and has a FileField, that I am rendering via an Inline Formset. When a user fills in the form it gets saved with no problems. However, I want the users to be able to continue editing the file, but when I re-display the newly created object, the data for the

Re: Creating test databases. Nose framework

2009-01-27 Thread Karen Tracey
On Tue, Jan 27, 2009 at 3:51 PM, Oleg Oltar wrote: > Hi! > I am trying to create few nose test for my application. > I need to test registration/login, so want to create a test sqlite3 > database, and pre-populate it with some data. > No sure how to do it. > > I created a

Re: Debugging infinite loops

2009-01-27 Thread Andrew Fong
Check out http://docs.python.org/library/logging.html for logging. There's also some Django logging middleware floating around that might be useful -- just Google for it. On Jan 27, 11:45 am, defone wrote: > Hi, > > I'm seeing occasionally bug that is causing an infinite loop.

Setup_environ before or after forking?

2009-01-27 Thread Andrew Fong
I am running a python process separate from my actual Django web server to do background processing. Since I need database access and I like using Django's models, I call django.core.management.setup_environ at the start of my background process. I am now trying to fork the process using the

Creating test databases. Nose framework

2009-01-27 Thread Oleg Oltar
Hi! I am trying to create few nose test for my application. I need to test registration/login, so want to create a test sqlite3 database, and pre-populate it with some data. No sure how to do it. I created a setup method: def setup(): setup_test_environment() create_test_db() But getting

Re: Question about login_required redirect_field_name

2009-01-27 Thread Karen Tracey
On Tue, Jan 27, 2009 at 3:25 PM, Jonathan Nelson wrote: > > I just figured it out. > > Instead of using a decorator, I just used this: > def myview(request, comment_id): > ...if not request.user.is_authenticated(): > ..return HttpResponseRedirect('/login/?next=%s') %

Re: Django imagefield at development server

2009-01-27 Thread Akhmat Safrudin
felix wrote: > no problem uploading using the dev server > > no idea. you didn't leave a pdb in your code, did you ? > > what is the output if any in the shell ? i point the url in the browser to http://localhost:8000/admin/ how to debug with pdb in admin area ? somat. -- Stay Hungry Stay

Re: Django imagefield at development server

2009-01-27 Thread Akhmat Safrudin
phoebebright wrote: > You might also check, > You have DEBUG = True in settings.py > And have permissions set on the photo directory > And have something in urls.py file to point to the photo directory 0. DEBUG was true, 1. to ensure directory is writable, its set to 777, 3. is it some think like

Several browser windows, one session object - should I be locking django session objects?

2009-01-27 Thread mvtango
Hi there, my users keep several browser windows open in my application, I need to keep session information for all these windows separate. But I have only one session object - modifying it while the user works in window A and window B in parallel might get me in trouble if Request A and Request

Re: Question about login_required redirect_field_name

2009-01-27 Thread Karen Tracey
On Tue, Jan 27, 2009 at 2:57 PM, Jonathan Nelson wrote: > > I'm trying to decorate a view function with login_required. I want > the user to be redirected to the current view after they log in. > > I'm trying: > > @login_required(redirect_field_name=request.path) > def

Re: Question about login_required redirect_field_name

2009-01-27 Thread Jonathan Nelson
I just figured it out. Instead of using a decorator, I just used this: def myview(request, comment_id): ...if not request.user.is_authenticated(): ..return HttpResponseRedirect('/login/?next=%s') % request.path On Jan 27, 11:57 am, Jonathan Nelson wrote: > I'm trying

Re: How to change python version in ubuntu???

2009-01-27 Thread DragonSlayre
Thanks Waylan - http://achinghead.com/archive/83/installing-multiple-versions-python/ is just what I needed. Thanks Shaleh, I appreciate the detailed explanation :) Yes - the shell is something that I have to get more familiar with - I've only really recently started using ubuntu for

Debugging infinite loops

2009-01-27 Thread defone
Hi, I'm seeing occasionally bug that is causing an infinite loop. What is the best way to debug these in production environment? I was thinking that why there is no built-in simple profiler in Django, just for example to log how much time it takes to e.g. render each view?

Re: admin-like filters in custom views

2009-01-27 Thread Karen Tracey
On Tue, Jan 27, 2009 at 2:00 PM, bobhaugen wrote: > > Anybody done anything like: > a) using the django admin change_list filters directly in custom views > and templates outside of admin? > or > b) created something *like* the admin change_list filters for use in > custom

Re: in what namespace do widgets reside?

2009-01-27 Thread Ramiro Morales
On Tue, Jan 27, 2009 at 3:42 PM, JonUK wrote: > > Apologies for the daft question, but after 10 mins of trawling through > the official docs and various random google articles, I cannot find > thyis info. I found it by clicking ion "the Module Index" link in the

Question about login_required redirect_field_name

2009-01-27 Thread Jonathan Nelson
I'm trying to decorate a view function with login_required. I want the user to be redirected to the current view after they log in. I'm trying: @login_required(redirect_field_name=request.path) def myview(request, comment_id): return render_to but, I'm getting a "NameError: name

Re: Seperate Email Server - Django

2009-01-27 Thread Ramdas S
Madhav, You need to configure this in your mail server. On Wed, Jan 28, 2009 at 1:17 AM, madhav wrote: > > I am not very sure, whether this posting will be attributed to > sendmail or any other mailing software when compared to Django. I am > using Django 1.0.2. And I

Seperate Email Server - Django

2009-01-27 Thread madhav
I am not very sure, whether this posting will be attributed to sendmail or any other mailing software when compared to Django. I am using Django 1.0.2. And I have requirement like, each user of the site will be mailing any other guy and I have rules for that communication (let them aside for

Re: in what namespace do widgets reside?

2009-01-27 Thread Matías Costa
On Tue, Jan 27, 2009 at 6:42 PM, JonUK wrote: > > Apologies for the daft question, but after 10 mins of trawling through > the official docs and various random google articles, I cannot find > thyis info. django.forms.widgets

Re: Performance using session, passing data from one request to another, use js or not? Best practice?

2009-01-27 Thread Tim Daniel
Thanks for the answer, I was already getting worried about my 'session' way. No caching for know although it doesn't seem difficult to implement. And yes the way you do it would have that advantage, but mine has beautiful urls!! ^^ thanks again, Tim DG

Common fields in an abstract class, with customized db_column values for concrete models

2009-01-27 Thread psj
Hi community -- All my models have some common fields, say "created_date" and "last_modified_date". However, for various reasons not important here, we have some naming conventions on column names: we like them to have a prefix that pertains to the entity itself, so that the Account model has

Changing comments preview form

2009-01-27 Thread Florian Lindner
Hello, I'm playing around with the contrib.comments framework. I want to change the preview form. For that I've copied preview.html to xgm/Blog/ templates/comments (xgm is my project, Blog is app). My template loaders are: TEMPLATE_LOADERS = (

admin-like filters in custom views

2009-01-27 Thread bobhaugen
Anybody done anything like: a) using the django admin change_list filters directly in custom views and templates outside of admin? or b) created something *like* the admin change_list filters for use in custom views and templates outside of admin? or c) got any tips on the simplest way one could

Re: How to change python version in ubuntu???

2009-01-27 Thread shaleh
> >On Mon Jan 26 17:51 , DragonSlayre sent: > >> >> >> >>On Jan 27, 1:41 pm, sha...@speakeasy.net> wrote: >> >>> Does this help? Found via google and ubuntu >forums.https://launchpad.net/~doko/+archive >>> >>> Sorry, I run Debian (which ubuntu is based on), I just apt-get install all >>> of the

Re: JavaScript Slider in Django Form

2009-01-27 Thread oboedude
I had been looking through that documentation already, but it's certainly possible I missed something. I'll give it another look. Thanks for the help guys :) On Jan 23, 5:10 pm, Brian Neal wrote: > On Jan 23, 2:43 pm,oboedude wrote: > [...] > > > How

Re: Custom Template Tag - Passing variable for use in tag processing

2009-01-27 Thread Eric Abrahamsen
On Jan 28, 2009, at 1:52 AM, phoebebright wrote: > > I have duplicated as best I can the processing for handling variables > in custom template tags mentioned in an earlier post but it's not > working for me as I need the value of the variable before I parse it. > Is there another way of making

Re: Extending User with a profile

2009-01-27 Thread Oleg Oltar
Os my bug. It was a mistype in a model. Exception gone now On Tue, Jan 27, 2009 at 8:43 PM, Oleg Oltar wrote: > Hi! > I want to add a profile to every user, that I can register in my > application. In future it should contain such fields as avatar, email, > about_me

Extending User with a profile

2009-01-27 Thread Oleg Oltar
Hi! I want to add a profile to every user, that I can register in my application. In future it should contain such fields as avatar, email, about_me fields I found a snippet how to extend django User model: http://www.b-list.org/weblog/2006/jun/06/django-tips-extending-user-model/ But when added

Re: How to change python version in ubuntu???

2009-01-27 Thread shaleh
On Mon Jan 26 17:51 , DragonSlayre sent: > > > >On Jan 27, 1:41 pm, sha...@speakeasy.net> wrote: > >> Does this help? Found via google and ubuntu forums.https://launchpad.net/~doko/+archive >> >> Sorry, I run Debian (which ubuntu is based on), I just apt-get install all >> of the >>

Re: http links without using URLs.py

2009-01-27 Thread May
Thanks! Ana On Jan 27, 9:51 am, Adam Stein wrote: > Eggs seems to be something related to python packages, not sure exactly > what they are used for.  I needed the PYTHON_EGG_CACHE because my web > server could not write to the default egg cache directory and so I had >

Re: Unicode issue with Oracle

2009-01-27 Thread João Olavo Baião de Vasconcelos
On Tue, Jan 27, 2009 at 12:53 PM, Karen Tracey wrote: > Don't use cx_Oracle 5.0, use a 4.X version. The docs were recently changed > to specify that, after investigation into > http://code.djangoproject.com/ticket/9935 revealed the problem is due to a > bug in cx_Oracle 5.0.

Adjusting these models for other functionality

2009-01-27 Thread Almost George
-- MODELS -- ( Other, unimportant fields/models have been removed ) class Band(models.Model): name= models.CharField(max_length = 50, unique = True) class Venue(models.Model): name= models.CharField(max_length = 50) class

Re: Django imagefield at development server

2009-01-27 Thread phoebebright
You might also check, You have DEBUG = True in settings.py And have permissions set on the photo directory And have something in urls.py file to point to the photo directory On Jan 27, 1:58 pm, Akhmat Safrudin wrote: > dear list, > i am a noob, > i just starting a

Custom Template Tag - Passing variable for use in tag processing

2009-01-27 Thread phoebebright
I have duplicated as best I can the processing for handling variables in custom template tags mentioned in an earlier post but it's not working for me as I need the value of the variable before I parse it. Is there another way of making the variable available? The tag is being called from the

Re: http links without using URLs.py

2009-01-27 Thread Adam Stein
Eggs seems to be something related to python packages, not sure exactly what they are used for. I needed the PYTHON_EGG_CACHE because my web server could not write to the default egg cache directory and so I had it use a temp place. Perhaps somebody else can better explain eggs. On Tue,

in what namespace do widgets reside?

2009-01-27 Thread JonUK
Apologies for the daft question, but after 10 mins of trawling through the official docs and various random google articles, I cannot find thyis info. Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django

Re: http links without using URLs.py

2009-01-27 Thread May
Hello Adam, Thanks! I have already set up several sections for the django site, so I must not have the syntax quite right for apache to ignore the static links. I will work on it. One last question? What are eggs? SetEnv PYTHON_EGG_CACHE /tmp/.python-eggs Thanks, Ana On

Re: http links without using URLs.py

2009-01-27 Thread Brian Neal
On Jan 27, 11:06 am, May wrote: > Hello, > > The tutorial suggests not serving the static pages with this method on > a permanent basis.  Are you using this method for your production > server?  I'm using windows/apache/modpython and I've tried using the > IP address and

Comma as a decimal separator

2009-01-27 Thread Fabio Natali
Hi everybody there! :-) I have a decimal field and I wish I could use a comma as a separator between the integer and the decimal part (according to my country habit). How do you think I can manage that? I found this snippet [0], which seems promising. The thing is, I need to use that field in

Re: Problem with encoding and using ifequal in Django templates

2009-01-27 Thread Ben Gerdemann
Sometimes there's nothing like describing a problem to someone else to help you solve it. :) I should have marked the Python strings as Unicode like this and everything works now: def test(request): return render_to_response("test.html", { "s1":

Re: http links without using URLs.py

2009-01-27 Thread Marco Buttu
On Tue, 2009-01-27 at 08:42 -0800, May wrote: > I'm converting PHP pages to Django. I'm using base.html for my > formatting. I've included the left-side bar in the base.html, which > includes links that do not require using a database, such as the > "contact us" page. Since I'm using

Problem with encoding and using ifequal in Django templates

2009-01-27 Thread Ben Gerdemann
Hello, I'm having problems using {% ifequal s1 "some text" %} to compare strings with extended characters in Django templates. When string s1 contains ascii characters >127, I get exceptions in the template rendering. What am I doing wrong? I'm using UTF-8 coding throughout the rest of

Re: http links without using URLs.py

2009-01-27 Thread Adam Stein
I ONLY use it for development with the Django server. I only set up to serve static pages when DEBUG = True (as they show toward the bottom of the page). No need to change links on the production server (apache + mod_python) because the URLs are a different location than what I have set up for

Re: http links without using URLs.py

2009-01-27 Thread May
Hello, The tutorial suggests not serving the static pages with this method on a permanent basis. Are you using this method for your production server? I'm using windows/apache/modpython and I've tried using the IP address and still run into django url requests. Do you know of a way to get

Re: http links without using URLs.py

2009-01-27 Thread Adam Stein
Check out: http://docs.djangoproject.com/en/dev/howto/static-files/?from=olddocs I have Django serve static files during development so that all my links that don't need to go thru Django work. On Tue, 2009-01-27 at 08:42 -0800, May wrote: > Hello, > > I'm converting PHP pages to Django. I'm

Re: how to: munge words and numbers into a URL, then reverse it ?

2009-01-27 Thread Puneet Madaan
I am assuming that you already have an idea of how your datastring will look like, and what data it is containing... I am considering *"music artist 32L 2L 100 100"* as input data so here is a example... L1 = "music artist 32L 2L 100 100".encode("hex") > L2 = zlib.compress(L1) > L3 =

http links without using URLs.py

2009-01-27 Thread May
Hello, I'm converting PHP pages to Django. I'm using base.html for my formatting. I've included the left-side bar in the base.html, which includes links that do not require using a database, such as the "contact us" page. Since I'm using localhost for testing my link looks something like

passing self?

2009-01-27 Thread ajlozier
I have made a little progress on the problem I posted about earlier (http://groups.google.com/group/django-users/browse_thread/ thread/100679d9c298dc52/ffa1564be0c4b276?hl=en=gst=tree +admin#ffa1564be0c4b276">creating tree inputs in the admin) but am getting stuck on what i am sure is a very

  1   2   >