facing problem with magnolia sync script

2008-04-13 Thread stranger
Hello everybody, I am writing a blog app where I am syncing my magnolia links to my weblog. I am using the magnolia API for this. In my link model I have a 'add_date' field to sync the created time of the magnolia link. In the syncing function I am using add_date =

Re: __unicode__(self):

2008-04-13 Thread Malcolm Tredinnick
On Sun, 2008-04-13 at 22:04 -0700, Brandon Taylor wrote: > Hello everyone, > > I'm pretty new to Django, so please bear with me. > > When I'm defining a model, and I want to return a value to use in the > admin for the information to be displayed as such: > > from django.db import models > >

__unicode__(self):

2008-04-13 Thread Brandon Taylor
Hello everyone, I'm pretty new to Django, so please bear with me. When I'm defining a model, and I want to return a value to use in the admin for the information to be displayed as such: from django.db import models class Link(models.Model): name = models.CharField() url =

Re: Security concerns about publically exposing admin tool

2008-04-13 Thread Justin Lilly
It isn't out of date per se. It is, however, going to be revamped when we have a stable replacement. You can find more information on the wiki at http://code.djangoproject.com/wiki/NewformsAdminBranch -justin On Mon, Apr 14, 2008 at 12:32 AM, meppum <[EMAIL PROTECTED]> wrote: > >

Re: Problem storing utf-8 in MySQL

2008-04-13 Thread Malcolm Tredinnick
On Sun, 2008-04-13 at 21:30 -0700, Rob Hudson wrote: > On Apr 13, 6:26 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> > wrote: > > Do you mean that you are coming across a case of trying to store 4-byte > > UTF-8 sequences in MySQL? Or do you mean that you've managed to create a > > database table

Re: Modeling authentication after the admin site

2008-04-13 Thread Malcolm Tredinnick
On Sun, 2008-04-13 at 21:23 -0700, meppum wrote: > I was looking at the why the admin site handles authentication and > noticed that there are three private methods in > django.contrib.admin.views.decorators: _display_login_form, > _encode_post_data, _decode_post_data. It looks like these do

Re: Problem storing utf-8 in MySQL

2008-04-13 Thread Rob Hudson
On Apr 13, 6:26 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > Do you mean that you are coming across a case of trying to store 4-byte > UTF-8 sequences in MySQL? Or do you mean that you've managed to create a > database table with the incorrect encoding and only realised this after > you've

Re: Security concerns about publically exposing admin tool

2008-04-13 Thread [EMAIL PROTECTED]
Once newforms-admin hits you will be able to change that if you want(without hacking on the django source). On Apr 13, 11:08 pm, meppum <[EMAIL PROTECTED]> wrote: > I simply meant that after a few failed password attempts the user is > not presented with a CAPTCHA or something. I'll keep all

Re: Security concerns about publically exposing admin tool

2008-04-13 Thread Malcolm Tredinnick
On Sun, 2008-04-13 at 20:36 -0700, meppum wrote: > I noticed that most django sites including djangoproject.com and even > curse.com allow their admin sites to be accessed through the web. This > seems like a bit of a security concern as someone could create a bot > to attempt to collect

Re: Security concerns about publically exposing admin tool

2008-04-13 Thread Jacob Kaplan-Moss
On Sun, Apr 13, 2008 at 10:36 PM, meppum <[EMAIL PROTECTED]> wrote: > Is this common practice or am I wrong about the admin sites ability to > be cracked with brute force? I was curious about this once, too, so I ran a dictionary attack bot I, erm, "obtained" against my Django admin once. It

Re: Security concerns about publically exposing admin tool

2008-04-13 Thread [EMAIL PROTECTED]
There's no reason you have to put it at /admin/ , you could always put it somewhere else(/boogy_man/) for security through obscurity. On Apr 13, 10:36 pm, meppum <[EMAIL PROTECTED]> wrote: > I noticed that most django sites including djangoproject.com and even > curse.com allow their admin sites

Re: How to display a image in the template?

2008-04-13 Thread [EMAIL PROTECTED]
You need to actually be serving static content: http://www.djangoproject.com/documentation/static_files/ On Apr 13, 10:25 pm, Duke <[EMAIL PROTECTED]> wrote: > Hi > Can any tell me how to display a image in the hrml in Django > > > > Hello, Image > > > > > > this html is not displaying

How to display a image in the template?

2008-04-13 Thread Duke
Hi Can any tell me how to display a image in the hrml in Django Hello, Image this html is not displaying the image --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this

