Re: help request using python_twitter api with django and errno 25

2008-06-27 Thread James Bennett
On Fri, Jun 27, 2008 at 11:02 PM, Hani <[EMAIL PROTECTED]> wrote: > My questions are: > 1. can anyone explain the error a little better to me? > 2. Is it a bug in the python-twitter api, or in django, or in my code? > 3. Is there a fix that does not involve using the patch? > 4. If I have to use

Displaying in template ManyToMany

2008-06-27 Thread dxLogan
Hi all, I am a new user to Django. It's great =) I have to first commend that. Anyway, I have a question about ManyToMany. Suppose I got object like Email, and with a ManyToMany relationship with Recipients. I couldn't do this in template : context =

help request using python_twitter api with django and errno 25

2008-06-27 Thread Hani
Hi, First, please know that I am a novice to django and python so please be patient. Am trying to use the python-twitter api with a little django app. When I test the commands from the terminal, they run perfectly, however, when run from django, they produce an errno 25 as follows: [Errno 25]

Re: method="POST" form problems. Help required

2008-06-27 Thread Peter of the Norse
Nested forms are allowed in XHTML5[1]. Since there isn’t a browser that does it yet, you’ll have to wait. On Jun 21, 2008, at 5:36 PM, [EMAIL PROTECTED] wrote: > Atlast, I found the bug, login.html inherits from base page. So, the > form mentioned in the above code is nested inside a GET

Re: Need help including a queryset in every view

2008-06-27 Thread Brandon Taylor
Holy shiesse, the man himself! Thank you very much for pointing me to that portion of the documentation, I hadn't quite made it there in my Definitive Guide book, but that's exactly what I needed. I ordered the Practical Django projects book the other day, can't wait to get it! Kind regards,

Re: Encoding issue. Weird characters showing up.

2008-06-27 Thread Karen Tracey
On Fri, Jun 27, 2008 at 10:03 PM, Malcolm Tredinnick < [EMAIL PROTECTED]> wrote: > On Fri, 2008-06-27 at 05:17 -0700, jwpeddle wrote: > > I'm using latest svn with postgres. My db is UTF-8. Django is UTF-8. > > My HTML is UTF-8. > > > > When I pull a string that has é in it, it shows up as a

Re: Install of SVN Django on Cygwin fails on sqlite3

