Re: one symbol "i" causes the template system to raise an exception

2008-09-18 Thread Karen Tracey
On Thu, Sep 18, 2008 at 5:48 PM, Valery Khamenya <[EMAIL PROTECTED]> wrote: > Hi all > > I got a strange issue with Django: 0.96.1 > > During render_to_response() call against this 1-line template: > > > > I get a long error output (see below). Now the funniest. If I delete or > change the

Re: django google-app-engine appengine backend

2008-09-18 Thread Adam Fast
While I'm not particularly skilled with AppEngine, it's not finding your backend. I don't know what your INSTALLED_APPS are in settings.py but you'll want to make sure 'appengine_django' is in it. Also, I'm seeing a dot in front of your google_appengine directory below. If that was a typo

Re: django google-app-engine appengine backend

2008-09-18 Thread bfrederi
Just in case it's any help, this is the tutorial I am using: http://code.google.com/appengine/articles/appengine_helper_for_django.html --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to

django google-app-engine appengine backend

2008-09-18 Thread bfrederi
I am trying to get django1.0 running with the google-app-engine SDK. I am using the "Google App Engine Helper for Django" and trying to follow that setup, but I can't seem to get it working. I did a checkout of the helper (svn checkout http://google-app-engine-django.googlecode.com/svn/trunk/),

django-locationtracking Reusable App

2008-09-18 Thread Adam Fast
Hi all, My django-locationtracking app is now up and available. Code is available from http://code.google.com/p/django-locationtracking/ and a screencast is available at my website, http://www.adamfast.com/programming/locationtracking/ It was introduced during one of the lightning talks at

Overriding auth form

2008-09-18 Thread AzMoo
Hello. I'm trying to modify the Auth admin interface to work properly with a custom Active Directory backend I've written. Basically, all I want to do is change the username validation and remove the password field from the display, leaving everything else as it is. The username validation works

Re: Basic template inheritance question

2008-09-18 Thread Kenneth Gonsalves
On Thursday 18 Sep 2008 3:53:48 pm Daniele Procida wrote: >   {% block stylesheets %}{% endblock %} > > in the head, and place the stylesheets in a block in a template that > extends base.html. At any rate, this is what I gathered was the way to > do this. that is the way everyone does it - so

Re: Newbie Question: How to display only error messages when form validation fails?

2008-09-18 Thread Steve Holden
Karthik Krishnan wrote: > Hi, > > The premise is this: If the form validation fails, I want to display > all the validation error messages on the top of the page in a special > div tag that I have created. > > {% for field, message in form.errors.items()%} > {{message}} > Shouldn't that be

Re: Install version .90 help

2008-09-18 Thread Malcolm Tredinnick
On Thu, 2008-09-18 at 15:13 -0700, Carol wrote: > As far as I can see, django-admin.py doesn't have a subcommand called > init. It did in 0.90, We're talking about something release in mid-November, 2005: things have changed a little since then. :-) Regards, Malcolm

Re: Install version .90 help

2008-09-18 Thread Malcolm Tredinnick
On Thu, 2008-09-18 at 14:55 -0700, KillaBee wrote: > I am working with django .90, and and 1.0. I have a Mysql db in > setting.py that I can login with Mysql Admin. > I am trying to link Django with this DB. I run this command to do > this. > > django-admin.py init I get this error. > > The

Newbie Question: How to display only error messages when form validation fails?

2008-09-18 Thread Karthik Krishnan
Hi, The premise is this: If the form validation fails, I want to display all the validation error messages on the top of the page in a special div tag that I have created. {% for field, message in form.errors.items()%} {{message}} {% endfor %} returns a compilation error. I don't want to

Re: Can't use connection.queries in unit test?

2008-09-18 Thread Malcolm Tredinnick
On Thu, 2008-09-18 at 14:00 -0700, meppum wrote: > I wanted to see some of the queries that get generated by the django > orm during unit testing. I figured the below example would work but > connection.queries in empty. Anyone have any hints as to why and if > there is a work around? Thanks. >

Re: IE Hell. Blank Page

2008-09-18 Thread lingrlongr
Thank you both. There WAS something I forgot in the . I got so absorbed in making the the section its own block that I forgot to close the tag. On Sep 18, 7:13 pm, "Daniele Procida" <[EMAIL PROTECTED]> wrote: > On Thu, Sep 18, 2008, lingrlongr <[EMAIL PROTECTED]> wrote: > >I primarily use and