Re: Help with getting drop-downs to work

2008-04-13 Thread steve skelton
acch!-- idiocy located and destroyed. there was a null field in the countries list. Yahoo!! thanks! On Apr 13, 9:26 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > On Sun, Apr 13, 2008 at 9:48 PM, steve skelton <[EMAIL PROTECTED]> > wrote: > > > > > thanks - I've tried it both ways and with

Re: Accessing Session from urls.py

2008-04-13 Thread [EMAIL PROTECTED]
I would do per request url routing: http://www.b-list.org/weblog/2007/nov/06/urlconf/ On Apr 13, 9:17 pm, "Cole Tuininga" <[EMAIL PROTECTED]> wrote: > Hey folks - > > I'm looking to make url "routing" choices based on some values from > the session. That is, I want to change the url->view

Re: Help with getting drop-downs to work

2008-04-13 Thread steve skelton
yes I am working with legacy data transferred from FileMaker. That's why I put in the meta table so the "real" import will work, once it's ready for production. There are actually 5 "look up" tables as I call them: lu_country <-- any countries already selected from the existing data. the main

Re: Help with getting drop-downs to work

2008-04-13 Thread Kenneth Gonsalves
On 14-Apr-08, at 8:25 AM, Karen Tracey wrote: > I just tried that command and it works for me. Are you behind a > corporate firewall? I've seen reports that they sometimes > interfere with svn traffic, depending on how they are configured. > The usual workaround is to use https://

Re: How to redirect if already logged in

2008-04-13 Thread Malcolm Tredinnick
On Sun, 2008-04-13 at 19:53 -0700, meppum wrote: > Okay. So how would I have both an "access gate" that people would be > redirected to if they try to access a page that requires them to be > logged in first and a homepage that allows them to login, but > redirects them to the "access gate" if

Re: Help with getting drop-downs to work

2008-04-13 Thread Karen Tracey
On Sun, Apr 13, 2008 at 9:48 PM, steve skelton <[EMAIL PROTECTED]> wrote: > > thanks - I've tried it both ways and with __str__ get the error > > __str__ returned non-string (type NoneType). > That's odd... > the top-level error dump is > > Request Method: GET > Request URL:

Accessing Session from urls.py

2008-04-13 Thread Cole Tuininga
Hey folks - I'm looking to make url "routing" choices based on some values from the session. That is, I want to change the url->view mapping based on the session variables. Problem is, I can't seem to figure out how to access the session from urls.py. I understand that outside views I can

Re: Strange, strange behaviour

2008-04-13 Thread Malcolm Tredinnick
On Mon, 2008-04-14 at 03:58 +0200, Monica Leko wrote: [...] > In settings.py I have > > INSTALLED_APPS = ( > 'django.contrib.contenttypes', > 'django.contrib.sessions', > 'django.contrib.sites', > 'django.contrib.admin', > 'django.contrib.auth', > "app.app_chart", > )

Re: Help with getting drop-downs to work

2008-04-13 Thread steve skelton
thanks - I am also confused about whether I have the "latest and greatest" install as the djangoproject lists .96 as the latest release and running svn co http://code.djangoproject.com/svn/django/trunk/ in cmd.exe returns an error PROPFIND request failed on '/svn/django/trunk' the latest

Strange, strange behaviour

2008-04-13 Thread Monica Leko
My appname was app, ant then I renamed app to app_chart. My application works like a charm, but when I tried to run som unittests today, i got som unexpected error which wasn't there when app was the name of application File "C:\Python25\lib\site-packages\django\db\models\base.py", line 169,

Re: Help with getting drop-downs to work

2008-04-13 Thread steve skelton
thanks - I've tried it both ways and with __str__ get the error __str__ returned non-string (type NoneType). the top-level error dump is Request Method: GET Request URL:http://localhost:8000/admin/papers_admin/paper/35/ Exception Type: TypeError Exception Value:

Re: Help with getting drop-downs to work