2008-06-27 Thread Michael Wieher
not hard to test this, just open up a python shell and type 'import sqlite3' and see what happens Python 2.5.1 (r251:54863, Mar 7 2008, 03:41:45) [GCC 4.1.2 (Ubuntu 4.1.2-0ubuntu4)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import sqlite3 >>> that is

Re: Install of SVN Django on Cygwin fails on sqlite3

2008-06-27 Thread Malcolm Tredinnick
On Fri, 2008-06-27 at 07:54 -0700, yellowbkpk wrote: > I just did a fresh install of Cygwin (and Cygwin's python version), > checked out django-trunk, and ran python setup.py install. > > When I try to runserver, I get: > > $ python2.5 manage.py runserver > Validating models... > Unhandled

Re: Encoding issue. Weird characters showing up.

2008-06-27 Thread Malcolm Tredinnick
On Fri, 2008-06-27 at 05:17 -0700, jwpeddle wrote: > I'm using latest svn with postgres. My db is UTF-8. Django is UTF-8. > My HTML is UTF-8. > > When I pull a string that has é in it, it shows up as a little box (or > a little box with 0082 in it in Firefox 3). If I try to print the > value to

Re: Models in multiple files and django command extensions

2008-06-27 Thread M.Ganesh
Vidja wrote: > Hi all > > Thanks to the help of Magus on IRC i have been able to setup my models > and their functions as separate files. > This works great for maintenance (the models.py file is created > automatically through a (ehm, perl) script) > But unfortunately it breaks Django command

Re: default user authentication, and session timeout

2008-06-27 Thread hyde
this works, Thanks! On Jun 27, 7:24 pm, Alex Slesarev <[EMAIL PROTECTED]> wrote: > On Jun 28, 1:13 am, hyde <[EMAIL PROTECTED]> wrote: > > > How to control thesessiontimeoutvalue if using Django's default > > user authentication? > > Look in django docs (available in svn trunk). You should set >

Re: Problems retrieving array from POST

2008-06-27 Thread [EMAIL PROTECTED]
> @Daniel > If I use $.post("/post_test/",{'data':data});, in firebug the post > data shows as undefined. That doesn't sound right, I have some jQuery Ajax stuff(http:// github.com/alex/django-ajax-validation/tree/master/ajax_validation/ templatetags/jquery_validation.py) and it posts arrays

Re: default user authentication, and session timeout

2008-06-27 Thread Alex Slesarev
On Jun 28, 1:13 am, hyde <[EMAIL PROTECTED]> wrote: > How to control the session timeout value if using Django's default > user authentication? Look in django docs (available in svn trunk). You should set SESSION_COOKIE_AGE variable (in seconds) in the settings.py file.

Re: Problems retrieving array from POST

2008-06-27 Thread Alex Slesarev
> How would I use 'print post_text'? I'd have to do it in the > interactive shell, in which case, how would I replicate > request.POST...? Just insert it to the 'post_handler' function and see results in console (of course, application should be started in console with 'manage.py runserver').

Re: Need help including a queryset in every view

2008-06-27 Thread James Bennett
On Fri, Jun 27, 2008 at 4:27 PM, Brandon Taylor <[EMAIL PROTECTED]> wrote: > What's the best way to go about this? Obviously I don't want to have > to pass the queryset into the context of every action, in every view > across the entire site :) Same way you make anything accessible to lots of

Re: Need help including a queryset in every view

2008-06-27 Thread ristretto.rb
> I have a navigation list powered by a model in my base site template. > So, I need to create a queryset object that will be available to every > view. Middleware comes to mind (see the docs), but I'm new to django, and perhaps that's not the best way. I'd be interested to see what other

Dynamic rtf files with Django templates

2008-06-27 Thread Juanjo Conti
Hi, I have just comment in my blog how to use Django template system to generate dynamic rtf files. A string filter was made to encode unicode strings into rtf format. BTW, it's in spanish: http://www.juanjoconti.com.ar/2008/06/27/generar-archivos-rtf-en-forma-dinamica-desde-django/ Juanjo

Re: sessions in template (outside of views)

2008-06-27 Thread Brandon Taylor
Hi Bobby, Typically what I do is set the value from the session into a variable that I pass into the context. #in views.py def my_action(request) account_num = request.session['AccountNum'] return render_to_response('the_template.html', {'account_num' : account_num}) #in

Re: The Lost Fingers

2008-06-27 Thread Juanjo Conti
Could you recommend me some Django (the artist) hits? Juanjo -- mi blog: http://www.juanjoconti.com.ar --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Need help including a queryset in every view

2008-06-27 Thread Brandon Taylor
Hello everyone, I have a navigation list powered by a model in my base site template. So, I need to create a queryset object that will be available to every view. What's the best way to go about this? Obviously I don't want to have to pass the queryset into the context of every action, in every

customizing django-admin.py

2008-06-27 Thread Michael P. Soulier
I am supporting an environment where users will be adding "plugin" pages to an existing Web interface. As such they will be running "startproject" and "startapp" on a regular basis. I would like to customize the output to the environment. Is there a standard way to do this beyond wrapping

sessions in template (outside of views)

2008-06-27 Thread Bobby Roberts
i'm trying to view session variables on the screen in a template. I know the session variable has a value because i've tested it in my view. I'm trying this in my template but not getting any results: Account #: {{ request.session.AccountNum }} What could I be doing wrong?

Re: problem getting mod_python to serve application..

2008-06-27 Thread Mike Caldwell
I've had a very similar problem and it turned out to be a permission problem. I had used svn to get the latest django in my home directory and then linked django from there to /usr/lib/python2.4/site-packages. The apache user had read/execute privileges up the /usr/lib pathway to

Re: psycopg2

2008-06-27 Thread Federico Di Gregorio
On Jun 25, 4:00 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Why not put it up on Google Code? It's SVN so importing should be a > breeze (if not, I'm sure the Google guys would be glad to lend a > hand), you have a Wiki and a Bug tracker also. I will never, *ever*, put my code in a