Re: Basic Form Processing Question: How to prevent form validation on a GET request.

2008-09-18 Thread Karthik Krishnan
Hi Daniel, Thanks for your solution. It worked. Thanks, Karthik On Sep 18, 1:46 pm, Daniel Roseman <[EMAIL PROTECTED]> wrote: > On Sep 18, 9:34 pm, Karthik Krishnan <[EMAIL PROTECTED]> wrote: > > > Hi, > > > I have a form which contains some prefilled data and some to be filled > > in by the

Re: Please help optimize a query in Django 1.0

2008-09-18 Thread Egon Esser
On Sep 19, 1:33 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > What you can do is import django.db.connection.cursor (I think that's > the right location), and just execute the raw SQL. That's my prob, I wouldn't know how to build the custom SQL so as to relate to my already specific song

Re: Please help optimize a query in Django 1.0

2008-09-18 Thread [EMAIL PROTECTED]
What you can do is import django.db.connection.cursor (I think that's the right location), and just execute the raw SQL. Also, aggregation support will be coming to django soon! On Sep 18, 7:28 pm, Egon Esser <[EMAIL PROTECTED]> wrote: > Hi all, > > I stole some code from this >

Please help optimize a query in Django 1.0

2008-09-18 Thread Egon Esser
Hi all, I stole some code from this posting: http://groups.google.com/group/django-users/msg/82a9c2e94ff05188 And then I used it to calculate the rating averages of my songs like so: models.py: === class Song(models.Model): ... songrtng = models.ManyToManyField(Rating) ...

Re: IE Hell. Blank Page

2008-09-18 Thread Daniele Procida
On Thu, Sep 18, 2008, lingrlongr <[EMAIL PROTECTED]> wrote: >I primarily use and develop on Ubuntu and use Firefox. So I went to >check out how many bugs IE was generous enough to give me to fix. >Using the Django development server, I can connect fine from a Windows >computer and view the site

Re: IE Hell. Blank Page

2008-09-18 Thread Colin Bean
On Thu, Sep 18, 2008 at 3:57 PM, lingrlongr <[EMAIL PROTECTED]> wrote: > > Strangest thing... > > I primarily use and develop on Ubuntu and use Firefox. So I went to > check out how many bugs IE was generous enough to give me to fix. > Using the Django development server, I can connect fine from

IE Hell. Blank Page

2008-09-18 Thread lingrlongr
Strangest thing... I primarily use and develop on Ubuntu and use Firefox. So I went to check out how many bugs IE was generous enough to give me to fix. Using the Django development server, I can connect fine from a Windows computer and view the site using Firefox. When I use IE (tested 6 &

Working with inline formsets to created/edit an object

2008-09-18 Thread Bram Duvigneau
Hello, I've an object that has three associations that should be edited inline. I would like to let the user create this object and it's associations at one page. Same goes for editing the object. I've hacked something together using formsets, but I'm facing some problems. First of all, the

Re: GeoDjango: ImportError: cannot import name DataSource

2008-09-18 Thread Alfonso
Thanks Ludwig, Your solution was spot on - geodjango couldn't locate gdal properly. Solved it with: GDAL_LIBRARY_PATH='/opt/local/lib/libgdal.dylib' in settings.py Thanks again Allan On Sep 17, 6:27 pm, Ludwig <[EMAIL PROTECTED]> wrote: > If you run something like>>> import

GeoDjango: MultiPolygon and Polygon

2008-09-18 Thread Alfonso
I've got a nice chunk of shapefile data to import into a GeoDjango DB via LayerMapping and have discovered only one of the entries is a MultiPolygon shape - the rest Polygon. My question is this... if I change the model definition for the corresponding polygon field from PolygonField to

Re: external app authentication?

2008-09-18 Thread akonsu
hello, i would start with tracing the request that is sent from your python script and making sure it is similar to the one sent from the login form by the browser. konstantin On Sep 18, 5:50 pm, Carol <[EMAIL PROTECTED]> wrote: > HI, > > I'm writing a Django app that allows access to pages

Re: Install version .90 help

2008-09-18 Thread Carol
As far as I can see, django-admin.py doesn't have a subcommand called init. Where you meaning syncdb or startapp or start project or ? Have you done manage.py validate to check your syntax and then manage.py syncdb to upload your new schema to the database? Also check your settings.py file that

Re: ImageField: upload_to

2008-09-18 Thread lingrlongr
worked like a charm. thx. On Sep 18, 5:21 pm, gnijholt <[EMAIL PROTECTED]> wrote: > I had to define the callable function before it gets called. > So in your case I'd put it right under class Product(models.model) > Then you should be able to just do: >   upload_to=get_image_path > > Cheers, >

Is possible this hack for the admin? Get user & current item in the save

2008-09-18 Thread mamcxyz
Hi, I have a very small webapp for internal use. Is something like a mini- POS. I have a classic invoice form, and I need get the default price for each product line based on the actual user, the customer & the inventory price. I have: User = Salesman. Each salesman have level from 1 - 3

Install version .90 help

2008-09-18 Thread KillaBee
I am working with django .90, and and 1.0. I have a Mysql db in setting.py that I can login with Mysql Admin. I am trying to link Django with this DB. I run this command to do this. django-admin.py init I get this error. The database couldn't be initialized. an integer is required I edited

external app authentication?

2008-09-18 Thread Carol
HI, I'm writing a Django app that allows access to pages either through a web interface - Django forms - or through a python script. I am using Django 1.0, Python 2.4, Apache 2.2, mod_python and posgres 8.1.1. OS is Linux SuSE 10.1. Everything works through the web interface. The user needs

one symbol "i" causes the template system to raise an exception

2008-09-18 Thread Valery Khamenya
Hi all I got a strange issue with Django: 0.96.1 During render_to_response() call against this 1-line template: I get a long error output (see below). Now the funniest. If I delete or change the symbol "i" then I get no error anymore. Namely, if instead of I put or then things are

Re: Possible to use url tag to direct to a page without a view?

2008-09-18 Thread Rajesh Dhawan
WillF wrote: > Hi I currently have a page without a view. The corresponding url in the > url.py uses the generic view direct_to_template, is there any way I could > create a link to this url using the url template tag? In your urls.py, name that particular URL definition and then it's simple

Re: HttpResponseRedirect or render_to_response

2008-09-18 Thread Rajesh Dhawan
On Sep 18, 4:26 pm, WillF <[EMAIL PROTECTED]> wrote: > Hey I'm just picking django , and I have a question. > > What is the difference between httpresponseredirect and render_to_response? > When should I use which? Use a redirect if the view changes your data (typically, after a POST, DELETE,

Re: ImageField: upload_to

2008-09-18 Thread gnijholt
I had to define the callable function before it gets called. So in your case I'd put it right under class Product(models.model) Then you should be able to just do: upload_to=get_image_path Cheers, On Sep 18, 10:20 pm, lingrlongr <[EMAIL PROTECTED]> wrote: > According to the documentation, I

Admin UI: How to auto select selectbox items via URL?

2008-09-18 Thread Dana
Hi, Wondering why the Django admin Multiple Select box widget (in Django 0.96, not sure if 1.0 is different), only allows you to pass in single digit values via the URL. Basically, if I have a multiple select box on a popup form and Id like to pass in a value to the url like so:

Possible to use url tag to direct to a page without a view?

2008-09-18 Thread WillF
Hi I currently have a page without a view. The corresponding url in the url.py uses the generic view direct_to_template, is there any way I could create a link to this url using the url template tag? Thanks -- View this message in context:

Re: development environment versus production environment

2008-09-18 Thread R. Gorman
As you guessed, the abstraction layer can take care of *most* code. Because it is possible to write custom SQL commands it would be possible to have code not compatible with all database types. Beyond that exception though, you should be fine. R.

HttpResponseRedirect or render_to_response

2008-09-18 Thread WillF
Hey I'm just picking django , and I have a question. What is the difference between httpresponseredirect and render_to_response? When should I use which? Thanks! -- View this message in context: http://www.nabble.com/HttpResponseRedirect-or-render_to_response-tp19561038p19561038.html Sent

development environment versus production environment

2008-09-18 Thread Eric Schmitt
Does using the database in the quick install have any affect on how you code, if you plan to deploy in an Apache mod_python configuration? What I mean is, if i wanted to develop on my laptop using the quick install setup and then deploy using an Apache mod_python configuration for speed on my

Re: Basic Form Processing Question: How to prevent form validation on a GET request.

2008-09-18 Thread Daniel Roseman
On Sep 18, 9:34 pm, Karthik Krishnan <[EMAIL PROTECTED]> wrote: > Hi, > > I have a form which contains some prefilled data and some to be filled > in by the user. I have no trouble getting the forms to be prefilled. > What I want is thatfor a GET request, if the form data pre exists, > then

Re: Two Django visions running at once.

2008-09-18 Thread KillaBee
For right now I don't care if the new version is running I just want the old one installed. I am running VMware on this laptop to test some things out, but haven't been able to put it on Ubuntu. On Sep 18, 3:14 pm, Faheem Mitha <[EMAIL PROTECTED]> wrote: > On Wed, 17 Sep 2008 13:21:50 -0700

Basic Form Processing Question: How to prevent form validation on a GET request.

2008-09-18 Thread Karthik Krishnan
Hi, I have a form which contains some prefilled data and some to be filled in by the user. I have no trouble getting the forms to be prefilled. What I want is thatfor a GET request, if the form data pre exists, then display it; if not, then show a blank text field . For a post request, if the

ImageField: upload_to

2008-09-18 Thread lingrlongr
According to the documentation, I can make the upload_to argument a callable (which must receive 2 args): class Product(models.Model): number = models.CharField(max_length=20) image = models.ImageField(upload_to='') I want to build a path so it looks like this (with respect to

Re: Two Django visions running at once.

2008-09-18 Thread Faheem Mitha
On Wed, 17 Sep 2008 13:21:50 -0700 (PDT), KillaBee <[EMAIL PROTECTED]> wrote: > Is it possible to have two versions of django running at the same time > on an Ubuntu server(9.0 and 1.0)? > It is taking to long to recode, and until I do I wanted It up and > running with the old version. > I got

Re: Can not under stand the error obtained when validating a model.py

2008-09-18 Thread Karthik Krishnan
Hi Steve, That was the problem. My django package was corrupted. Reinstalling django package worked. Thanks, Karthik On Sep 17, 4:56 pm, Steve Holden <[EMAIL PROTECTED]> wrote: > Karthik Krishnan wrote: > > Hi Norman, > > > But if I have an empty file, models.py, that should thrown an error.

Re: where is my pythonpath

2008-09-18 Thread KillaBee
I am working with django .90, but I have a Mysql db in setting.py and I am trying to link Django with this DB. I run this command to do this. export DJANGO_SETTINGS_MODULE=app.settingsNo errors then django-admin.py init --settings=app.settings I get this error. EnvironmentError: Could not

Re: where is my pythonpath

2008-09-18 Thread KillaBee
I am working with django .90, but I have a Mysql db in setting.py and I am trying to link Django with this DB. I run this command to do this. export DJANGO_SETTINGS_MODULE=app.settingsNo errors then django-admin.py init --settings=app.settings I get this error. EnvironmentError: Could not

Re: change file upload destination "on the fly" for tests

2008-09-18 Thread Faheem Mitha
On Wed, 17 Sep 2008 14:42:40 -0400 (EDT), Faheem Mitha <[EMAIL PROTECTED]> wrote: > > Hi, > > I wrote some unit tests for file upload. since I didn't want the files in > the unit tests to be uploaded to the "official locaion", I changed the > upload location by reassiging MEDIA_ROOT to

Re: resolving urls template error

2008-09-18 Thread Sven Richter
Sven Richter wrote: > Hi, > > i get the following error message: > TemplateSyntaxError at /community/profile/sveris/ > Caught an exception while rendering: Reverse for 'youriq.profile_myiq' with > arguments '('',)' and keyword arguments '{}' not found. > > Original Traceback (most recent call

Re: unable to import Storage from django.core.files.storage into settings.py

2008-09-18 Thread Faheem Mitha
On Thu, 18 Sep 2008 12:16:52 -0400, Marty Alchin <[EMAIL PROTECTED]> wrote: > > On Thu, Sep 18, 2008 at 11:55 AM, Faheem Mitha <[EMAIL PROTECTED]> wrote: >> Putting the following into my settings.py (checked for two different >> projects for Dango 1.0) >> >> from django.core.files.storage import

Re: Basic template inheritance question

2008-09-18 Thread akonsu
wow, my thread has been hijacked :) thanks to those who replied to my original question. konstantin --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: using variable as dictionary key in templates

2008-09-18 Thread akonsu
hello, to my knowlege, you would need a custom tag or filter for that. konstantin On Sep 18, 1:06 pm, Xiong Chiamiov <[EMAIL PROTECTED]> wrote: > Is it possible? > > If in the templates I call section.foo (with section being a > dictionary), then it's the equivalent of section['foo'].  Is there

Re: Adding comments in loop

2008-09-18 Thread mccomas . chris
I apologize, yes {% load comments %} is in there, he's an updated version: http://dpaste.com/78978/ again, the issue is the Invalid block tag: 'render_comment_form' On Sep 18, 1:21 pm, Dmitry Dzhus <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > actually, that isn't the issue, the

Re: resolving urls template error

2008-09-18 Thread Norman Harman
Sven Richter wrote: > when i try to call: > {% url profile_myiq argument %} > NoReverseMatch: Reverse for 'youriq.profile_myiq' with arguments '('',)' and > keyword arguments '{}' not found. > (r'^(?P\w+)/$', 'user', {} 'profile_myiq'), The error indicates you were providing either empty

modelformset_factory or formset_factory for registration form that writes to two models?

2008-09-18 Thread MrJogo
Hi, I want to make a registration form that writes to two models: User and a custom Preferences. It seems that model formsets would be the best way to do that, but all the documentation I can find seems to say that modelformset_factory gets associated with a queryset. If I want to create a new

Re: Import error: Model based on another model

2008-09-18 Thread Gerard Petersen
Daniel, Thanx for the answer on code execution. As far as the import issue is concerned. I'll have a look at importing specifics. I wouldn't want you to have to dig through my code to find a syntactic typo ... :-) Regards, Gerard. Daniel Roseman wrote: > On Sep 16, 10:08 pm, Gerard Petersen

Re: where is my pythonpath

2008-09-18 Thread KillaBee
On Sep 18, 11:20 am, Sérgio Durand <[EMAIL PROTECTED]> wrote: > would be this you are looking for ? > > python -c "from distutils.sysconfig import get_python_lib; print > get_python_lib()" > > []'s > Sergio Durand > > KillaBee escreveu: > > > I need to edit my pythonpath, but where it? > >

Re: DjangoCon keynote transcript/summary

2008-09-18 Thread Gerard Petersen
Malcom, First, thanx for your enlighting feedback. I'm working with Django for 1,5 months now and the direction I read between the lines looks promising. Then, my reponse on Delta20's email was shot from the hip. My response therefore was not intended to offend anyone. Working with python for

Re: specifying MEDIA_URL in CSS files

2008-09-18 Thread MrJogo
Erik: I can't use relative URLs because of how my hosting service (my university) is set up. Each account is at something like www.university.edu/~studentname/. I could hard code it if I were leaving it on my space, but I'm making it for a group (which has space at

Re: invalid literal for int() with base 10 trying to access uploaded image

2008-09-18 Thread kelvin pompey
Is there a way to modify the html for the admin form to display the image using the html img tag instead of having a link to the image? On Thu, Sep 18, 2008 at 11:50 AM, Lisa Dusseault <[EMAIL PROTECTED]>wrote: > I've seen the same problem with FileFields, so it's not just ImageFields. > I

Re: Adding comments in loop

2008-09-18 Thread Dmitry Dzhus
[EMAIL PROTECTED] wrote: > actually, that isn't the issue, the issue is with the {% > render_comment_form for event %} tag, i'm getting a template syntax > error: > > Invalid block tag: 'render_comment_form' > > this is right after the comment_list endfor here: > > http://dpaste.com/78918/ I

Saving multiple variables using ModelForms

2008-09-18 Thread garces.85
Hello everyone, I am new in django and python programming. I have a problem, i want to save for each activity an amount of money that goes with an item. Example: i want to store the activity1 - $100 - item1, activity2 - $200 - item2, activity2 - $100 - item1. How can i use this please? Until

using variable as dictionary key in templates

2008-09-18 Thread Xiong Chiamiov
Is it possible? If in the templates I call section.foo (with section being a dictionary), then it's the equivalent of section['foo']. Is there a way to call section[foo]? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

Re: where is my pythonpath

2008-09-18 Thread Jirka Vejrazka
KillaBee, PYTHONPATH is an environment variable, not a file. Try typing "env" at yout Ubuntu command line. How to modify the environment variable was already descibed in this thread so I won't go into that again. Cheers Jirka On 9/18/08, KillaBee <[EMAIL PROTECTED]> wrote: > >

Re: where is my pythonpath

2008-09-18 Thread KillaBee
I don't have A sys.path in that folder for Ubuntu. On Sep 18, 11:20 am, Sérgio Durand <[EMAIL PROTECTED]> wrote: > would be this you are looking for ? > > python -c "from distutils.sysconfig import get_python_lib; print > get_python_lib()" > > []'s > Sergio Durand > > KillaBee escreveu: > > > I

Re: Python/Django Developer

2008-09-18 Thread James Matthews
I am very happy to hear that your company wants to use this great framework. If i can suggest also posting this job request on djangogigs.com Thanks James On Thu, Sep 18, 2008 at 9:04 AM, [EMAIL PROTECTED] < [EMAIL PROTECTED]> wrote: > > I'm working with a company helping them develop their

Re: where is my pythonpath

2008-09-18 Thread KillaBee
That give me the folder, I know that I was in the right folder. I am looking for a file called PythonPath and there is none. What is this file that I am editing. Do I just put A symlink in the folder. On Sep 18, 11:20 am, Sérgio Durand <[EMAIL PROTECTED]> wrote: > would be this you are

Re: where is my pythonpath

2008-09-18 Thread Sérgio Durand
would be this you are looking for ? python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()" []'s Sergio Durand KillaBee escreveu: > I need to edit my pythonpath, but where it? > > > > --~--~-~--~~~---~--~~ You received this

Re: where is my pythonpath

2008-09-18 Thread Tim Chase
> I need to edit my pythonpath, but where it? Which OS? And for what duration (just one shell session, or for all shell-sessions)? On *nix systems (Linux, BSD, Mac, etc), to set it across shell sessions, you usually set it in your .bashrc (or if you're using an alternate shell, in its rc

Re: unable to import Storage from django.core.files.storage into settings.py

2008-09-18 Thread Marty Alchin
On Thu, Sep 18, 2008 at 11:55 AM, Faheem Mitha <[EMAIL PROTECTED]> wrote: > Putting the following into my settings.py (checked for two different > projects for Dango 1.0) > > from django.core.files.storage import Storage > > gives > > [EMAIL PROTECTED]:/var/django/hg$ python manage.py validate >

Python/Django Developer

2008-09-18 Thread [EMAIL PROTECTED]
I'm working with a company helping them develop their Django based software. We're looking for a couple of good django/python developers. Developers can telecommute, and the team is great. If you are interested, email [EMAIL PROTECTED] -- CatalyzeMe is an early-stage

where is my pythonpath

2008-09-18 Thread KillaBee
I need to edit my pythonpath, but where it? --~--~-~--~~~---~--~~ 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,

unable to import Storage from django.core.files.storage into settings.py

2008-09-18 Thread Faheem Mitha
Hi, Putting the following into my settings.py (checked for two different projects for Dango 1.0) from django.core.files.storage import Storage gives [EMAIL PROTECTED]:/var/django/hg$ python manage.py validate Error: Can't find the file 'settings.py' in the directory containing 'manage.py'.

Re: invalid literal for int() with base 10 trying to access uploaded image

2008-09-18 Thread Lisa Dusseault
I've seen the same problem with FileFields, so it's not just ImageFields. I haven't figured it out yet. I can make a link to the file work from the main UI, but I don't know how the admin constructs its link in an unmodified admin form. Lisa On Thu, Sep 18, 2008 at 5:17 AM, silk.odyssey

Re: Problem with Django 1.0 admin on Russian language

2008-09-18 Thread Karen Tracey
Since you say you are using UTF8_BIN collation on MySQL, be sure to read: http://docs.djangoproject.com/en/dev/ref/databases/#collation-settings When you specify a binary collation in MySQL, your application code has to take on the responsibility of transforming bytestrings returned by the

Re: Problem with Django 1.0 admin on Russian language

2008-09-18 Thread Grigory Fateyev
Hello Fedya! On Thu, 18 Sep 2008 07:24:16 -0700 (PDT) you wrote: > > Unfortunately I'm dummy in python... so it's twice harder to find the > reason... But I'm still trying :) Maybe this helps? # grep -i utf8 /usr/lib/python2.4/site.py encoding = "utf8" # Default value set by

Re: Adding comments in loop

2008-09-18 Thread mccomas . chris
actually, that isn't the issue, the issue is with the {% render_comment_form for event %} tag, i'm getting a template syntax error: Invalid block tag: 'render_comment_form' this is right after the comment_list endfor here: http://dpaste.com/78918/ On Sep 18, 10:43 am, [EMAIL PROTECTED]

Re: Problems getting manage.py syncdb to work

2008-09-18 Thread airjaw
Hello, thanks for your help. I can login using psql, and see all the databases and users. Altho, I couldn't log in as ocdnet_admin . It said I didn't have ocdnet_admin database. I created ocdnet_admin database and now i can log in as that user. manage.py syncd db still does not work tho. I

Adding comments in loop

2008-09-18 Thread mccomas . chris
I'm trying to add comments to a page that has the recent blog entires, below is my code: http://dpaste.com/78918/ I get the error: TemplateSyntaxError at / 'get_comment_list' tag requires 5 or 6 arguments What did I do wrong? I've played with it for about two hours and can't figure it out...

Re: Problem with Django 1.0 admin on Russian language

2008-09-18 Thread Fedya
Unfortunately I'm dummy in python... so it's twice harder to find the reason... But I'm still trying :) I wrote very simple view: def main_menu(request): html = '' menu = Item.root('main').children() for s in menu[0].title: html = '%s %s' % (html, ord(s)) html = '%s%s' %

Re: invalid literal for int() with base 10 trying to access uploaded image

2008-09-18 Thread Picio
Here is mine, since I don't know how to reference dpaste... ;) Environment: Request Method: GET Request URL: http://localhost:8000/admin/tvsite/areas/1/areas/batzos.jpeg/ Django Version: 1.0-final-SVN-unknown Python Version: 2.5.2 Installed Applications: ['django.contrib.admin',

Re: invalid literal for int() with base 10 trying to access uploaded image

2008-09-18 Thread Picio
It happens inside the admin interface, so I've little control on It (AFAIK). This what i have in my urls.py: from django.conf.urls.defaults import * from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', (r'^admin/doc/', include('django.contrib.admindocs.urls')),

Re: invalid literal for int() with base 10 trying to access uploaded image

2008-09-18 Thread kelvin pompey
Everything is being handled by the admin application. Environment: Request Method: GET Request URL: http://localhost:8000/admin/grades/student/1/photos/desktop.png/ Django Version: 1.0-final-SVN-unknown Python Version: 2.5.2 Installed Applications: ['django.contrib.auth',

resolving urls template error

2008-09-18 Thread Sven Richter
Hi, i get the following error message: TemplateSyntaxError at /community/profile/sveris/ Caught an exception while rendering: Reverse for 'youriq.profile_myiq' with arguments '('',)' and keyword arguments '{}' not found. Original Traceback (most recent call last): File

Re: 'unicode' object has no attribute 'user'

2008-09-18 Thread Jens Diemer
Seems that the session middleware not active. It should append the user object to the request object. laspal schrieb: > I am trying to send mail using sendmail. Getting the error 'unicode' > object has no attribute 'user' ... > request.user.message_set.create(message="Mail was

Re: invalid literal for int() with base 10 trying to access uploaded image

2008-09-18 Thread Ross
The error looks like you are passing '1/photos/desktop.png' to int(), which converts a string to an integer. How are you creating the link to the picture? Your urls.py could be capturing that entire string and passing it as a parameter that you are trying to cast to an integer. A bigger stack

Adding standard admin permissions to a model

2008-09-18 Thread nickloman
My custom models which have the admin interface enabled do not have the standard add/update/delete permissions added in the database. This may be because I enabledthe admin after creating the model. Is there a way of adding these after the fact? Regards, Nick

Re: Problems getting manage.py syncdb to work

2008-09-18 Thread Sérgio Durand
hi, try to connect with postgres using psql utility: psql -h localhost -U -W if you don't have success login, the problem could be on postgres config. []'s Sergio Durand airjaw escreveu: > Hi, I'm having a bit of trouble getting past the "manage.py syncdb" > command. I am trying to setup :

Re: invalid literal for int() with base 10 trying to access uploaded image

2008-09-18 Thread Picio
I have the same issue, tried: Django 1.0 with sqlite3 (Wiindows) Django 1.0 with Mysql 5.0 (Windows) Django 1.0 with sqlite3 (Mac OS X) Daniele 2008/9/18 silk.odyssey <[EMAIL PROTECTED]>: > > I am using an imagefield from the admin interface. I can upload images > without problems but when I

Basic Apps Installation

2008-09-18 Thread osaatcioglu
Hi Everybody, I had a ridiculous error while I was trying to syncdb after adding the basic apps to my web app. The error is this: Error: No module named markupmysite However, I couldn't find any clue about this problem in the net. On the other hand, I commented out the phrase that includes

Re: keeping counts of verbs (downloads, comments, ...)

2008-09-18 Thread Evan
for very high traffic (100+ requests/sec) I would suggest using memcache to store the changes for #downloads / views. On each action (view or play or download or whatever) increment the variable in memcache (it has a fast function to do this) Then once every 1/5/15/60 seconds or so pull the

invalid literal for int() with base 10 trying to access uploaded image

2008-09-18 Thread silk.odyssey
I am using an imagefield from the admin interface. I can upload images without problems but when I click the link to view the image, I get the following error. invalid literal for int() with base 10: '1/photos/desktop.png' Any idea what's wrong? I am using django 1.0.

Re: Problem with Django 1.0 admin on Russian language

2008-09-18 Thread Fedya
Still something wrong with character set. When I use Russian characters inside value of a field in one table, Django admin interface can't show list of object corresponding to that table. Like I'm trying to access http://test.legalsw.ru/admin/menu/item/ and getting: TemplateSyntaxError at

Re: Basic template inheritance question

2008-09-18 Thread Daniele Procida
On Thu, Sep 18, 2008, Daniel Roseman <[EMAIL PROTECTED]> wrote: > >On Sep 18, 11:23 am, "Daniele Procida" <[EMAIL PROTECTED]> >wrote: >> Maybe if I explain what I'm doing it will help. >> >> Django CMS uses a base template, base.html. base.html is: >> >>

Re: Error: No module named X (django standalone script)

2008-09-18 Thread Mathieu Leplatre
On Sep 17, 10:41 pm, Eric Abrahamsen <[EMAIL PROTECTED]> wrote: > On Sep 17, 2008, at 11:45 PM, Mathieu Leplatre wrote: > > > > > > > Hi all, > > > I am starting a new thread, the first one became off-topic (http:// > > groups.google.com/group/django-users/browse_thread/thread/ > >

Re: FileSystemStorage preventing large file uploads

2008-09-18 Thread Jarek Zgoda
Wiadomość napisana w dniu 2008-09-18, o godz. 13:47, przez Graham Dumpleton: I saw actual request bodies larger than declared in content-lentgh with Firefox 2, this browser often was lying to my nginx in cases of small bodies by 1-4 bytes. >> >>> What sort of application

Re: FileSystemStorage preventing large file uploads

2008-09-18 Thread Graham Dumpleton
On Sep 18, 9:41 pm, Jarek Zgoda <[EMAIL PROTECTED]> wrote: > Wiadomość napisana w dniu 2008-09-18, o godz. 13:33, przez Graham   > Dumpleton: > > > > >> Now, where on earth have you got this idea that you can not   > >> rely on > >>> Content-Length on a request? > > >> I saw actual

Re: FileSystemStorage preventing large file uploads

2008-09-18 Thread Jarek Zgoda
Wiadomość napisana w dniu 2008-09-18, o godz. 13:33, przez Graham Dumpleton: >> Now, where on earth have you got this idea that you can not >> rely on >>> Content-Length on a request? >> >> I saw actual request bodies larger than declared in content-lentgh >> with Firefox 2, this

Re: FileSystemStorage preventing large file uploads

2008-09-18 Thread Donn
On Thursday, 18 September 2008 13:17:06 Graham Dumpleton wrote: > If Content-Length was an unreliable indicator of request content then > web applications wouldn't work properly. Okay, in context of the OP's code -- how could I employ content length and get an error message back to the admin

'unicode' object has no attribute 'user'

2008-09-18 Thread laspal
Hi, I am trying to send mail using sendmail. Getting the error 'unicode' object has no attribute 'user' My view function: def send_mail(request): _user = request.user sender = _user.email mailing_list = [] if request.method != 'POST': emailform = EmailForm()

Re: FileSystemStorage preventing large file uploads

2008-09-18 Thread Graham Dumpleton
On Sep 18, 9:28 pm, Jarek Zgoda <[EMAIL PROTECTED]> wrote: > Wiadomość napisana w dniu 2008-09-18, o godz. 13:17, przez Graham   > Dumpleton: > > > > If using mod_python, the Apache LimitRequestBody directive doesn't > work entirely properly. > >>> I have heard of a "Content-length"

  1   2   >