2008-04-13 Thread Malcolm Tredinnick
On Sun, 2008-04-13 at 18:28 -0700, steve skelton wrote: > sorry I forgot to specify - am using 0.96.1 (django) and MySQL 5.0.51a > (server) and 5.1.11 (client) and my local install is on Vista laptop > with Apache and PHP also installed. Unicode support went in after 0.96 was released (and

Re: Problem storing utf-8 in MySQL

2008-04-13 Thread Malcolm Tredinnick
Rob, On Sun, 2008-04-13 at 13:28 -0700, Rob Hudson wrote: [...] > For those of us having a very similar problem elsewhere, what's a good > general solution? Depends on the general problem. :-) Do you mean that you are coming across a case of trying to store 4-byte UTF-8 sequences in MySQL? Or

Re: How to overwrite the hyperlink of objects in change list template of django admin?

2008-04-13 Thread Malcolm Tredinnick
On Sun, 2008-04-13 at 06:20 -0700, Leon wrote: > Hi, > I use django admin to manage a table. There is a hyperlink for > each object in the change_list template, which will bring me to the > change_form template. I want to change that hyperlink and redirect it > to another url to handle. I

Re: Help with getting drop-downs to work

2008-04-13 Thread Karen Tracey
On Sun, Apr 13, 2008 at 9:28 PM, steve skelton <[EMAIL PROTECTED]> wrote: > > sorry I forgot to specify - am using 0.96.1 (django) and MySQL 5.0.51a > (server) and 5.1.11 (client) and my local install is on Vista laptop > with Apache and PHP also installed. > The problem is your code below is

Re: Help with getting drop-downs to work

2008-04-13 Thread Michael
Try changing __unicode__ to __str__. The unicode merge was after .96 and therefore it isn't looking for __unicode__ to define the name of the field. Hope that helps, Michael On Sun, Apr 13, 2008 at 9:28 PM, steve skelton <[EMAIL PROTECTED]> wrote: > > sorry I forgot to specify - am using

Re: Tag

2008-04-13 Thread Malcolm Tredinnick
On Sun, 2008-04-13 at 13:22 -0300, Claudio Escudero wrote: > Hi, > > What is block-like tag? Something with a start and end tag. For example, {%block %}...{% endblock %}, or {% if %}{% else %}...{% endif %} Regards, Malcolm -- The cost of feathers has risen; even down is up!

Re: Help with getting drop-downs to work

2008-04-13 Thread steve skelton
sorry I forgot to specify - am using 0.96.1 (django) and MySQL 5.0.51a (server) and 5.1.11 (client) and my local install is on Vista laptop with Apache and PHP also installed. On Apr 13, 8:24 pm, steve skelton <[EMAIL PROTECTED]> wrote: > Trying to get admin on my system to load values based on

Help with getting drop-downs to work

2008-04-13 Thread steve skelton
Trying to get admin on my system to load values based on related tables on db. I have set the FK on the papers table to tie with the PK of each look-up table and set models like so: class LuPaperContentEra(models.Model): paper_content_era = models.CharField(blank=True, maxlength=150) def

Re: Announcing the Django Dash!

2008-04-13 Thread Jonathan Lukens
What about Python libraries like PIL or ReportLab? On Apr 11, 10:42 pm, "Daniel Lindsley" <[EMAIL PROTECTED]> wrote: > We'd like to announce the firstDjangoDash > (http://www.djangodash.com/) to the community.DjangoDashis a web > application building competition forDjangodevelopers. The gist is

Re: can i join your group

2008-04-13 Thread andy baxter
a.f wrote: > am intersting in web desgining & puplishing > e books & soft wear > seo & ather stuff > If you can read this, you're already subscribed to the group. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

Re: TemplateSyntaxError when moving from 0.96.1 to SVN

2008-04-13 Thread Ramiro Morales
On Sun, Apr 13, 2008 at 7:36 PM, Gonzalo Delgado <[EMAIL PROTECTED]> wrote: > Hi there, I'm trying to move my django projects to 0.97-pre (trunk). The > first error I get is this one (when trying to load the admin interface in a > small project): > > TemplateSyntaxError at /admin > Template

TemplateSyntaxError when moving from 0.96.1 to SVN

2008-04-13 Thread Gonzalo Delgado
Hi there, I'm trying to move my django projects to 0.97-pre (trunk). The first error I get is this one (when trying to load the admin interface in a small project): TemplateSyntaxError at /admin Template u'admin/base_site.html' cannot be extended, because it doesn't exist Is there a guide for

can i join your group

2008-04-13 Thread a.f
am intersting in web desgining & puplishing e books & soft wear seo & ather stuff --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: Problem storing utf-8 in MySQL

2008-04-13 Thread Rob Hudson
On Mar 21, 4:19 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > OK, got it now.  Turns out the answer is in the clear-as-mud error message, > sort of: > > Warning: Incorrect string value: '\xF0\x90\x8C\xBC\xF0\x90...' > > x'f0908cbc' is a valid 4-byte UTF-8 value, only MySQL doesn't support

How to check if a value of a model field has changed?

2008-04-13 Thread Patrick Lauber
Hi all, I need to find out in a pre_save signal if a value of a model has changed. So far i had no luck with a solution. Is there a way to do that besides loading the instance again in the pre_save signal? cheers Pat --~--~-~--~~~---~--~~ You received this

Re: Tag

2008-04-13 Thread Alex Koshelev
Look at the docs: http://www.djangoproject.com/documentation/templates_python/#parsing-until-another-block-tag On Apr 13, 8:22 pm, "Claudio Escudero" <[EMAIL PROTECTED]> wrote: > Hi, > > What is block-like tag? > =/ > > Thanks, > Claudio > > On Sat, Apr 12, 2008 at 10:26 PM, Malcolm Tredinnick <

Re: Tag

2008-04-13 Thread Claudio Escudero
Hi, What is block-like tag? =/ Thanks, Claudio On Sat, Apr 12, 2008 at 10:26 PM, Malcolm Tredinnick < [EMAIL PROTECTED]> wrote: > > > On Sat, 2008-04-12 at 18:45 -0300, Claudio Escudero wrote: > > Hi, > > > > Please, is there any way to put tag inside tag? > > No, this isn't possible. Use a

Re: unknown encoding: utf-8 error

2008-04-13 Thread Cephire
With help from the forum members and through many pages on the net, I was able to build a stand-alone app. I've blogged about it, with the hope that it might be helpful to someone else. Feel free to comment if there are any improvement. http://www.jjude.com/index.php/archives/70 Thank you all,

Re: Custom field not created with model inheritance

2008-04-13 Thread Alex Koshelev
Do you use proper django branch with model inheritance support? Trunk doesn't On Apr 13, 5:37 pm, Julien <[EMAIL PROTECTED]> wrote: > Hi, > > I'm trying to have a model inherit from another which has a custom > field: > > import uuid > from django.db import models > from django.db.models.fields

Re: OneToOneField unchangeable

2008-04-13 Thread Manuel Meyer
> On Sun, Apr 13, 2008 at 8:34 AM, Manuel Meyer > <[EMAIL PROTECTED]> wrote: > > > No, that's they way it is documented as working. The one-to-one > > field acts as the primary key for the model, and primary keys can't > > be edited. From http://www.djangoproject.com/documentation/model- > >

Custom field not created with model inheritance

2008-04-13 Thread Julien
Hi, I'm trying to have a model inherit from another which has a custom field: import uuid from django.db import models from django.db.models.fields import CharField class UuidField(CharField):# <- The custom field def __init__(self, verbose_name=None, name=None,

How to overwrite the hyperlink of objects in change list template of django admin?

2008-04-13 Thread Leon
Hi, I use django admin to manage a table. There is a hyperlink for each object in the change_list template, which will bring me to the change_form template. I want to change that hyperlink and redirect it to another url to handle. I didn't want to customize the current change_form for this

Re: Feel free to test queryset-refactor branch

2008-04-13 Thread Ivan Illarionov
Glad to hear that queryset-refactor is almost ready. Currently, I noticed that there are few SQL portability issues and few old queryset API issues (eg in admin). I already filed #6956 and #6957. I do some heavy testing of this branch and I will report anything that goes wrong. Regards, --

Re: OneToOneField unchangeable

2008-04-13 Thread Karen Tracey
On Sun, Apr 13, 2008 at 8:34 AM, Manuel Meyer <[EMAIL PROTECTED]> wrote: > > > No, that's they way it is documented as working. The one-to-one > > field acts as the primary key for the model, and primary keys can't > > be edited. From http://www.djangoproject.com/documentation/model- > >

Re: OneToOneField unchangeable

2008-04-13 Thread Manuel Meyer
> No, that's they way it is documented as working. The one-to-one > field acts as the primary key for the model, and primary keys can't > be edited. From http://www.djangoproject.com/documentation/model- > api/#one-to-one-relationships: > > This OneToOneField will actually replace the

Re: Overriding returned contents of user objects

2008-04-13 Thread Tane Piper
Hi again, I seem to have come a cropper with this. Although it returns the fields I want on other models, on my Project model it seems to affect it's functions and attribues For example, in this line: projects = [project for project in Project.projects.all() if

How to Choose an Unlimited Web Hosting for free

2008-04-13 Thread Free Domain & Web Hosting
How to Choose an Unlimited Web Hosting 1) Visit www.axealis.com to get domain and hosting 2) Unlimited Bandwidth ,this mean unlimited data transmission for your client access. 2) Unlimited Space , you can upload file for unlimited . 3) Unlimited Email , many of email account can created . 5) SSL