Django newforms and dynamically adding "lines"

2008-06-27 Thread Hendrijk Templehov
Hey there, I am currently diving into django and experiment with the newforms api. I have found some nice blog entries about it and read the docs but for now I am wondering what the best practice for a use case like that would be: There is a model called "Bill" which holds a bill with a

Re: intial form field values using session variables

2008-06-27 Thread Arien
On Fri, Jun 27, 2008 at 1:12 PM, Bobby Roberts <[EMAIL PROTECTED]> wrote: > > [...] I'm trying to print those session variables to the screen in > step 2 (ie the 2nd form) so the user can review what was previously > entered on the first fom. (If this page immediately follows the first page, you

Re: Problems setting up LDAP backend

2008-06-27 Thread satish
Thanks Jeff for this tip. When I explicitly do "from django.conf import settings' it seems to print the AUTHETICATION_BACKENDS. Looks like if I do not do explicit import- I can print the AUTHENTICATION_BACKENDS. Python 2.4.3 (#1, Oct 23 2006, 14:19:45) [GCC 4.1.1 20060525 (Red Hat 4.1.1-1)] on

Re: psycopg2

2008-06-27 Thread James Bennett
On Fri, Jun 27, 2008 at 6:19 AM, Will <[EMAIL PROTECTED]> wrote: > Ah, sorry. Reading the Django book had led me to believe I was stuck > with psycopg: The change which allows user-defined backends to be plugged in happened after the 0.96 release, so the book is accurate for 0.96. --

Re: intial form field values using session variables

2008-06-27 Thread Bobby Roberts
> You can pass in an "initial" argument when you instantiate your Form, > as explained > here:http://www.djangoproject.com/documentation/newforms/#dynamic-initial-... > > Arien cool! I overlooked that. I've got it working great. I'm trying to print those session variables to the screen in

ManyToMany field has old value in custom save method

2008-06-27 Thread [EMAIL PROTECTED]
Here is a part of a model: ~ class News(models.Model): title = models.CharField(max_length=255) categories = models.ManyToManyField(Category) def save(self): print self.title print self.categories.all()

Using Google App engine helper with Django and getting a templat not found error

2008-06-27 Thread Chuck
I have created the polls application verbatum from the tutorial with the exception that I am using the helper code to run the app on Google. The app works just fine on the SDK but whenever I upoade the app to Google I get the following error: Template does not exist at \ index.html

Re: Problems setting up LDAP backend

2008-06-27 Thread Jeff Anderson
satish wrote: Hi Jeff, Thanks for helping me out here. I did enable logging on the LDAP server. Looks like the requests are not going to the LDAP server. I removed backends.pyc. When I run the server the next time, it should have generated the backends.pyc right? I also removed

Re: At what point is the WSGI request or server object available?

2008-06-27 Thread Daniel Roseman
On Jun 27, 3:52 pm, "Leeland (The Code Janitor)" <[EMAIL PROTECTED]> wrote: > Sorry if this seems obvious I am a new comer to Django development. > > There are attributes I want to get at in the request or WSGI server > objects to test if I should set up some specialized channels in my > Django

Re: Newforms and textareas

2008-06-27 Thread Roodie
Dang, thanks, I knew it is something obvious... Interesting thing is that it worked so far, I mean it rendered properly :-) Roodie --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to

Re: Problems setting up LDAP backend

2008-06-27 Thread satish
Hi Jeff, Thanks for helping me out here. I did enable logging on the LDAP server. Looks like the requests are not going to the LDAP server. I removed backends.pyc. When I run the server the next time, it should have generated the backends.pyc right? I also removed

Re: ModelForm's error dict is filled before is_valid() is called

2008-06-27 Thread omat
Thanks, you are right. My generic form template accesses forms errors and they get populated. This is behavior seems a little strange but other way (errors being populated only when is_valid is called) would have different complications I guess. FYI, in my blog app, a blog item has several

Re: Newforms and textareas

2008-06-27 Thread Arien
On Fri, Jun 27, 2008 at 11:04 AM, Roodie <[EMAIL PROTECTED]> wrote: > > Hello, > > I have a slight problem. I am using a custom form field to do some > extra validation / filtering on a specific kind of field. The code is > very simple: > > class HtmlEditorField(forms.Textarea): >def

