Re: Double encoded slash in path_info removed when using apache/wsgi

2008-10-07 Thread Merrick
Could this problem be in the wsgi.py handler in django? If not I suppose I need to look at mod_wsgi and quit asking here :) On Oct 7, 4:05 pm, Merrick <[EMAIL PROTECTED]> wrote: > I need urls that contain other urls within them i.e. > > http://mydomain.com/find/http%3A%2F%2Fwww.wired.com%2F%2F >

Re: Django Hosting Survey

2008-10-07 Thread Ross Dakin
I'll chime in for Slicehost. I have the 256 plan and it's great. A few notes: 1) It is a time sink to set it up, but they have many tutorials online (publicly available) that do a great job of holding your hand if you aren't a Linux guru (like I'm not). 2) You'll want to fiddle with the Apache

Branching proj/myapp into branch/0.1/myapp breaks

2008-10-07 Thread Gerard Petersen
Hi all, This might be somewhat off topic, but I'm moving my django project into another directory (svn branch). It was here: /home/gerard/files/python/djapp/(myapp) I want it here: /home/gerard/files/python/djapp/branches/0.1/(myapp) When the project dir is named 0.1 instead of djapp I get a

Re: request.POST.get is not working

2008-10-07 Thread theaellen
Hope you have solved this problem already. I ran into a similar problem today while trying to use something like task = request.POST.get('task') which I thought should work since it worked for GET. I have a large list to pass back and GET did not have enough room. I ended up doing something li

Re: timeit module put my app into infinite loop

2008-10-07 Thread K*K
Thank you, Bruno. My program running ok with your guide. My goal is to compare the ORM performance of Django and TurboGears(SQLObject or SQLAlchemy). So write the test scripts. To process 1000 times data, django's test result is below: Insert Speed: 0.766191005707 Select Speed: 0.027615070343

Re: Generating widget based on class type for a Custom Form

2008-10-07 Thread Ronny Haryanto
On Tue, Oct 7, 2008 at 7:31 PM, Leon Yeh | New Avenue.net <[EMAIL PROTECTED]> wrote: > Hi Ronny, terima kasih... :-) Sama-sama :-) > I am trying to generate different output for css styling purpose. > > For example for select widget I need to generate > > > and for other controls, I need to g

Re: i18n in templates and views

2008-10-07 Thread J
This is perfect! Thank you Malcolm. One more question--simpler this time: How would I include the "date" field from the first model ("Post") in the queryset created from "PostI18N", using something similar to: queryset = PostI18N.objects.filter(lang=get_language()).order_by('post__date') Would

Re: random quote help

2008-10-07 Thread Steve Holden
Bobby Roberts wrote: > Hi. I have a project with one template only. I am trying to get a > random quote from the database pushed up to the template so that a new > quote is shown with each new page url or each page refresh. Can > someone point out in the docs where this is covered or help me >

Organizing apps without using projects

2008-10-07 Thread Brent Hagany
My apologies if this has been brought up before on this group - my searching did not turn up anything, but my search skills are notoriously suspect. I have been reorganizing my code so that it does not depend on the project (mostly with success) after watching James Bennet's talk at Djangocon abo

Re: random quote help

2008-10-07 Thread Bobby Roberts
> Is your problem the mechanics of *making* the random choice, or are you > uncertain how to get it into your output? Hi Steve - Yeah i know the randomization needs to be in the view and then pushed back to the template. How would I call the view on each page in the website? thanks in advance

Re: Extend contrib.comments?

2008-10-07 Thread Eric Abrahamsen
On Oct 7, 2008, at 11:38 PM, fitzage wrote: > > I want to add one additional piece of data to the comment form. > Basically a checkbox that says whether or not the commenter wants to > be notified of followup comments. I just did exactly this, and found that what works best is not just to add

random quote help

2008-10-07 Thread Bobby Roberts
Hi. I have a project with one template only. I am trying to get a random quote from the database pushed up to the template so that a new quote is shown with each new page url or each page refresh. Can someone point out in the docs where this is covered or help me understand the urls.py structur

pre_delete, post_delete signals for contrib.contenttypes

2008-10-07 Thread Andrew Fong
Let's say you have model A with a foreign key link to model B -- that is, A depends on B. If you delete model B, then model A is removed as well. You will also get two sets of deletion signals. One for A and one for B. When using a generic relation however, the signals for A are not sent when yo

Problem generating permalink for date-based view