Re: Overriding returned contents of user objects

2008-04-13 Thread Tane Piper
Hi Malcolm, values() seems to be the way to go for now. I've extracted some of the code back to a context variable, and anything within a view I'll just have to try and make it as efficient as possible, while still removing the user object from the context. On Sun, Apr 13, 2008 at 11:59 AM,

Re: Feel free to test queryset-refactor branch

2008-04-13 Thread Julien
Hi Malcolm, I've been using the branch on a project in development for a few weeks now, and haven't come across any issue yet - although I can't say I've pushed it to its limits. Glad to hear it's close to be merged to trunk. Thanks so much for this massive contribution! Best, Julien On Apr

Feel free to test queryset-refactor branch

2008-04-13 Thread Malcolm Tredinnick
We're getting pretty close to merging queryset-refactor into trunk and would like to do this as soon as practical. There are still a couple of enhancements to add (#5420, mostly), one bug to fix (#5937) and some internal tweaking to do, but all the main stuff is ready to be used. So if anybody

Re: Overriding returned contents of user objects

2008-04-13 Thread Malcolm Tredinnick
On Sun, 2008-04-13 at 11:46 +0100, Tane Piper wrote: [...] > What I want to > know is there any way I could simplify the method and have it remove > the password field any time a user object is being selected as part of > a related query?? Not really, unless you use values(). For any model, if