Re: Newforms and textareas

2008-06-27 Thread [EMAIL PROTECTED]
You are creating a field that subclasses a widget, which makes no sense. forms.Textare is a widget, not a field. On Jun 27, 11:04 am, Roodie <[EMAIL PROTECTED]> wrote: > Hello, > > I have a slight problem. I am using a custom form field to do some > extra validation / filtering on a specific

Re: ModelForm's error dict is filled before is_valid() is called

2008-06-27 Thread Karen Tracey
On Fri, Jun 27, 2008 at 12:10 PM, omat <[EMAIL PROTECTED]> wrote: > > Thanks for the clarification. > > Apparently my demo case of the problem was not appropriate, but my > real problem is still there. > > I have 2 ModelForms that I want to receive data at a single form > submission. > >

Re: site_media paths

2008-06-27 Thread alce
> Rename the directory - mod_python uses 'media' dir from django itself. Thank you Alex. That is not the problem though and can't seem to find the way to fix it. I can't believe how straightforward it was to write and deploy basic site with Django after only 2 Python books and the Django docs

Re: ModelForm's error dict is filled before is_valid() is called

2008-06-27 Thread omat
Thanks for the clarification. Apparently my demo case of the problem was not appropriate, but my real problem is still there. I have 2 ModelForms that I want to receive data at a single form submission. item_form is required only if 'item' field of the entry_form is empty. So I build the

Newforms and textareas

2008-06-27 Thread Roodie
Hello, I have a slight problem. I am using a custom form field to do some extra validation / filtering on a specific kind of field. The code is very simple: class HtmlEditorField(forms.Textarea): def clean(self, value): value = filter_common( value )

Re: i18n model - tri-lingual data

2008-06-27 Thread [EMAIL PROTECTED]
You should REALLY have a look at this: http://code.google.com/p/transdb/ On Jun 26, 3:22 pm, pihentagy <[EMAIL PROTECTED]> wrote: > Hi! > > I have a 3-lingual app, and there are some model fields translated, > like this: > > class Category(models.Model) >         name_hu =

Re: ModelForm's error dict is filled before is_valid() is called

2008-06-27 Thread Arien
On Fri, Jun 27, 2008 at 10:39 AM, omat <[EMAIL PROTECTED]> wrote: > > At the instant I initialize my form, the errors dict is filled, > although the documentation says, the validation happens after form > instance's is_valid() method is called. > > [example snipped] > > Is the documention or the

ModelForm's error dict is filled before is_valid() is called

2008-06-27 Thread omat
Hi, At the instant I initialize my form, the errors dict is filled, although the documentation says, the validation happens after form instance's is_valid() method is called. Here is the demonstration: >>> from blog.forms import ItemForm >>> from blog.models import Item >>> form = ItemForm({},

Django Setup with apache & mod_python

2008-06-27 Thread nerdydork
Question on apache setup using mod_python, the documentation states "… and replace mysite.settings with the Python import path to your Django project’s settings file." <-- would this be the full path to the settings.py file? I tried this and all I'm getting is a blank page - for every URL I

Re: CMD output

2008-06-27 Thread Molly
What if the exe is just clicked on though, then there wouldn't be any writing in the cmd to write that. Thanks for the help :) Molly On Jun 27, 10:35 am, Tim Chase <[EMAIL PROTECTED]> wrote: > > I created an exe app and when it is run in the CMD there is a lot of > > output of what is going on

Re: Stability of trunk and 1.0 target: experience, testimonials?

2008-06-27 Thread Norman Harman
I've been using trunk for over 9mo for in production website http://storymash.com During that time, there's been 2-3 times my unittests have failed after I've svn updated django. Each time was a fairly quick fix. API changes aren't hard bugs to track down and fix. The advantages of all the

Install of SVN Django on Cygwin fails on sqlite3