2008-10-07 Thread Brandon Taylor
Hi everyone, I'm using the generic date-based views. Here's a snippet of my "Entry" model for a blog: #models.py pub_date = models.DateTimeField(auto_now_add=True) @models.permalink def get_month_entries(self): return ('archive_month', (), { 'year' : self.pub_date.s

Re: Conditions in templates

2008-10-07 Thread hasan_aljudy
You can't really do it that easily with the default django template language, bu check out Jinnja2, http://jinja.pocoo.org/2/documentation/ it's an alternative template language/system that can be plugged into django. it offers what you need and more useful features that save you time and make yo

Re: Specify that syncdb not create a table for a Model

2008-10-07 Thread Malcolm Tredinnick
On Tue, 2008-10-07 at 17:59 -0700, Ed Anuff wrote: > I reviewed this thread from March on whether it's possible to mark a > Model so that syncdb doesn't create the table for specific Models and > was wondering if there are any updates to this: > > http://groups.google.com/group/django-users/brow

Re: Serving static file on Windows

2008-10-07 Thread Kevin wu
dont use MEDIA_ROOT, you can define a new label. e.g : mediaroot . On Oct 5, 3:19 am, mrsource <[EMAIL PROTECTED]> wrote: > I can upload images on the right place in the file system, but then > django don't serve them. > I'm using the development server and the current SVN version of > django. >

Re: generic.date_based.archive_year throws "invalid literal for int() with base 10: ''

2008-10-07 Thread Brandon Taylor
Oh for $hit's sake - how can I be so blind?! Thanks Malcom, Brandon On Oct 7, 7:48 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Tue, 2008-10-07 at 16:01 -0700, Brandon Taylor wrote: > > Hi everyone, > > > Here is my code: > > > entry_info_dict = { > >     'queryset' : Entry.live.all(),

Specify that syncdb not create a table for a Model

2008-10-07 Thread Ed Anuff
I reviewed this thread from March on whether it's possible to mark a Model so that syncdb doesn't create the table for specific Models and was wondering if there are any updates to this: http://groups.google.com/group/django-users/browse_thread/thread/ba928abb39db2e31?tvc=2 I'm integrating with

Re: generic.date_based.archive_year throws "invalid literal for int() with base 10: ''