Overriding returned contents of user objects

2008-04-13 Thread Tane Piper
Hi there, I'm currently building a Django app that uses JavaScript and Ajax. One of the things I am doing is within each view, as well as outputting a variable as standard, I also JSON encode any objects on the page and return them as well, so when the page loads, they are in the DOM as values I

Re: Django Tutorial Site not in Admin

2008-04-13 Thread garazy
Apologies, I thought the class Admin was at the base didn't realise it was under the class Polls. That has fixed it now. Gary On Apr 13, 8:31 pm, Kenneth Gonsalves <[EMAIL PROTECTED]> wrote: > On 13-Apr-08, at 3:54 PM, garazy wrote: > > > It does not appear in the admin when I login with

Re: Django Tutorial Site not in Admin

2008-04-13 Thread Kenneth Gonsalves
On 13-Apr-08, at 3:54 PM, garazy wrote: > It does not appear in the admin when I login with the superuser > account that got created when I installed the project. Please let me > know what other information you need me to provide to debug this large > problem. please post your models.py file

Django Tutorial Site not in Admin

2008-04-13 Thread garazy
Hi, I am using the SVN version of Django version 0.97-pre-SVN-7419 on Ubuntu Edgy with mysql database. I have followed the tutorial, the shell code works fine and my DB is hooked up correctly. I have the admin working, I added the class Admin: pass to the mysite/polls/models.py

Re: How to reiterate something "n" times in django template?

2008-04-13 Thread fizban
On 13 Apr, 12:01, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: [snip] > But, again, that won't work for this particular draft > spec. Smells like a problem with the spec to me, since it restricts the > options a fair bit and makes for somewhat unreadable names, but so be > it. Yeah, I didn't

Re: How to reiterate something "n" times in django template?

2008-04-13 Thread Malcolm Tredinnick
On Sun, 2008-04-13 at 01:52 -0700, fizban wrote: > Hi, > > Given that I'm using django-tagging to show a tagcloud, is there any > way to, given "tag.font_size", to make the template print > "tag.font_size" times the letter "v"? > > What I'm trying to accomplish is to make a tagcloud compliant

ANN: dupdater.py v0.6.0 -- Django project evolution utility

2008-04-13 Thread srackham
New version and rename of updater.py utility (see previous post http://groups.google.com/group/django-users/browse_thread/thread/d9c16173c6ee2436). Documentation here: http://www.methods.co.nz/django/dupdater.html Project repo and download here: http://hg.sharesource.org/dupdater/ Cheers,

How to reiterate something "n" times in django template?

2008-04-13 Thread fizban
Hi, Given that I'm using django-tagging to show a tagcloud, is there any way to, given "tag.font_size", to make the template print "tag.font_size" times the letter "v"? What I'm trying to accomplish is to make a tagcloud compliant to the htagcloud microformat draft.. so: sometag <-