2008-06-27 Thread yellowbkpk
I just did a fresh install of Cygwin (and Cygwin's python version), checked out django-trunk, and ran python setup.py install. When I try to runserver, I get: $ python2.5 manage.py runserver Validating models... Unhandled exception in thread started by Traceback (most recent call last): File

At what point is the WSGI request or server object available?

2008-06-27 Thread Leeland (The Code Janitor)
Sorry if this seems obvious I am a new comer to Django development. There are attributes I want to get at in the request or WSGI server objects to test if I should set up some specialized channels in my Django application. Problem is neither of these seem to be available until I get to the view

Re: per view caching

2008-06-27 Thread Rufman
ok...I found the answer to my first question...but I'm still searching for the second... Stephane On Jun 27, 1:44 pm, Rufman <[EMAIL PROTECTED]> wrote: > I have two questions concerning per-view caching: > >    1. Does "per-view" caching mean that Django gets the result from > the cache

Re: views.py: Always a simple return?

2008-06-27 Thread RossGK
Thanks for the comments Norman, The appeal of HTTP is that it is so broadly seen as benign by networks that everyone can pretty much use it regardless of their network environment. The meta refresh tag is probably good for refreshes in the order of seconds, but for a pseudo real-time streaming

Re: Django Database Relationship Question

2008-06-27 Thread bhunter
> And this is why the Django community rocks, two examples and a full > explaination with a link in less than 10 minutes, GW guys Absolutely! Thank you all so much! In just 15 minutes I had great answers from everyone. --~--~-~--~~~---~--~~ You received this

Re: CMD output

2008-06-27 Thread Tim Chase
> I created an exe app and when it is run in the CMD there is a lot of > output of what is going on on the site. I was wondering if there was a > way for words that I write to show up and not all of the output. I'm not sure whether the output is being written to stdout or to stderr, but if it's

Re: views.py: Always a simple return?

2008-06-27 Thread RossGK
Thanks for the thoughtful replies Scott. Client-side request orchestration is where I see myself headed. Your list of concerns is resonates with my concerns about the barriers on this as well. To be thorough I've been exploring the idea from both server side and client side, and the client side

Models in multiple files and django command extensions

2008-06-27 Thread Vidja
Hi all Thanks to the help of Magus on IRC i have been able to setup my models and their functions as separate files. This works great for maintenance (the models.py file is created automatically through a (ehm, perl) script) But unfortunately it breaks Django command extensions. This is the

default user authentication, and session timeout

2008-06-27 Thread hyde
How to control the session timeout value if using Django's default user authentication? Thanks, --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: Anyone got a backend for MS SQL Server working?

2008-06-27 Thread gordyt
Ulf I haven't played with this second solution, but I did just check out a copy of the django-pyodbc project. You should be OK following the author's instructions. He said to add the django-pydobc directory (where ever you choose to put it) to your PYTHONPATH. The name of the module(s) that

CMD output

2008-06-27 Thread Molly
I created an exe app and when it is run in the CMD there is a lot of output of what is going on on the site. I was wondering if there was a way for words that I write to show up and not all of the output. Thanks! Molly --~--~-~--~~~---~--~~ You received this

Re: intial form field values using session variables

2008-06-27 Thread Arien
On Fri, Jun 27, 2008 at 8:42 AM, Bobby Roberts <[EMAIL PROTECTED]> wrote: > > i'm trying to use session variables as initial values for certain form > fields as such: > >AccountNum = forms.CharField > (initial=request.session["AccountNum"],max_length=20, required=True, > label = "Account #")

intial form field values using session variables

2008-06-27 Thread Bobby Roberts
i'm trying to use session variables as initial values for certain form fields as such: AccountNum = forms.CharField (initial=request.session["AccountNum"],max_length=20, required=True, label = "Account #") i'm getting this: NameError: name 'request' is not defined how do i use a session

Re: User Filtering

2008-06-27 Thread M.Ganesh
TiNo wrote: > Maybe even nicer, a selectbox containing all users, and an input that > pops up on focus to filter. That way the form degrades nicely when js > is turned off. Makes a big selectbox though... > > Hi TiNo I am also looking for a similar solution. Can you please point me to a

Re: The Lost Fingers

2008-06-27 Thread Etienne Robillard
On Fri, 27 Jun 2008 11:47:35 +0100 "Emily Rodgers" <[EMAIL PROTECTED]> wrote: > > I am listening to Django and Stephane right now (and using Django) :) Emilie-Claire Barlow is also a great pick for smooth jazz lovers! She's from Canada, but I'm not sure if she's at the Montreal jazz fest,