2008-10-07 Thread Malcolm Tredinnick
On Tue, 2008-10-07 at 16:01 -0700, Brandon Taylor wrote: > Hi everyone, > > Here is my code: > > entry_info_dict = { > 'queryset' : Entry.live.all(), > 'date_field' : 'pub_date', > 'allow_future' : True > } > > urlpatterns = patterns('django.views.generic.date_based', > url(r'^

Re: i18n in templates and views

2008-10-07 Thread Malcolm Tredinnick
On Tue, 2008-10-07 at 18:23 -0400, J wrote: > Hi everyone, > > I'm working on a bilingual website in django for which the visitor has > the option of choosing which language he/she prefers. All the > interface, as well as the content, will be available in Spanish and > English. The interface is

Re: Conditions in templates

2008-10-07 Thread Malcolm Tredinnick
On Tue, 2008-10-07 at 13:43 -0700, Kasper Grubbe wrote: > Hi again. > > In my application i need to know if a number in a list is bigger than > 1000 or got 4 letters in it. I have to do this in my template. > > This is my code in the template: > > {% for menuitem in availList %} > {% if

Re: generic.date_based.archive_year throws "invalid literal for int() with base 10: ''

2008-10-07 Thread Steve Holden
Brandon Taylor wrote: > My db record's pub_date field value is: 2008-09-17 16:39:52 > > When I step through the debugger for archive year, and the following > code is executed: > > lookup_kwargs = {'%s__year' % date_field: year} > > 'year' is being passed in from the keyword argument ?P from the >

Re: Access a model's original get_absolute_url

2008-10-07 Thread Malcolm Tredinnick
On Tue, 2008-10-07 at 14:49 +0300, Erik Allik wrote: > Hi everybody, > > I need a way to access a model's original get_absolute_url after the > ABSOLUTE_URL_OVERRIDES settings has taken effect. Currently I've > patched Django for this need so it will always alias the existing > get_absolut

Re: Where do custom fields go?

2008-10-07 Thread Penguin
Ah okay, thanks Donn. On Oct 8, 12:04 am, Donn <[EMAIL PROTECTED]> wrote: > > I've been playing with custom fields, but I'm not sure where the > > python script containing the custom field definition goes? > > Anywhere you can reach it with an import statement. I put mine alongside > models.py et

Re: generic.date_based.archive_year throws "invalid literal for int() with base 10: ''

2008-10-07 Thread Brandon Taylor
My db record's pub_date field value is: 2008-09-17 16:39:52 When I step through the debugger for archive year, and the following code is executed: lookup_kwargs = {'%s__year' % date_field: year} 'year' is being passed in from the keyword argument ?P from the URL, but once it hits this function,

Double encoded slash in path_info removed when using apache/wsgi

2008-10-07 Thread Merrick
I need urls that contain other urls within them i.e. http://mydomain.com/find/http%3A%2F%2Fwww.wired.com%2F%2F I am using Apache 2.2.3-4, mod_wsgi 2.0-1 and have "AllowEncodedSlashes On" within my virtualhost conf file, this setting allows me to have encoded slashes in the path_info without havi

generic.date_based.archive_year throws "invalid literal for int() with base 10: ''

2008-10-07 Thread Brandon Taylor
Hi everyone, Here is my code: entry_info_dict = { 'queryset' : Entry.live.all(), 'date_field' : 'pub_date', 'allow_future' : True } urlpatterns = patterns('django.views.generic.date_based', url(r'^blog/(?P)\d{4}/$', 'archive_year', entry_info_dict, name='archive_year'), ) So, w

i18n in templates and views

2008-10-07 Thread J
Hi everyone, I'm working on a bilingual website in django for which the visitor has the option of choosing which language he/she prefers. All the interface, as well as the content, will be available in Spanish and English. The interface is set up to be handled by gettext and django's has excellent

Re: Can M2M be one-way?

2008-10-07 Thread Karen Tracey
On Tue, Oct 7, 2008 at 6:01 PM, Dylan Reinhardt <[EMAIL PROTECTED]>wrote: > > Is there any way to make Django ManyToManyField objects not be bi- > directional? > > I have a Product object with a self-referencing M2M field. I want > each Product to maintain its *own* list of related products... I

Re: timeit module put my app into infinite loop

2008-10-07 Thread bruno desthuilliers
On 7 oct, 17:54, "K*K" <[EMAIL PROTECTED]> wrote: Just a couple more (slightly OT) notes: > I'm writing a program to test django's mysql performance, "django's mysql performance" doesn't really makes sense. What you're testing with your code is the combined perfs of - Django's orm - Python's My

Can M2M be one-way?

2008-10-07 Thread Dylan Reinhardt
Is there any way to make Django ManyToManyField objects not be bi- directional? I have a Product object with a self-referencing M2M field. I want each Product to maintain its *own* list of related products... I do not want Products affecting each other's lists. When A points to B, I don't neces

Re: timeit module put my app into infinite loop

2008-10-07 Thread bruno desthuilliers
On 7 oct, 17:54, "K*K" <[EMAIL PROTECTED]> wrote: > Hi, all > > I'm writing a program to test django's mysql performance, use timeit > to profile. But it make my app into infinite loop. I'm probably a bit tired, but I don't see how the below snippet could cause an infinite loop - unless you did s

Re: custom field problem w/Django v1.0

2008-10-07 Thread Siemster
Not being a Python guru by any stretch of the imagination, I have no idea if the following is a proper way to do it, but adding: " def __unicode__(self): return u'MAC Address' " to the MacAddressField class definition does work. For my purposes. As long as I'm o.k. with the label alway

Re: Django Admin, Custom Views and the ChangeList object

2008-10-07 Thread Brandon Taylor
Thanks Karen! On Oct 7, 4:43 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > On Tue, Oct 7, 2008 at 2:43 PM, Brandon Taylor <[EMAIL PROTECTED]>wrote: > > > > > > > Hi everyone, > > > On a recent project, I was tasked with adding a workflow around a > > model, which required some customization in

Re: Django Admin, Custom Views and the ChangeList object

2008-10-07 Thread Karen Tracey
On Tue, Oct 7, 2008 at 2:43 PM, Brandon Taylor <[EMAIL PROTECTED]>wrote: > > Hi everyone, > > On a recent project, I was tasked with adding a workflow around a > model, which required some customization in the admin. I found that > when I did and override of a view, I no longer had access to the "

Re: django-basic-blog

2008-10-07 Thread bruno desthuilliers
On 7 oct, 21:58, R C <[EMAIL PROTECTED]> wrote: > I'm very, very new to django > > I tried installing the basic-blog application > (http://code.google.com/p/django-basic-apps/source/browse/#svn/trunk/ > blog) > When I run: > python manage.py runserver > > I get an error (in red font): > Error: N

Re: auth.login problems in Django 1.0

2008-10-07 Thread Cold
I got exactly the same problem, with the nearly the same code. I used pdb and check that login(request, user) is well called. But in the next view, in my template i do a {% user.is_authenticated %}, and it seams that the user is not logged in. Someone have an idee ? bug or wrong session configurat

django-basic-blog

2008-10-07 Thread R C
I'm very, very new to django I tried installing the basic-blog application (http://code.google.com/p/django-basic-apps/source/browse/#svn/trunk/ blog) When I run: python manage.py runserver I get an error (in red font): Error: No module named basic the blog folder is in: /home/myusername/local

Re: re-direction after login successfully

2008-10-07 Thread Bob
The setting LOGIN_REDIRECT_URL will allow you to change the default. On Sep 4, 7:07 pm, zissan <[EMAIL PROTECTED]> wrote: > It's seemd that Django has set /accounts/profile as default page after > login successfully. > I wonder if we can re-direct it to a custom page? --~--~-~--~~---

Conditions in templates

2008-10-07 Thread Kasper Grubbe
Hi again. In my application i need to know if a number in a list is bigger than 1000 or got 4 letters in it. I have to do this in my template. This is my code in the template: {% for menuitem in availList %} {% if menuitem|length > 3 %} {{ menuitem }} {% else %}

Re: re-direction after login successfully

2008-10-07 Thread Pablo Catalina
May be, you want this... http://docs.djangoproject.com/en/dev/ref/settings/#setting-LOGIN_REDIRECT_URL 2008/10/7 KillaBee <[EMAIL PROTECTED]> > > > > On Sep 5, 5:57 am, "Genis Pujol Hamelink" <[EMAIL PROTECTED]> > wrote: > > You can create a view like: > > > > @login_required > > def index(req

Re: Multiple ManyToMany relations with the same class

2008-10-07 Thread Ariel Mauricio Nunez Gomez
Por cierto, cuando ya este la base de datos llena de actuaciones nos invitas a escuchar a los samberos. Ariel. On Tue, Oct 7, 2008 at 12:05 PM, Pablo Catalina <[EMAIL PROTECTED]>wrote: > # python manage.py validate > Error: One or more models did not validate: > concerts.concert: Accessor for m

Date-based generic views and 404 errors

2008-10-07 Thread Brandon Taylor
Hi everyone, I'm following along with the Blog example in the Practical Django Projects book. Here are my URLs: entry_info_dict = { 'queryset' : Entry.live.all(), 'date_field' : 'pub_date' } urlpatterns = patterns('django.views.generic.date_based', url(r'^blog/$', 'archive_index', e

Re: html inserted into csv file

2008-10-07 Thread jonknee
On Oct 7, 2:44 pm, Bobby Roberts <[EMAIL PROTECTED]> wrote: > This code drops all selected fields into a temporary csv file named > "contact.csv" so that it can be downloaded.  However, the template > HTML is being appended after the last record in the csv file. > > Is there any way to prevent th

Re: seeking help in model design...

2008-10-07 Thread paul
hey david, ah - thanks so much! i made two mistakes: using abstract - and linking to self rather than to Node. i'm guessing here - butu are two models/tables created and linked together rather than a single 'uber' table? anyway, i'm back up and running on my fledgling project - thanks to you!

Re: re-direction after login successfully

2008-10-07 Thread KillaBee
On Sep 5, 5:57 am, "Genis Pujol Hamelink" <[EMAIL PROTECTED]> wrote: > You can create a view like: > > @login_required > def index(request): > >     if request.user.is_authenticated(): >         return HttpResponseRedirect('/go/here/') > >     else: >         return render_to_response("go/loginp

Re: Django Hosting Survey

2008-10-07 Thread Brandon Taylor
WebFaction definitely gets my vote. Setting up a Django app with their control panel couldn't be easier, and their customer service is excellent. Brandon Taylor bTaylor Design www.btaylordesign.com On Oct 6, 12:30 pm, Jeff <[EMAIL PROTECTED]> wrote: > I am about to begin a new Django project an

Re: adding date to template

2008-10-07 Thread KillaBee
On Oct 7, 1:49 pm, KillaBee <[EMAIL PROTECTED]> wrote: > On Oct 6, 4:44 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > > > > > On Mon, Oct 6, 2008 at 4:55 PM, KillaBee < > > > [EMAIL PROTECTED]> wrote: > > > Thanks I have read the forms doc. and it helped a great deal. > > > now I am get this e

Re: adding date to template

2008-10-07 Thread KillaBee
On Oct 7, 1:49 pm, KillaBee <[EMAIL PROTECTED]> wrote: > On Oct 6, 4:44 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > > > > > On Mon, Oct 6, 2008 at 4:55 PM, KillaBee < > > > [EMAIL PROTECTED]> wrote: > > > Thanks I have read the forms doc. and it helped a great deal. > > > now I am get this e

Re: adding date to template

2008-10-07 Thread KillaBee
On Oct 7, 1:49 pm, KillaBee <[EMAIL PROTECTED]> wrote: > On Oct 6, 4:44 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > > > > > On Mon, Oct 6, 2008 at 4:55 PM, KillaBee < > > > [EMAIL PROTECTED]> wrote: > > > Thanks I have read the forms doc. and it helped a great deal. > > > now I am get this e

Re: adding date to template

2008-10-07 Thread KillaBee
On Oct 6, 4:44 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > On Mon, Oct 6, 2008 at 4:55 PM, KillaBee < > > > > [EMAIL PROTECTED]> wrote: > > Thanks I have read the forms doc. and it helped a great deal. > > now I am get this error:'QueryDict' object has no attribute 'method' > > at line 12. >

Re: adding date to template

2008-10-07 Thread KillaBee
On Oct 6, 4:44 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > On Mon, Oct 6, 2008 at 4:55 PM, KillaBee < > > > > [EMAIL PROTECTED]> wrote: > > Thanks I have read the forms doc. and it helped a great deal. > > now I am get this error:'QueryDict' object has no attribute 'method' > > at line 12. >

html inserted into csv file

2008-10-07 Thread Bobby Roberts
HI group. I'm using the python csv writer to drop a csv file available for download/opening when a button is clicked on my site. The code is shown here myselchecks=selchecks sql="select * from inquiries where inquiry_id = (%s)" %myselchecks ctx.request.write_header('Content-Ty

Django Admin, Custom Views and the ChangeList object

2008-10-07 Thread Brandon Taylor
Hi everyone, On a recent project, I was tasked with adding a workflow around a model, which required some customization in the admin. I found that when I did and override of a view, I no longer had access to the "cl", or ChangeList object containing all of the objects for the view. Filters and o

Re: Too many values to unpack

2008-10-07 Thread mthorley
Alright then, I found the answer to my own question. A patch for "optgroups" was added to the ChoiceField at revision 7977. As it turns out my custom widget breaks because it relies on the behavior of ChoiceField before the patch. In order to fix the problem I'll have to update my custom widget.

Re: seeking help in model design...

2008-10-07 Thread David Hall
Hi Paul, So long as the common model is not abstract, it should work. Also, the common model must be the one that contains the parent field, and it should link to "Node" and not "self". Using my first example, you should be able to traverse the tree using Node.parent and Node.children. Trav

Re: Django Hosting Survey

2008-10-07 Thread James Matthews
I use dreamhost and am very happy. I have found there services (uptime and performance) to workout quite well and i love there tech support team. On Tue, Oct 7, 2008 at 7:55 AM, Benjamin Buch <[EMAIL PROTECTED]> wrote: > > > Am 07.10.2008 um 15:49 schrieb Gour: > > > Benjamin> I can recommend dja

Re: Too many values to unpack

2008-10-07 Thread mthorley
Thanks that helps quite a bit. I see now, it expects each item/element in 'v' to be two-element tuple. Does any one know if there was a change made to the format of the choices argument for forms in django 1.0? -- matthew On Oct 7, 10:37 am, Steve Holden <[EMAIL PROTECTED]> wrote: > mthorley wr

Re: setting a pre-selected value for the ChoiceField

2008-10-07 Thread Ugandhar Reddy
I had similar requirement i.e showing a pre-selected value in the ChoiceField after looking into the ChoiceField django code its become clear to me that the value of the text to be assigned to initial. With this change country field in the Form object looks like: country = forms.ChoiceField(req

Re: Multiple ManyToMany relations with the same class

2008-10-07 Thread Pablo Catalina
# python manage.py validate Error: One or more models did not validate: concerts.concert: Accessor for m2m field 'musicans' clashes with related m2m field 'person.concert_set'. Add a related_name argument to the definition for 'musicans'. concerts.concert: Accessor for m2m field 'coches' clashes wi

Implementing "Friends application" using many-to-many relationship on self

2008-10-07 Thread NEX
Hi everybody, I was trying to add friend network feature to my site. But I have to use User model from django.contrib.auth . I tried extending User model and added a many-to-many field in the extended model. But then I was unable to retrieve all the connections(friends) using the "_set" feature. P

Re: Too many values to unpack

2008-10-07 Thread Steve Holden
mthorley wrote: > I just upgraded to django 1.0 and started getting this error. I was > already using newforms and am quite surprised and dumbfounded by the > errror. Generally this error would be caused by a missing comma in a > tuple, but that appears to not be my case. > > I added some print

Re: seeking help in model design...

2008-10-07 Thread paul
hi david, many thanks for your help there. i initially tried the inheritance method - buut found that my tree traversal broke when trying to traverse a tree made of different types (ie, Node & Jobs). maybe i did something wrong? ie, should i be able to make a tree from those two types if derive

timeit module put my app into infinite loop

2008-10-07 Thread K*K
Hi, all I'm writing a program to test django's mysql performance, use timeit to profile. But it make my app into infinite loop. always write data into database. How can I resolve it ? The source code like below: import timeit from django.shortcuts import render_to_response from testDjango.be

Too many values to unpack

2008-10-07 Thread mthorley
I just upgraded to django 1.0 and started getting this error. I was already using newforms and am quite surprised and dumbfounded by the errror. Generally this error would be caused by a missing comma in a tuple, but that appears to not be my case. I added some print statements (to django/forms/f

Re: Django Hosting Survey

2008-10-07 Thread Benjamin Buch
Am 07.10.2008 um 15:49 schrieb Gour: > Benjamin> I can recommend djangohosting (http://djangohosting.ch), at > Benjamin> least if you're looking for a host in europe... > Heh, nice to hear...I'm also considering to take it... > > Is it OK for production site as well? I'm only hosting personal

simple bookkeeping package

2008-10-07 Thread copelco
Hello! Just thought I'd ping the list to announce a simple Django bookkeeping package we've been working on here at Caktus. minibooks helps you manage invoicing, receipts, bank and credit card statement reconciliation, project reports, etc. The project is is free and open source! It is still i

Extend contrib.comments?

2008-10-07 Thread fitzage
I want to add one additional piece of data to the comment form. Basically a checkbox that says whether or not the commenter wants to be notified of followup comments. I know how to add the checkbox. I just created a comments/form.html template and added the checkbox to it. I know that the data is

Django book Capitulo 7 -spanish-

2008-10-07 Thread flomanadj
El capítulo séptimo de este libro Django Book, tiene algunos errores, y falta de explicaciones. Agrego los cambios que realice para poder evitar los errores de ejecución: http://flomana.spaces.live.com/blog/cns!3550E4D9E2BD3A98!1333.entry --~--~-~--~~~---~--~--

Re: Pyjamas-Desktop and Pyjamas

2008-10-07 Thread Finder
Wow, this is kindof of an exciting combo. Thanks! On Sep 9, 7:12 pm, bedros <[EMAIL PROTECTED]> wrote: > thanks, this looks very promising, I'll try it out > > On Sep 6, 1:51 pm, lkcl <[EMAIL PROTECTED]> wrote: > > > > words, the code that _was_ handed to the pyjamas compiler is instead > > > han

Re: Django Admin - Does not see templates, images or templates.

2008-10-07 Thread Karen Tracey
On Tue, Oct 7, 2008 at 10:50 AM, NoviceSortOf <[EMAIL PROTECTED]> wrote: > > > Yes I restarted, but I also noticed in urls.py > > 2 distinct suggested admin url patterns... > > (r'^admin/', include('django.contrib.admin.urls')), > # (r'^admin/(.*)', admin.site.root), > > Commenting out the second

Re: Django Admin - Does not see templates, images or templates.

2008-10-07 Thread NoviceSortOf
Yes I restarted, but I also noticed in urls.py 2 distinct suggested admin url patterns... (r'^admin/', include('django.contrib.admin.urls')), # (r'^admin/(.*)', admin.site.root), Commenting out the second entry seems to correct the admin_urls problem. Why does the documentation suggest (r'^a

Re: Django + tiny_mce

2008-10-07 Thread Brian Jones
I fixed it. Once I knew that the APPEND_SLASH was kicking in *because* the url couldn't be found, I just moved the relevant line in my urlconf to be the first one in my 'urlpatterns' tuple, and from there I believe everything in the example in the book "just worked". It is unbelievably annoying th

Re: Storage of files in database

2008-10-07 Thread john
On Oct 7, 2008, at 8:29 AM, Mariana Romão wrote: > Hi, > I'm new in the group and in the use of Dajngo too. > I'm developing an application that needs storage files ".py" in > database (and maybe other types of files). I thought Django did this > "automatically" when I define the field in th

Re: dynamic associations?

2008-10-07 Thread Alex G
I had not, actually, but it seems like it provides for exactly what I'm trying to do. I will look into it further, thank you. On Oct 6, 6:25 pm, bruno desthuilliers <[EMAIL PROTECTED]> wrote: > On 6 oct, 23:53, Alex G <[EMAIL PROTECTED]> wrote:> Dear django-users, > > > Does anyone know of a way

Re: Django Hosting Survey

2008-10-07 Thread Jarek Zgoda
Wiadomość napisana w dniu 2008-10-07, o godz. 15:49, przez Gour: >> "Benjamin" == Benjamin Buch <[EMAIL PROTECTED]> writes: > > Benjamin> I can recommend djangohosting (http://djangohosting.ch), at > Benjamin> least if you're looking for a host in europe... It doesn't > Benjamin> seem like y

Re: Can this be solved without hardcoded SQL?

2008-10-07 Thread Adi Jörg Sieker
Hi, Kasper Grubbe wrote: > Hi guys. > > I have a date in my database. And i want to list all years and months > in that, without duplicates. For an example i want to print out (only > if they exists in the database): > > 2008: > January > August > December > > 2007: > September > December > > I c

Re: Django + tiny_mce

2008-10-07 Thread Brian K. Jones
Sorry for the mix up. The log messages I pasted in are from yet another test config, but they're the same return codes I get, and the same addslash behavior... I'll see what I can do to figure out why the url wouldn't be matching. Thanks. On Oct 7, 9:30 am, "Karen Tracey" <[EMAIL PROTECTED]> wrot

Re: dynamic associations?

2008-10-07 Thread Alex G
Ah, it works for me too, except in the case of relations. Essentially, it all comes down to one line of code; given an instance model, a method as a string, and a secondary instance of a model, something like: getattr(model_instance, attr_name).add(model_to_add) So, something like: >>> from pr

Re: Django Hosting Survey

2008-10-07 Thread Gour
> "Benjamin" == Benjamin Buch <[EMAIL PROTECTED]> writes: Benjamin> I can recommend djangohosting (http://djangohosting.ch), at Benjamin> least if you're looking for a host in europe... It doesn't Benjamin> seem like you do, but I thought I should mention it anyway... Benjamin> It's great fo

Re: Django Hosting Survey

2008-10-07 Thread Masklinn
On 6 Oct 2008, at 19:30 , Jeff wrote: > I am about to begin a new Django project and I am currently evaluating > hosting options. I know there has been a number of discussions on this > topic, and I have read most of them. However, seeing how quickly > things change in the web development / hosti

Re: Django + tiny_mce

2008-10-07 Thread Karen Tracey
On Tue, Oct 7, 2008 at 9:07 AM, Brian K. Jones <[EMAIL PROTECTED]> wrote: > > This scenario has been brought up before, but I'm having a problem > that hasn't yet been reported. I was unable to reply to the whole list > in the google groups interface - only "Reply to author" was available. > Here'

Django + tiny_mce

2008-10-07 Thread Brian K. Jones
This scenario has been brought up before, but I'm having a problem that hasn't yet been reported. I was unable to reply to the whole list in the google groups interface - only "Reply to author" was available. Here's the thread for reference: http://groups.google.com/group/django-users/browse_threa

Re: Generating widget based on class type for a Custom Form

2008-10-07 Thread Jarek Zgoda
Wiadomość napisana w dniu 2008-10-07, o godz. 14:36, przez Ulises: > >> and for other controls, I need to generate >> > > How about using widget.attrs? > > http://docs.djangoproject.com/en/dev/ref/forms/widgets/#django.forms.Widget.attrs AFAIK, this adds attributes to widget output. Using th

Re: Where do custom fields go?

2008-10-07 Thread Donn
> I've been playing with custom fields, but I'm not sure where the > python script containing the custom field definition goes? Anywhere you can reach it with an import statement. I put mine alongside models.py etc. and call it forms.py \d --~--~-~--~~~---~--~~

Where do custom fields go?

2008-10-07 Thread Penguin
Hi Guys, I've been playing with custom fields, but I'm not sure where the python script containing the custom field definition goes? In the project directory? In a new application? I have searched high and low, but no docs seem to cover this. Any help would be appreciated. Regards, Xiao --~--~-

Re: Django Admin - Does not see templates, images or templates.

2008-10-07 Thread Karen Tracey
On Tue, Oct 7, 2008 at 6:17 AM, NoviceSortOf <[EMAIL PROTECTED]> wrote: > Thanks the link did the trick. > > The admin page though still loads rough, sometimes > taking 3 screen refreshes to get past a > "No module named urls" error - then it finally loads. > Did you restart Apache after making t

Re: Django Hosting Survey

2008-10-07 Thread Benjamin Buch
Am 06.10.2008 um 19:30 schrieb Jeff: > I am about to begin a new Django project and I am currently evaluating > hosting options. I can recommend djangohosting (http://djangohosting.ch), at least if you're looking for a host in europe... It doesn't seem like you do, but I thought I should ment

Re: Generating widget based on class type for a Custom Form

2008-10-07 Thread Leon Yeh | New Avenue.net
Hi, I also need to switch the and tags, so attrs would not help. For example for select widget I need to generate and for other controls, I need to generate Thanks Leon Yeh Ulises wrote: >> and for other controls, I need to generate >> > > How about using widget.attrs? > > ht

Re: Generating widget based on class type for a Custom Form

2008-10-07 Thread Ulises
> and for other controls, I need to generate > How about using widget.attrs? http://docs.djangoproject.com/en/dev/ref/forms/widgets/#django.forms.Widget.attrs Best, U --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Gr

Re: Generating widget based on class type for a Custom Form

2008-10-07 Thread Leon Yeh | New Avenue.net
Hi Ronny, terima kasih... :-) I am trying to generate different output for css styling purpose. For example for select widget I need to generate and for other controls, I need to generate I don't know how field.as_widget would help. Leon Yeh New Avenue Systems Inc. Office: (626)254-1757

Storage of files in database

2008-10-07 Thread Mariana Romão
Hi, I'm new in the group and in the use of Dajngo too. I'm developing an application that needs storage files ".py" in database (and maybe other types of files). I thought Django did this "automatically" when I define the field in the model as FileField, but I realized that what does is put in data

Re: Django Hosting Survey

2008-10-07 Thread Anders Bergh
On Mon, Oct 6, 2008 at 7:30 PM, Jeff <[EMAIL PROTECTED]> wrote: > 2. Slicehost - for those that want COMPLETE control of their hosting > environment. Only drawback (for some) is that everything needs to be > installed from scratch. I have two vps's from Linode, they're a lot like Slicehost but yo

Access a model's original get_absolute_url

2008-10-07 Thread Erik Allik
Hi everybody, I need a way to access a model's original get_absolute_url after the ABSOLUTE_URL_OVERRIDES settings has taken effect. Currently I've patched Django for this need so it will always alias the existing get_absolute_url method as old_get_absolute_url when it overrides that meth

Re: pdf file generated problem

2008-10-07 Thread Thomas Guettler
Hi. what is "attach"? It is StringIO object. And these objects don't have a name attribute. try this: mail.attach('mypdfname.pdf', attach.get_value(), 'application/pdf') HTH, Thomas laspal schrieb: > ok I can use cStringIO for it but my real problem is how to attach > file in emailme

Re: Django Admin - Does not see templates, images or templates.

2008-10-07 Thread NoviceSortOf
Thanks the link did the trick. The admin page though still loads rough, sometimes taking 3 screen refreshes to get past a "No module named urls" error - then it finally loads. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

Re: seeking help in model design...

2008-10-07 Thread David Hall
Hi Paul, You've got a couple of options for this. The first uses inheritance: class Node(models.Model): parent = models.ForeignKey("Node", blank=True, null=True, related_name="children") class Job(Node): pass class Shot(Node): pass The second uses generic

Django GridContainers at Media Temple

2008-10-07 Thread Kegan
Wonder if anyone have had experience with the new Media Template Django GridContainer? http://mediatemple.net/webhosting/gs/django.html --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post t

Re: ANN: Updated Django Cheat Sheet

2008-10-07 Thread Andrew Durdin
Issue 4 is out with a correction to the arguments for DecimalField in the Form Fields section. Thanks to Doug Van Horn for pointing out the error. Download it from http://www.mercurytide.co.uk/whitepapers/django-cheat-sheet/ Andrew --~--~-~--~~~---~--~~ You receiv

  1   2   >