Re: Problem with Django 1.0 admin on Russian language

2008-09-19 Thread Fedya
Everybody, thank you for feedback. Karen, you were absolutely right! I've changed collation to utf8_unicode_ci and Django is converting strings to unicode! This is fine! Thanks a lot! RTFM :-) On Sep 18, 6:12 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > Since you say you are using UTF8_BIN c

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

2008-09-19 Thread Daniel Roseman
On Sep 19, 5:02 am, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > On Thu, Sep 18, 2008 at 5:48 PM, Valery Khamenya <[EMAIL PROTECTED]> wrote: > (How all of this is connected to what you've got in your tag is a bit > of a mystery.  The template you are mentioning, though, is not involved in > the e

How to show formset in template?

2008-09-19 Thread [EMAIL PROTECTED]
Hi all, I have formset form: BillItemFormSet = inlineformset_factory(Bill, BillItem) I am sending to template form and form_set like this: return render_to_response(BILL_TEMPLATE, { 'form': BillForm(), 'form_set': BillItemFormSet, }) How to show form_set in BILL_TEMPLATE without usin

GET FROM with parameters in action call

2008-09-19 Thread tom
Hi, I am trying to get search and pagination to work with GET form. To allow pagination of search results I need to send the search request via post and also the pagination request (our customer wants to have a input field, where he can input the page number and gets routed to it). Therefore I th

problem with built-in login-view (Authentication)

2008-09-19 Thread mwebs
Hello, I am trying to use djangos authentication system. Former I always did the login-stuff manually, but now I stumbled over the built-in authentication-functionality described in http://docs.djangoproject.com/en/dev/topics/auth/#django.contrib.auth.views.login. But when I am trying this I got

Re: development environment versus production environment

2008-09-19 Thread Eric Schmitt
thank you! On Sep 18, 2:03 pm, "R. Gorman" <[EMAIL PROTECTED]> wrote: > 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 th

Quick admin interface permissions hack

2008-09-19 Thread Frantisek Malina
{% if user has permission to change shop orders %}Orders{% endif %} Products ... How to write the above in the template without touching admin py files? Thank you --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "D

Re: How to show formset in template?

2008-09-19 Thread [EMAIL PROTECTED]
> {% for inline_form in form_set.forms %} > > {% for field in inline_admin_form.fields %} > > {{ field.errors.as_ul }} > {{ field }} > > {% en

static.serve images from css template

2008-09-19 Thread Evgeny
Hi, I have a problem with serving static images with django.views.static.serve from urls defined in css file. Everything works ok when an image is served by tag in the html (), but it doesn't work when the link to the same image is in a css file (url(site_media/ images/img5.jpg)). The css file it

Re: IE Hell. Blank Page

2008-09-19 Thread Daniele Procida
On Thu, Sep 18, 2008, lingrlongr <[EMAIL PROTECTED]> wrote: >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. I can't count the number of times similar things have bitten me, when I have puzzled a

Displaying ManyToMany relations in Admin

2008-09-19 Thread Nick Sandford
Hi all, I currently have a site setup to manage students, teachers and classrooms. In the classroom admin interface I have a horizontal filter to select the students and teachers in a classroom. The only problem is, I have roughly 1400 students and 400 teachers to select from. From what I can see

Re: Quick admin interface permissions hack

2008-09-19 Thread Frantisek Malina
It was as easy as {% if perms.shop %}Orders{% endif %} On Sep 19, 9:27 am, Frantisek Malina <[EMAIL PROTECTED]> wrote: > > {% if user has permission to change shop orders %}Orders{% endif %} > Products > ... > > > How to write the above in the template without touching admin py > files? > >

Cookie problem

2008-09-19 Thread M.Ganesh
Getting the following error message when I try to access the admin page of my spanking new django 1.0 installation : "Looks like your browser isn't configured to accept cookies. Please enable cookies, reload this page, and try again." Other information : 1. django 0.96 working well in the same

Re: Displaying ManyToMany relations in Admin

2008-09-19 Thread Simon Willison
On Sep 19, 10:24 am, "Nick Sandford" <[EMAIL PROTECTED]> wrote: > Is there some kind of limit the admin imposes on the number of items > it will show in a or the horizontal filter list? If so, can I > change it? Also, is there any better way to do this? raw_id_fields is the admin option you need

copying data from a model to another (having common abstract base class)

2008-09-19 Thread pihentagy
Hi! Suppose I have 2 models with a common abstract base class: class Base(models.Model): Meta: abstract=true field1 = ... ... class Child1(Base): ... class Child2(Base): ... Is there a way to copy child1's fields coming from Base to child2 where child1, child2 has type Child1, C

Re: djangoamf doesn't work with models with ImageField

2008-09-19 Thread euglena
anyone there? On Sep 13, 11:49 am, euglena <[EMAIL PROTECTED]> wrote: > Hi everybody, > I have a model like this: > class Product(models.Model): >     ... >     icon = models.ImageField(upload_to='icons/', blank=True) >     ... > > And I want my dangoamf to get a list of this model's objects. I a

Re: static.serve images from css template

2008-09-19 Thread Daniel Roseman
On Sep 19, 9:50 am, Evgeny <[EMAIL PROTECTED]> wrote: > Hi, > I have a problem with serving static images with > django.views.static.serve from urls defined in css file. > Everything works ok when an image is served by tag in the > html (), but it doesn't work > when the link to the same image is

Re: IE Hell. Blank Page

2008-09-19 Thread Gerard Petersen
These are firefox add-ons but can definitely help finding problems in you pages: Firebug: https://addons.mozilla.org/en-US/firefox/addon/1843 Web developer: https://addons.mozilla.org/en-US/firefox/addon/60 And there's a not so featuresk one for IE: http://www.microsoft.com/downloads/details.asp

Re: static.serve images from css template

2008-09-19 Thread Evgeny
On Sep 19, 2:53 pm, Daniel Roseman <[EMAIL PROTECTED]> wrote: > Try putting an initial slash in your url: > url(/site_media/images/img5.jpg) > > -- > DR. Tried this. Still doesn't work. --~--~-~--~~~---~--~~ You received this message because you are subscribed t

Re: static.serve images from css template

2008-09-19 Thread Evgeny
On Sep 19, 3:33 pm, Evgeny <[EMAIL PROTECTED]> wrote: > On Sep 19, 2:53 pm, Daniel Roseman <[EMAIL PROTECTED]> > wrote: > > > Try putting an initial slash in your url: > > url(/site_media/images/img5.jpg) > > > -- > > DR. > > Tried this. Still doesn't work. Disredard that, it works, I just had

Deleting user cause integrity error ... violates foreign key

2008-09-19 Thread dbee
I'm trying to delete a user from my admin panel. The system tells me that it causes an integrity error by violating a foreign key constraint ... What causes these kinds of errors ? IntegrityError at /admin/auth/user/28/delete/ ERROR: update or delete on "mot1_campaigns" violates foreign key cons

Help to get going with Django

2008-09-19 Thread Jason
Hi there, I am new, so new it hurts. I installed the BitNami Django stack on windows XP. I decided not to automatically create a new project because I wanted to find out how to do it myself. This is where my problems started. In the python interpreter I ran 'import django' and that was successf

ManyToManyField edited on admin by both sides?

2008-09-19 Thread Markos Gogoulos
Hi there, on the admin panel I am trying to display both models of an ManyToManyField relationship. Say for example there are these two models: class Software(models.Model): name = models.CharField(max_length=50) categories = models.ManyToManyField(Category) class Category(models.Model)

Re: Help to get going with Django

2008-09-19 Thread Ray Smith
Jason wrote: > Hi there, > > I am new, so new it hurts. I installed the BitNami Django stack on > windows XP. I decided not to automatically create a new project > because I wanted to find out how to do it myself. > > This is where my problems started. > > In the python interpreter I ran 'import d

mobile cookie related issue, is it a bug in django?

2008-09-19 Thread Amit Upadhyay
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, I found that request.user is not set on all requests when accessing my under development website from mobile. I have put the following in one of my middlewares for debugging: class MyMiddleware(object): def process_request(self, request):

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

2008-09-19 Thread Karen Tracey
On Fri, Sep 19, 2008 at 3:52 AM, Daniel Roseman < [EMAIL PROTECTED]> wrote: > > On Sep 19, 5:02 am, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > > On Thu, Sep 18, 2008 at 5:48 PM, Valery Khamenya <[EMAIL PROTECTED]> > wrote: > > > (How all of this is connected to what you've got in your tag is a >

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

2008-09-19 Thread Valery Khamenya
Hi Daniel, it looks like both you and Karen caught the right point. 1. the change in this one symbol indeed ends up in difference whether request to image is really performed. 2. when the image doesn't exist then the 404.html comes in play. my 404.html extends the master.html that indeed uses the

Re: ManyToManyField edited on admin by both sides?

2008-09-19 Thread Jerry Stratton
On Sep 19, 5:09 am, Markos Gogoulos <[EMAIL PROTECTED]> wrote: > on the admin panel I am trying to display both models of an > ManyToManyField relationship. Say for example there are these two > models: > > class Software(models.Model): >     name = models.CharField(max_length=50) >     categories

Re: ManyToManyField edited on admin by both sides?

2008-09-19 Thread Jerry Stratton
On Sep 19, 6:45 am, Jerry Stratton <[EMAIL PROTECTED]> wrote: > class SoftwareInline(admin.StackedInline): >         model = Software > > class CategoryAdmin(admin.ModelAdmin): >         inlines = [SoftwareInline] Edit: shouldn't post before caffeine. The above might work, but I don't know if it

ModelForm initial= vs. instance=

2008-09-19 Thread David Durham, Jr.
I'm writing a little wizard application to walk a user through creating a bunch of Model objects. I stumbled across something kind of interesting; if I create a ModelForm like so: SomeModelForm(initial={...}) All of the fields I have are prepopulated, except the ForeignKey ones. I don't hav

Re: HttpResponseRedirect or render_to_response

2008-09-19 Thread WillF
Okay Thanks. So say for a login, should that be redirect? Would there be a way to pass a context using the redirect much like you can with render_to_response? On Sep 18, 5:24 pm, Rajesh Dhawan <[EMAIL PROTECTED]> wrote: > On Sep 18, 4:26 pm, WillF <[EMAIL PROTECTED]> wrote: > > > Hey I'm just

Re: Install version .90 help

2008-09-19 Thread KillaBee
On Sep 18, 8:34 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > 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 c

Model inheritance and app. design considerations

2008-09-19 Thread Robert
Hello Group, I am not an experienced application designer and need your help. I would like to discuss the structure of the project I am about to rebuild. Currently I am maintaing a service where users put their offers. My example "Offer" model: class OfferType(models.Model): name = models

Re: HttpResponseRedirect or render_to_response

2008-09-19 Thread Brian Victor
On Sep 18, 4:26 pm, WillF <[EMAIL PROTECTED]> wrote: > What is the difference between httpresponseredirect and render_to_response? > When should I use which? If you're familiar with how HTTP works, it should be enough for me to point out that HttpResponseRedirect returns a 302 with a Location hea

windows can't find django-admin.py

2008-09-19 Thread tcp
Hi, New to Python...getting started with Django. I've just installed Django and and following some getting started instructions. I'm trying to run django-admin like this: c:\myproject> python django-admin.py startproject iFriends and I get this problem: python: can't open file 'django-admin.

Re: windows can't find django-admin.py

2008-09-19 Thread Rodolfo
I guess for that to work you have to have it on Windows PATH env. variable, and not PYTHONPATH. That's cuz Windows can't find the file you're passing to python. []'s Rodolfo tcp escreveu: > Hi, > > New to Python...getting started with Django. > > I've just installed Django and and following s

Re: djangoamf doesn't work with models with ImageField

2008-09-19 Thread Karen Tracey
On Fri, Sep 19, 2008 at 6:39 AM, euglena <[EMAIL PROTECTED]> wrote: > > anyone there? > > On Sep 13, 11:49 am, euglena <[EMAIL PROTECTED]> wrote: > > Hi everybody, > > I have a model like this: > > class Product(models.Model): > > ... > > icon = models.ImageField(upload_to='icons/', blank=

How do I set up a python web server on Windows XP?

2008-09-19 Thread Jason
OK, I am literally at the end of my tether. I would like to get started on this but I can't work out how to get a python server running on windows XP... can someone link me to something... somewhere that will give me instruction on how to get this going. Thanks --~--~-~--~~---

Re: How do I set up a python web server on Windows XP?

2008-09-19 Thread Karen Tracey
On Fri, Sep 19, 2008 at 10:35 AM, Jason <[EMAIL PROTECTED]> wrote: > > OK, I am literally at the end of my tether. I would like to get > started on this but I can't work out how to get a python server > running on windows XP... can someone link me to something... somewhere > that will give me inst

Re: ManyToManyField edited on admin by both sides?

2008-09-19 Thread Markos Gogoulos
Hi Jerry this doen't work with ManyToManyField Exception has no ForeignKey to Regards On Sep 19, 4:48 pm, Jerry Stratton <[EMAIL PROTECTED]> wrote: > On Sep 19, 6:45 am, Jerry Stratton <[EMAIL PROTECTED]> wrote: > > > class SoftwareInline(admin.StackedInline): > >         model = Software

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

2008-09-19 Thread Kenneth Gonsalves
On Friday 19 Sep 2008 7:02:06 am Karthik Krishnan wrote: > 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}}

Re: windows can't find django-admin.py

2008-09-19 Thread tcp
Your reply doesn't make sense to me. It is not WINDOWS looking for the .py file, it is the Python interpreter. In any case, I have tried that to prove that it is not the solution. Here is the proof: C:\python\projects\iFriends>python django-admin.py help python: can't open file 'django-admin.py':

Re: windows can't find django-admin.py

2008-09-19 Thread tcp
Ok. Now the link to the PATH makes more sense to me. I will try again by associating .py files to Python.exe. Tom On Sep 19, 10:45 am, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > On Fri, Sep 19, 2008 at 10:20 AM, tcp <[EMAIL PROTECTED]> wrote: > > > Hi, > > > New to Python...getting started with

Re: django google-app-engine appengine backend

2008-09-19 Thread bfrederi
@Adam Fast I think you are right. I'm not at home, so I can't check for sure, but I'm almost positive I completely forgot to add 'appengine_django' to my INSTALLED_APPS. Thank you. @free won I started with app-engine-patch actually, because it was the first patch/helper I came across. But then I

Re: windows can't find django-admin.py

2008-09-19 Thread tcp
Karen and Rodolfo, Thank you both for your quick answers. I have associated .py files with Python.exe and then started Python by invoking the specific .py file rather than directly invoking Python.exe and it works fine. Here is the proof: C:\>django-admin.py Type 'django-admin.py help' for usage

Re: windows can't find django-admin.py

2008-09-19 Thread Karen Tracey
On Fri, Sep 19, 2008 at 10:20 AM, tcp <[EMAIL PROTECTED]> wrote: > > Hi, > > New to Python...getting started with Django. > > I've just installed Django and and following some getting started > instructions. > > I'm trying to run django-admin like this: > > c:\myproject> python django-admin.py sta

Multi table inheritance and admin

2008-09-19 Thread Donn
Hi, I have these models: Book, Album (etc.) and they are "grouped" in Res (for Resources) My code is at : http://dpaste.com/79178/ Is there some (simple) way to get admin to work like this: Edit a Res --> the inline shows the Book class OR album class *depending* on what the class of the object

Re: How do I set up a python web server on Windows XP?

2008-09-19 Thread Jason
OK, dumb question... it comes with a server? Do you have a link? How do I get this development server running? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email

no images and blank?

2008-09-19 Thread kaputnik
I setup reviewboard on a server running gentoo, managed to get it working (i think) but the pages are all just black text with a white background. I have a feeling i'm missing something in the apache configuration? --~--~-~--~~~---~--~~ You received this message b

Re: How do I set up a python web server on Windows XP?

2008-09-19 Thread Karen Tracey
On Fri, Sep 19, 2008 at 11:16 AM, Jason <[EMAIL PROTECTED]> wrote: > > OK, dumb question... it comes with a server? > > Do you have a link? > > How do I get this development server running? > > A quick run through the online tutorial http://docs.djangoproject.com/en/dev/intro/tutorial01/#intro-tut

one-to-many vs. many-to-one in admin

2008-09-19 Thread Don Jennings
I have the following situation: -a manufacturer makes several different products (one-to-many) -a manufacturer may have one or more production locations (one-to-many) -each product may be made at one or more of the manufacturer's locations and a location might produce multiple products (many-to-m

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

2008-09-19 Thread barbara shaurette
Try logging out your SQL and look for any suspicious INSERTs - I've run across this error a few times, under different circumstances, always because my code is trying to insert a string when the column is expecting an integer. --~--~-~--~~~---~--~~ You received this

Re: How do I set up a python web server on Windows XP?

2008-09-19 Thread Jason
I have read through that. It has taken me around and around in circles. I have spent a day on this and haven't typed a line of code. The guide seems to be written for OSX or Linux. As a Windows user I feel lost, confused and frustrated. I even went out to my library and rented a copy of their Dja

Re: no images and blank? (SOLVED)

2008-09-19 Thread kaputnik
actually sorry, i figured this out (was specific to reviewboard and not django). On Sep 19, 11:23 am, kaputnik <[EMAIL PROTECTED]> wrote: > I setup reviewboard on a server running gentoo, managed to get it > working (i think) but the pages are all just black text with a white > background.  I hav

verbose_name in template?

2008-09-19 Thread Berco Beute
Is the fieldname or verbose_name of a instance-field (not a form- field) accessible in a template? 2B --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-

Re: How do I set up a python web server on Windows XP?

2008-09-19 Thread Brian Neal
On Sep 19, 10:45 am, Jason <[EMAIL PROTECTED]> wrote: > I have read through that. It has taken me around and around in > circles. I have spent a day on this and haven't typed a line of code. > The guide seems to be written for OSX or Linux. As a Windows user I > feel lost, confused and frustrated.

Re: GeoDjango: MultiPolygon and Polygon

2008-09-19 Thread springmeyer
Alfonso, Yes, polygon data stored as multipolygons will play nice at the database level. This is a common approach with shapefiles imported into Postgres/Postgis that contain both single and multi geometries. You therefore just assume they are all multipolygons (ie like shp2pgsql). You just need

Re: How do I set up a python web server on Windows XP?

2008-09-19 Thread Karen Tracey
On Fri, Sep 19, 2008 at 11:45 AM, Jason <[EMAIL PROTECTED]> wrote: > > I have read through that. It has taken me around and around in > circles. I have spent a day on this and haven't typed a line of code. > The guide seems to be written for OSX or Linux. As a Windows user I > feel lost, confused

Re: Install version .90 help

2008-09-19 Thread KillaBee
On Sep 19, 9:18 am, KillaBee <[EMAIL PROTECTED]> wrote: > On Sep 18, 8:34 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> > wrote: > > > 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

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

2008-09-19 Thread Karthik Krishnan
It throws a debug error page. On Sep 18, 10:01 pm, Kenneth Gonsalves <[EMAIL PROTECTED]> wrote: > On Friday 19 Sep 2008 7:02:06 am Karthik Krishnan wrote: > > > 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 s

Re: Problem with url tag (Caught an exception while rendering: Reverse ...)

2008-09-19 Thread Steve Holden
Brian Neal wrote: > > On Sep 16, 4:09 pm, Steve Holden <[EMAIL PROTECTED]> wrote: > >> Brian Neal wrote: >> >>> I might have found my answer. I was looking at the list of >>> incompatible changes and found this: >>> >>> http://code.djangoproject.com/changeset/8760 >>> >>> Whi

Re: Multi table inheritance and admin

2008-09-19 Thread Don
On Sep 19, 11:09 am, Donn <[EMAIL PROTECTED]> wrote: > Hi, > I have these models: > Book, Album (etc.) and they are "grouped" in Res (for Resources) > My code is at :http://dpaste.com/79178/ > > Is there some (simple) way to get admin to work like this: > Edit a Res --> the inline shows the Book

Re: How to show formset in template?

2008-09-19 Thread [EMAIL PROTECTED]
> I have made typing error in my message so this ^ should be like this: >  {% for inline_form in form_set.forms %} >           >                  {% for field in inline_form.fields %} >                           >                                  {{ field.errors.as_ul }} >                      

Just a note: django web app in django-non-friendly hosting environment

2008-09-19 Thread n00m
You need no at all to ask the hoster to install Django on his machine. Apache (etc) + installed mod_python is quite enough to get your django app running. The django package (and e.g. PIL) can be copied to there along with your django web dirs, as if it's a part of your web site/app. Example:

Re: Problem with url tag (Caught an exception while rendering: Reverse ...)

2008-09-19 Thread Brian Neal
On Sep 19, 12:45 pm, Steve Holden <[EMAIL PROTECTED]> wrote: > That's annoying: now *I* have a (named) pattern that won't reverse with > the URL tag: specifically, the edit profile URL from the Google code > profiles app: > >                        url(r'^edit/$', >                            vi

Re: Just a note: django web app in django-non-friendly hosting environment

2008-09-19 Thread Brian Neal
On Sep 19, 1:40 pm, "n00m" <[EMAIL PROTECTED]> wrote: > You need no at all to ask the hoster to install Django > on his machine. > Apache (etc) + installed mod_python is quite enough to > get your django app running. > > The django package (and e.g. PIL) can be copied to there > along with your

Re: Working with inline formsets to created/edit an object

2008-09-19 Thread Alex
I am very interested in this as well. I had to abandon formsets because they were too difficult to get working for creating associated objects at the same time as the original object. I was sure this was a common issue but could find absolutely no information about how to do this reasonably clea

Re: Just a note: django web app in django-non-friendly hosting environment

2008-09-19 Thread n00m
@Brian Neal But I think that all your points are not specific to django per se. Sorta this. + Does not "my note" make a question like: "Where can I see a list of Django-friendly hosts?" pretty meaningless? PS Btw the syntax "SetHandler mod_python" instead of usual but outdated "SetHandler python

Re: IE Hell. Blank Page

2008-09-19 Thread Ross Dakin
On a related note, IE also chokes on trailing commas in arrays and such, e.g.: foo = [1, 2, 3,] --~--~-~--~~~---~--~~ 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@

Template Inheritance Question

2008-09-19 Thread djandrow
I have a template, text that extend a template base. In my text template I have; {% extends 'base.html' %} {% block content %} SOME CODE {% endblock content %} Anyway, my question is when I enter this save it then stick it on my server, it adds closing tags at the bottom; and the Doctype st

Re: Template Inheritance Question

2008-09-19 Thread David Durham, Jr.
On Fri, Sep 19, 2008 at 4:07 PM, djandrow <[EMAIL PROTECTED]> wrote: > > I have a template, text that extend a template base. > > In my text template I have; > > {% extends 'base.html' %} > > {% block content %} > > SOME CODE > > {% endblock content %} I'm not a django expert, but I think that yo

Re: Template Inheritance Question

2008-09-19 Thread Matthias Kestenholz
On Sat, Sep 20, 2008 at 12:08 AM, David Durham, Jr. <[EMAIL PROTECTED]> wrote: > > On Fri, Sep 19, 2008 at 4:07 PM, djandrow <[EMAIL PROTECTED]> wrote: >> >> I have a template, text that extend a template base. >> >> In my text template I have; >> >> {% extends 'base.html' %} >> >> {% block conten

Re: Template Inheritance Question

2008-09-19 Thread djandrow
Its shared hosting so it could just be the file editor (which is built in) that they use causing it to happen if this doesn't happen to anyone else. If no one else is having the problem I would imangine that would be it. Thanks, Andrew --~--~-~--~~~---~--~~ You re

links in RSS feeds

2008-09-19 Thread akonsu
hello, syndication feeds have links for each item as well as for the feed. right now i hard code urls and they are the same as the urls i have in my urlpatterns. i want to follow django's DRY principle so i am looking for a way to generate these urls in my feeds class in a way similar to {% url %

Re: specifying MEDIA_URL in CSS files

2008-09-19 Thread Erik Allik
I still can't understand why you can use relative URLs to images in your CSS files. If you keep your CSS files together with your image files, nothing will break if you move them to another URL. Sorry if I'm missing something obvious. Erik On 18.09.2008, at 20:56, MrJogo wrote: > > Erik: I

Re: how to setup LDAP authorisation in django/apache.

2008-09-19 Thread Jashugan
Here's my experience with ldapauth.py[1] with AD: Here is the basic settings[2]: LDAP_SERVER_URI = 'ldap://ldap.company.com:389' First of all it seems AD LDAP is pretty picky. I had to play with several different settings until I found something that worked. There are two ways to determine the

Re: how to setup LDAP authorisation in django/apache.

2008-09-19 Thread Rock
We rolled our own LDAP authorization. First I created a python module that imported ldap from the python-ldap-2.2.1 package and wrapped in functions that performed authentication and pulled selected data from our corporate LDAP server. Then one of my partners used that to create our own login_requ

Re: Problem with url tag (Caught an exception while rendering: Reverse ...)

2008-09-19 Thread Steve Holden
Brian Neal wrote: > > > On Sep 19, 12:45 pm, Steve Holden <[EMAIL PROTECTED]> wrote: >> That's annoying: now *I* have a (named) pattern that won't reverse with >> the URL tag: specifically, the edit profile URL from the Google code >> profiles app: >> >>url(r'^edit/$', >>

Many-To-Many with extra fields

2008-09-19 Thread Nate Thelen
Looking at the docs here: http://docs.djangoproject.com/en/dev/topics/db/models/#extra-fields-on-many-to-many-relationships I cannot find any reference to how to access the data in the "Membership" table. For example, if I have a reference to the "beatles" object, how do I find the "date_joined

Re: copying data from a model to another (having common abstract base class)

2008-09-19 Thread Malcolm Tredinnick
On Fri, 2008-09-19 at 02:54 -0700, pihentagy wrote: > Hi! > > Suppose I have 2 models with a common abstract base class: > > class Base(models.Model): > Meta: > abstract=true > field1 = ... > ... > > class Child1(Base): > ... > > class Child2(Base): > ... > > Is there a way to

Re: mobile cookie related issue, is it a bug in django?

2008-09-19 Thread Malcolm Tredinnick
I have no idea about the problem you're reporting. It doesn't looks very standards (such as the are with cookies) compliant to be sending two cookies with the same name to the same path/domain. You could try renaming the cookie name (SESSION_COOKIE_NAME in settings) to ensure that they really are

Re: verbose_name in template?

2008-09-19 Thread Malcolm Tredinnick
On Fri, 2008-09-19 at 09:11 -0700, Berco Beute wrote: > Is the fieldname or verbose_name of a instance-field (not a form- > field) accessible in a template? Not unless you pass it in. The field's verbose name isn't stored directly on the Python object anywhere; it's part of the _meta attribute o

Re: Install version .90 help

2008-09-19 Thread Malcolm Tredinnick
On Fri, 2008-09-19 at 09:48 -0700, KillaBee wrote: > > > On Sep 19, 9:18 am, KillaBee <[EMAIL PROTECTED]> > wrote: > > On Sep 18, 8:34 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> > > wrote: > > > > > On Thu, 2008-09-18 at 15:13 -0700, Carol wrote: > > > > As far as I can see, django-admin.py doe

Re: ModelForm initial= vs. instance=

2008-09-19 Thread Malcolm Tredinnick
On Fri, 2008-09-19 at 08:54 -0500, David Durham, Jr. wrote: > I'm writing a little wizard application to walk a user through > creating a bunch of Model objects. I stumbled across something kind > of interesting; if I create a ModelForm like so: > >SomeModelForm(initial={...}) > > All of t

javascript

2008-09-19 Thread yozhik
Hi all, I'm learning django and ran into the following problem. I have an html file with an external javascript file. The .js file is in the same directory as html file . The problem is django ignores the script in the file but works fine otherwise, i.e. displays the html page correctly. Also, if

Re: javascript

2008-09-19 Thread Juan Hernandez
what you need here is to enable the static files module or at least, use them inside your templates On Sat, Sep 20, 2008 at 9:33 PM, yozhik <[EMAIL PROTECTED]> wrote: > > Hi all, > > I'm learning django and ran into the following problem. I have an html > file with an external javascript file. Th

Cookie problem

2008-09-19 Thread M.Ganesh
Hi, The in my apache config file has ServerName django1. I access the site with http://django1/admin/. I get a login page. when I give my username and password, I get the message given below. When I check the firefox cookies there is a cookie with name sessionid for this django1 site. W

Re: javascript

2008-09-19 Thread sergioh
Maybe an easy way for qa env you could add something like: (r'^scripts/(.*)', 'django.views.static.serve', {'document_root':'jscripts/'}), to your urls.py of your project. And in your template: This will looks for jquery.js inside the jscript directory (yourproject/jscripts/lib/..) On Sep

vServer Image - Has anyone tried this?

2008-09-19 Thread John M
I stumbled on this today http://es.cohesiveft.com/ I've built a django server, and am going to try tonight. Has anyone tried this yet? John --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To

ModelForm vs CheckboxSelectMultiple

2008-09-19 Thread Vance Dubberly
So with a form that does this: forms.ModelChoiceField(TransportMethod.objects.all(), widget=forms.CheckboxSelectMultiple()) The first check box has no value and is labeled '-' is there an option to have that not exist. I don't don't see a passable param which would turn it off in either

Re: ModelForm vs CheckboxSelectMultiple

2008-09-19 Thread Joshua Jonah
You have to set a default. Vance Dubberly wrote: > So with a form that does this: > forms.ModelChoiceField(TransportMethod.objects.all(), > widget=forms.CheckboxSelectMultiple()) > > The first check box has no value and is labeled '-' is there > an option to have that not exist. I don'

Re: ModelForm vs CheckboxSelectMultiple

2008-09-19 Thread Joshua Jonah
... use the 'initial' attribute of the form field. Vance Dubberly wrote: > So with a form that does this: > forms.ModelChoiceField(TransportMethod.objects.all(), > widget=forms.CheckboxSelectMultiple()) > > The first check box has no value and is labeled '-' is there > an option to have

Re: Multi table inheritance and admin

2008-09-19 Thread Donn
On Friday, 19 September 2008 19:55:05 Don wrote: > class ResAdmin(admin.ModelAdmin): > inlines = [ BookAdmin, >AlbumAdmin, >] Hi, tried that but it gives both Book AND Album under Res. The idea is to make Books and Albums and then (later) go to Res and add them

Re: Many-To-Many with extra fields

2008-09-19 Thread Rock
In my code I have a reference and a name such that I can do perform a "get" to procure the reference to the correct intermediate object. Then I simply interrogate that object directly. It should be possible to do a "values" style query instead if you only want a particular field or set of fields.

Re: Many-To-Many with extra fields

2008-09-19 Thread Russell Keith-Magee
On Sat, Sep 20, 2008 at 8:37 AM, Nate Thelen <[EMAIL PROTECTED]> wrote: > > Looking at the docs here: > > http://docs.djangoproject.com/en/dev/topics/db/models/#extra-fields-on-many-to-many-relationships > > I cannot find any reference to how to access the data in the > "Membership" table. For ex

Re: javascript

2008-09-19 Thread Ross
http://docs.djangoproject.com/en/dev/howto/static-files/ The Django dev server can serve static files per the link above, but be sure to let your real web server (like Apache) handle serving static files outside development. On Sep 19, 9:03 pm, yozhik <[EMAIL PROTECTED]> wrote: > Hi all, > > I'm

how to get CURRVAL()

2008-09-19 Thread Merrick
I have a function in my model where I need the next sequence id from postgresql so i can create an encoded value based off it. Any ideas on how to do this? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users

Re: javascript

2008-09-19 Thread yozhik
Thank you, guys! It works now. I'm confused about serving static files issue (I did read the page on djangoproject.com). Does it mean that in the production mode I should put js, css files in a directory separate from myDajangoProject/ and modify src attribute within html files accordingly? Curre

The view django_bookmarks.bookmarks.views.bookmark_save_page didn't return an HttpResponse object

2008-09-19 Thread ehpmail
Why do i get the above error in views.py: def bookmark_save_page(request): if request.method == 'POST': form = BookmarkSaveForm(request.POST) if form.is_valid(): # Create or get link. link, dummy = Link.objects.get_or_create( url=for