Re: Problems retrieving array from POST

2008-06-27 Thread elspiko
Thanks for your comments. @Alex How would I use 'print post_text'? I'd have to do it in the interactive shell, in which case, how would I replicate request.POST...? @Daniel If I use $.post("/post_test/",{'data':data});, in firebug the post data shows as undefined.

Re: User Filtering

2008-06-27 Thread TiNo
You could have the autocomplete opperate on a dummy_seat input, and have the js fill in the correct user id in a hidden 'seat' field on blur. Maybe even nicer, a selectbox containing all users, and an input that pops up on focus to filter. That way the form degrades nicely when js is turned off.

Re: Validation Problem with ModelChoiceField

2008-06-27 Thread TiNo
Looking at the source, ModelChoiceField validates the given id against the initial queryset, where you provided an empty one. "models.Gallery.objects.none()" So no id's validate. I think changing none() to all() should make it work. TiNo On Jun 26, 9:01 pm, mwebs <[EMAIL PROTECTED]> wrote: >

Re: Django newcomer needs help on concept of views

2008-06-27 Thread bruno desthuilliers
On 27 juin, 09:47, Reza Muhammad <[EMAIL PROTECTED]> wrote: > Hi guys, > > I just started learning about python and django. For the past months I > was working on a project using a PHP framework (I guess, the name > would not be important right now :). For my initial experiment, I > would like

Kwippy - microblogging using django

2008-06-27 Thread Dipankar Sarkar
Hey guys I and a coupla more django developers recently released a micro- blogging platform called kwippy (http://kwippy.com) ... currently it is in beta and invite only (obv mail me to get an instant invite) We need to get more people to use the service and help us test our infrastructure. We

Re: Encoding issue. Weird characters showing up.

2008-06-27 Thread jwpeddle
I should also note that no, I did not accidently use __str__ instead of __unicode__ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Encoding issue. Weird characters showing up.

2008-06-27 Thread jwpeddle
I'm using latest svn with postgres. My db is UTF-8. Django is UTF-8. My HTML is UTF-8. When I pull a string that has é in it, it shows up as a little box (or a little box with 0082 in it in Firefox 3). If I try to print the value to runserver, I get: UnicodeEncodeError at /contact/request-info/

Re: Mobile version of a site

2008-06-27 Thread Ian Lawrence
Hi, > Is there a recommended way to go about this? Do I have to recreate all > my views? Mobile sites are usually just alternate templates on the same views. So, the question is how to work out what it is that wants to 'view' your 'views'?. For this look at http://code.google.com/p/minidetector/

per view caching

2008-06-27 Thread Rufman
I have two questions concerning per-view caching: 1. Does "per-view" caching mean that Django gets the result from the cache regardless of the parameters passed into the view. I.e. if i have a view cache_test(request, record_id) and call it a first time with record_id=1, caching this result

Re: I'm sure this is one of those clueless newbie mistakes

2008-06-27 Thread [EMAIL PROTECTED]
On Jun 26, 3:06 pm, "Colin Bean" <[EMAIL PROTECTED]> wrote: > For a start, you want your KVM model to subclass models.Model. Actually, that was one of the big issues that I had. If I commented out the KVM group, I was able to get syncdb to run without erroring out. I really need to spend a bit

Re: psycopg2

2008-06-27 Thread Will
> Erm... the database backends _are_ pluggable. Hence, the > DATABASE_ENGINE setting. > Ah, sorry. Reading the Django book had led me to believe I was stuck with psycopg: http://www.djangobook.com/en/beta/chapter05/ >DATABASE_ENGINE tells Django which database engine to use. If you’re using a

Re: createsuperuser error

2008-06-27 Thread Graham Carlyle
Just wanted to check that the devs are aware that this bug is quite significant. If you use django-admin on trunk then syncdb breaks. The trac tickets relating to it summarise it all (7518 being a duplicate of 5943) and the awaiting patch seems to fix the problem. Apologies if its all in hand,

Mobile version of a site

2008-06-27 Thread timc3
HI there, I want to produce a version of a site for mobile phones so I will have to serve up different templates, perhaps on a different subdomain. Is there a recommended way to go about this? Do I have to recreate all my views? Thanks in advance.

Re: Unable to upload PNG's

2008-06-27 Thread jurian
Seems like PIL doesn't like interlaced PNG's. --~--~-~--~~~---~--~~ 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,

RE: The Lost Fingers

2008-06-27 Thread Emily Rodgers
I am listening to Django and Stephane right now (and using Django) :) > -Original Message- > From: django-users@googlegroups.com > [mailto:[EMAIL PROTECTED] On Behalf Of > [EMAIL PROTECTED] > Sent: 27 June 2008 03:04 > To: Django users > Subject: Re: The Lost Fingers > > > While

Re: i18n model - tri-lingual data

2008-06-27 Thread KONTRA, Gergely
Ok, thanks. But that means every view should the used model's attribute. Oh well, this action I call "push", because the view pushes the parameter to the model, and not the model pulls from the request (which violates MVC). And I'm wondering if it's possible to hook up newforms-admin to show

Re: Django newcomer needs help on concept of views

2008-06-27 Thread Reza Muhammad
Oh yea, thats right. Since, urls conf look for (for example mysite.views), which is in mysite app, file views.py, I should also be able to put mysite.special_views in my urls conf to look in mysite app, file special_views.py, right? Thanks alot :) On Jun 27, 4:17 pm, Alaa Salman <[EMAIL

Re: i18n model - tri-lingual data

2008-06-27 Thread Julien
That's what I said. The view should pull out the desired field from the model based on the language set in the request. def my_view(request): language = request.LANGUAGE_CODE category = Category.objects.get(pk=1) # or whichever you like if language == 'en': name =

Re: Django newcomer needs help on concept of views

2008-06-27 Thread Horst Gutmann
And if you have some functions that are used by views from both modules, just create a new module and name it for instance utils.py. Then you can simply import something from this new module into your views.py:: from .utils import my_function -- Horst On Fri, Jun 27, 2008 at 11:17 AM, Alaa

Re: Django newcomer needs help on concept of views

2008-06-27 Thread Daniel Roseman
On Jun 27, 8:47 am, Reza Muhammad <[EMAIL PROTECTED]> wrote: > Hi guys, > > I just started learning about python and django. For the past months I > was working on a project using a PHP framework (I guess, the name > would not be important right now :).  For my initial experiment, I > would like

Re: Django newcomer needs help on concept of views

2008-06-27 Thread Alaa Salman
On Jun 27, 10:47 am, Reza Muhammad <[EMAIL PROTECTED]> wrote: > Anyway, I am used to having separate files to facilitate different > controllers (I think it's called views in django).  On the other hand, > django uses one views.py for one application.  Is there anyway I can > have a

Re: Stability of trunk and 1.0 target: experience, testimonials?

2008-06-27 Thread chris vigelius
Am Donnerstag, 26. Juni 2008 18:30:12 schrieb J Meier: > Hi folks, > > I'm trying to champion Django trunk/1.0 as part of a small project in > a mid-sized city newspaper office. There is some worry about choosing > a framework which does not currently have a stable release. I've been > addressing

Re: i18n model - tri-lingual data

2008-06-27 Thread KONTRA, Gergely
Correct me, but I don't think I can access the view from the model. So how is this possible? On Fri, Jun 27, 2008 at 2:06 AM, Julien <[EMAIL PROTECTED]> wrote: > > I reckon your view should check what the language is set in the > request (request.LANGUAGE_CODE), and then pull out the right field

Re: manage.py dumpdata and swap

2008-06-27 Thread Russell Keith-Magee
On Fri, Jun 27, 2008 at 10:57 AM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Hello > > I have a small server, just 5 users and I use the django for data > entry. My server have only 512MB of RAM but it is enough and it work > really well. But whenever I run "manage.py dumpdata xml"

Re: Collecting referrers data

2008-06-27 Thread Arien
On Fri, Jun 27, 2008 at 3:45 AM, Alessandro <[EMAIL PROTECTED]> wrote: > So, it's possible to make a shortcut before my urls and generic views > to record referrers data? You could write some middleware to do just that. Arien --~--~-~--~~~---~--~~ You received

Collecting referrers data

2008-06-27 Thread Alessandro
I want to collect referrers data on my django website. Now I have google analytics code, but I want to make a visible list of my 10 best referrers (to give them a prize) on my pages. So, it's possible to make a shortcut before my urls and generic views to record referrers data? Or it's possible

Re: Polls app not showing in Admin > Django Tutorial

2008-06-27 Thread Moodie
Thanks Julien! I'm new to Python, so the indentation is throwing me a bit, but that sorted out the problem. Thanks again! On Jun 27, 5:16 pm, Julien <[EMAIL PROTECTED]> wrote: > Hi, > > In the example you give I see some identeation problems. It should > rather be: > > class

Django newcomer needs help on concept of views

2008-06-27 Thread Reza Muhammad
Hi guys, I just started learning about python and django. For the past months I was working on a project using a PHP framework (I guess, the name would not be important right now :). For my initial experiment, I would like to port my last project that I used with PHP to django. The project

Re: Polls app not showing in Admin > Django Tutorial

2008-06-27 Thread Moodie
Thanks Julien! I'm new to python, so the indentation is throwing me a little, but that fixed the issue. Thanks again! On Jun 27, 5:16 pm, Julien <[EMAIL PROTECTED]> wrote: > Hi, > > In the example you give I see some identeation problems. It should > rather be: > > class Poll(models.Model): >  

Re: list_filter with select

2008-06-27 Thread Julien
Hi, To do that you need to override the admin/filter.html template. Have a look at the one that's already provided in the admin and you should be able to write some HTML code that suits you better. Julien On Jun 27, 6:20 pm, OliverMarchand <[EMAIL PROTECTED]> wrote: > Hello, > > When a field

Re: Problems retrieving array from POST

2008-06-27 Thread Daniel Roseman
On Jun 26, 11:36 pm, elspiko <[EMAIL PROTECTED]> wrote: > Hi all, > > I've fairly new to django but i'm loving it! > > I've got some draggable panels on a site and want to save their > positions so when a user logs back in, the panels are in the same > place when they last hit the save button.

list_filter with select

2008-06-27 Thread OliverMarchand
Hello, When a field that is contained in the admin list_filter has a lot of different values, the list may become too long to be used. Has anyone ever written a modification of the admin change_list.html to enable dropdown select widgets for the filter values instead of all values written out?

Re: psycopg2

2008-06-27 Thread James Bennett
On Fri, Jun 27, 2008 at 3:06 AM, Will <[EMAIL PROTECTED]> wrote: > Would I have to write an entire new backend for postgres, just to use > a different driver? You'd need a module that implements the interface of a Django database adapter while using another driver. A few months ago I saw an

Re: psycopg2

2008-06-27 Thread Will
On Jun 26, 11:38 pm, "Russell Keith-Magee" <[EMAIL PROTECTED]> wrote: > Erm... the database backends _are_ pluggable. Hence, the > DATABASE_ENGINE setting. > I undersand that, but I'm stuck with psycopg or psycopg2 if I'm to use postgres, aren't I? Would I have to write an entire new backend

Re: Polls app not showing in Admin > Django Tutorial

2008-06-27 Thread Julien
Hi, In the example you give I see some identeation problems. It should rather be: class Poll(models.Model): question = models.CharField(max_length=200) pub_date = models.DateTimeField('date published') def __unicode__(self): return self.question def

Polls app not showing in Admin > Django Tutorial

2008-06-27 Thread Moodie
Hi, I've been going over this, but for some reason the Polls app is not showing up in the admin after adding 'class Admin: pass' to the poll model. I've searched through this user group, and have tried all the things suggested, but am still not having much luck. My models.py page looks like

Anyone got a backend for MS SQL Server working?

2008-06-27 Thread Ulf Kronman
Hi all, sorry; I know that this is an ever-coming-back question, but I need to dig a bit deeper to get further, before deciding to struggle on or give up. I've been coding happily with Django for over a year, using an Ubuntu server with a PostgreSQL database and a development environment on Max

  1   2   >