Re: unique=True doesn't seem to do its job

2008-04-01 Thread Kenneth Gonsalves
On 02-Apr-08, at 12:03 PM, Julien wrote: > get() returned more than one Project -- it returned 2! Lookup > parameters were {'slug__exact': u'hello'} > > I have the same issue on the front end using ModelForm. > > Shouldn't that raise an IntegrityError, and then reload the form page > with an err

Re: unique=True doesn't seem to do its job

2008-04-01 Thread Julien
Sorry, above I meant "I would NOT get an IntegrityError but the following:..." On Apr 2, 5:33 pm, Julien <[EMAIL PROTECTED]> wrote: > Hi there, > > I have a slug field which I'd like to be unique, so I do like this: > > class Project(models.Model): > slug = models.SlugField(_('bla'), max_leng

Re: issue with the development server

2008-04-01 Thread Evert Rol
> I have a problem with the development server. I don't know if this > behavior is right or if there is a problem. > I have a view which is triggered throught an url. In this view I use > urllib2. If I start the view with the development server the process > is never ends. But if I start the view

unique=True doesn't seem to do its job

2008-04-01 Thread Julien
Hi there, I have a slug field which I'd like to be unique, so I do like this: class Project(models.Model): slug = models.SlugField(_('bla'), max_length=50, blank=True, unique=True, help_text=_('blabla')) In admin, if I saved a project with the slug 'hello', and then saved another one with t

issue with the development server

2008-04-01 Thread Brot
Hello, I have a problem with the development server. I don't know if this behavior is right or if there is a problem. I have a view which is triggered throught an url. In this view I use urllib2. If I start the view with the development server the process is never ends. But if I start the view wi

Re: some database error?: not sure...

2008-04-01 Thread Evert Rol
>> And a slightly problematic part is sqlite, which doesn't allow you >> to ALTER tables (or at least not adding a column to a table); I >> use sqlite mainly for testing & developing, recreating it every >> time one of my model changes (the thing there that I found the >> most hassle is

Re: 2 questions on Model

2008-04-01 Thread Malcolm Tredinnick
On Tue, 2008-04-01 at 22:10 -0700, PENPEN wrote: > 1. About select_related(): > It is said that it will automatically "follow" foreign-key > relationships, selecting that additional related-object data when it > executes its query. So it is not applicable for ManyToMany > relationship, isn't it?

Re: 'module' object has no attribute 'day_abbr' --Problem editing using Admin

2008-04-01 Thread Ryan Vanasse
Thanks for the reply. I checked the DB file and yes, you were correct about the updating the table. I updated it using the manage.py sqlreset command. Currently it contains an event date of type "date" (in the database mind you). However, I also commented out, and then removed for good measure,

2 questions on Model

2008-04-01 Thread PENPEN
1. About select_related(): It is said that it will automatically "follow" foreign-key relationships, selecting that additional related-object data when it executes its query. So it is not applicable for ManyToMany relationship, isn't it? And if select_related() is used, will the queryset method

Re: Strange login error in newforms-admin site: ViewDoesNotExist at /accounts/login/

2008-04-01 Thread Michael
I tried this today with runserver and could not duplicate this issue. It appears to be a mod_python issue. This is interesting. On Tue, Apr 1, 2008 at 8:51 AM, Michael <[EMAIL PROTECTED]> wrote: > > Yours was one of the posts I discovered when I googled this but my > > problem seemed to come o

Re: Error adding an excluded field

2008-04-01 Thread Kenneth Gonsalves
On 02-Apr-08, at 7:59 AM, [EMAIL PROTECTED] wrote: > def cartuchoFallado(request, numinfo): > if request.method == 'POST': > data = copy(request.POST) > data['informe'] = numinfo > form = forms.CartuchoFalladoFrm(data) > if form.is_valid(): > form

Re: Advanced Form Questions

2008-04-01 Thread spirit
you can look at those articles: http://www.djangoproject.com/documentation/newforms/ http://code.pui.ch/2007/01/07/using-djangos-newforms/ On 4月2日, 上午5时07分, "Chris Hartjes" <[EMAIL PROTECTED]> wrote: > Hi there. I'm a newbie at Python but have lots of experience with PHP and > MVC frameworks in

Re: Advanced Form Questions

2008-04-01 Thread spirit
About "1) how do I get Django to generate those form elements for me so I don't have to do it by hand 2) how do I get Django to process those values when they come in. " you can look at those articles belows: http://www.djangoproject.com/documentation/newforms/ http://code.pui.ch/2007/01/07/using

Re: Django newbie question about views and authentication

2008-04-01 Thread SmileyChris
You can use the django.views.generic.simple "direct_to_template" view just like you would the render_to_response shortcut - it works the same except you pass in the request as the first argument: direct_to_template(request, 'template/index.html') On Apr 2, 2:42 am, Matias Surdi <[EMAIL PROTECTED

Re: Error adding an excluded field

2008-04-01 Thread jorgehugoma
heres my modelform class: class CartuchoFalladoFrm(ModelForm): class Meta: model = models.CartuchoFallado exclude = ('informe',)#My model has for fields serie, cartucho, marca, informe and here is my view function: def cartuchoFallado(request, numinfo): if request.method

Re: some database error?: not sure...

2008-04-01 Thread Darryl Ross
Evert Rol wrote: And a slightly problematic part is sqlite, which doesn't allow you to ALTER tables (or at least not adding a column to a table); I use sqlite mainly for testing & developing, recreating it every time one of my model changes (the thing there that I found the most hassle is

Re: Error adding an excluded field

2008-04-01 Thread Malcolm Tredinnick
On Tue, 2008-04-01 at 19:09 -0700, [EMAIL PROTECTED] wrote: > Malcom, > > I looked at the ModelForm documentation and to be honest with you i > don't understand how am i suppose to change or add a required value > that i excluded. I should underscore that i am fairly new to django so > please ba

Re: Error adding an excluded field

2008-04-01 Thread jorgehugoma
Malcom, I looked at the ModelForm documentation and to be honest with you i don't understand how am i suppose to change or add a required value that i excluded. I should underscore that i am fairly new to django so please bare with me. I tried coping request.POST into a dictionary variable and a

Re: Adding an "invalid" choice to a ChoiceField?

2008-04-01 Thread [EMAIL PROTECTED]
I assume he meant required=True, because being required is what causes '' to not be allowed. On Apr 1, 8:38 pm, Michael <[EMAIL PROTECTED]> wrote: > > TOPIC_CHOICES=[('', '-- pick one --'), ('key1', '...'), ...] > > Thanks, using an empty string for the value seems to do the trick. Is > there som

Re: Adding an "invalid" choice to a ChoiceField?

2008-04-01 Thread Michael
> TOPIC_CHOICES=[('', '-- pick one --'), ('key1', '...'), ...] Thanks, using an empty string for the value seems to do the trick. Is there somewhere in the documentation that explains this behavior? I'm not able to locate it anywhere. > And required=False for the ChoiceField (which is the defaul

Re: JSON serializers.serialize raises DoesNotExist on recursive data structures

2008-04-01 Thread 1234
Is this model work on in admin? 2008/4/1, Legioneer <[EMAIL PROTECTED]>: > > > My data model is very similar to your: > > class Category(models.Model): > name = models.CharField(max_length=64) > descr = models.CharField(max_length=255, blank=True) > rank = models.PositiveIn

Re: inclusion tags and RequestContext

2008-04-01 Thread Malcolm Tredinnick
On Tue, 2008-04-01 at 07:40 -0700, Panos Laganakos wrote: > I changed the definition of the inclusion tag to accept a second > parameter in the form of: > > def my_function(context, myparam): > ... > > but I didn't get access to the variables in the context, I had to: > > return { > '

Re: Just learning the ropes with Django and authentication

2008-04-01 Thread Jeremy Sandell
Probably the best way to understand how it works is to check the source. under django/contrib/admin/views/decorators.py is the view (_display_login_form), and under django/contrib/admin/templates/admin/ login.html is the form itself. I'd also suggest looking at django/contrib/auth/ for futher ins

Re: Django newbie question about views and authentication

2008-04-01 Thread Malcolm Tredinnick
On Tue, 2008-04-01 at 15:42 +0200, Matias Surdi wrote: [...] > ¿Is this correct? Isn't it a bit tedious to do this with all views? What > if I forget to add the RequestContext thing in a view? If you don't pass in the parameters that are required, the function won't be able to use them. Surely

Re: Example application

2008-04-01 Thread Jeremy Sandell
There are some great resources available here: http://code.djangoproject.com/wiki/DjangoResources Though you might be better served creating a mockup site in Django, and implementing such things using the rest of the Django documentation (outside of the tutorials, I mean). Anyway, good luck! On

Re: Error adding an excluded field

2008-04-01 Thread Malcolm Tredinnick
On Tue, 2008-04-01 at 16:28 -0700, [EMAIL PROTECTED] wrote: > Hello, > > How do I add a field that is required by my database but excluded in > my forms.py? I used ModelForm class to define my forms but in the meta > class I excluded one of the required fields so i can add it later in > my views

Error adding an excluded field

2008-04-01 Thread jorgehugoma
Hello, How do I add a field that is required by my database but excluded in my forms.py? I used ModelForm class to define my forms but in the meta class I excluded one of the required fields so i can add it later in my views.py. I tried adding the value using the save(commit = False) like this:

Error adding an excluded field

2008-04-01 Thread jorgehugoma
Hello, How do I add a field that is required by my database but excluded in my forms.py? I used ModelForm class to define my forms but in the meta class I excluded one of the required fields so i can add it later in my views.py. I tried adding the value using the save(commit = False) like this:

mysql-devel on mac

2008-04-01 Thread stranger
Hello everyone, I am having problem with mysql-python installation on leopard. I am getting errors when compiling mysql-python. error: command 'gcc' failed with exit status 1 mysql.c:35:23: error: my_config.h: No such file or directory _mysql.c:40:19: error: mysql.h: No such file or direct

Re: Complicated relations

2008-04-01 Thread Russell Keith-Magee
On 01/04/2008, at 12:31 AM, R. Akerman wrote: > > Ah great, I thought I went over the models documentation but must have > missed just what I was looking for... Thanks, I'll have a go at it You may also be interested in ticket #6095 [1]. This is an effort to add m2m intermediary models as part

Re: Calling syncdb twice

2008-04-01 Thread Russell Keith-Magee
On 31/03/2008, at 10:51 PM, Evert Rol wrote: > >> I was wondering why you can only call "python manage.py syncdb" to >> create your databases but after that if you change your models file >> it work create the changes and you have to do them manually using >> SQL? > > I think there are several

Example application

2008-04-01 Thread Cruskaya Smith
Hi, I am new to django, and I programed the 4 tutorials site django, I want to investigate other examples for have better idea of managing code; someone has a small example of handling forms with newforms and make such basic tasks: addition, edit, display, lists (especially in handling forms with

Re: Adding additional needed information in to newforms post

2008-04-01 Thread timc3
On Apr 1, 10:49 pm, "Phil Davis" <[EMAIL PROTECTED]> wrote: > On 01/04/2008, timc3 <[EMAIL PROTECTED]> wrote: Yes I think that you are right, and I actually did that on another form. Trouble is on that I noticed a problem with form.save(commit=False) when you have a multipart form it will actual

Advanced Form Questions

2008-04-01 Thread Chris Hartjes
Hi there. I'm a newbie at Python but have lots of experience with PHP and MVC frameworks in general. The question I have is on the proper Django way to solve a problem. I want to create a form where you can enter multiple teams and multiple dates in order to find out where and when they are playi

RE: Auth System

2008-04-01 Thread Mat
Thanks for the quick low down, very useful! Annoyingly, I need full permission based system on objects, not an owner setup. Objects typically have 5-15 different permissions which may or may not be set, and these need limiting per user per object. Seems like generic-auth was ideal in theory. Doe

Re: Adding additional needed information in to newforms post

2008-04-01 Thread Phil Davis
On 01/04/2008, timc3 <[EMAIL PROTECTED]> wrote: > I thought that I could add in some additional information to a form > before it gets saved as a new object in the database but the following > isn't working: > > def groupadd(request): > > if request.method == 'POST': > form = Group

Re: Auth System

2008-04-01 Thread James Bennett
On Tue, Apr 1, 2008 at 3:38 PM, Mat <[EMAIL PROTECTED]> wrote: > I'm looking at django for a new project, and have a quick question, I'm > going to need a mixture of the Query-set branch and generic-auth branch, I > really need object based permissions, but it seems like generic-auth was > las

Auth System

2008-04-01 Thread Mat
Hey guys, I'm looking at django for a new project, and have a quick question, I'm going to need a mixture of the Query-set branch and generic-auth branch, I really need object based permissions, but it seems like generic-auth was last modified ~1 year ago, does that mean its complete, the wiki se

Re: ImportError on login/logout

2008-04-01 Thread Michael
What version of Django are you using? Do you have django.contrib.auth in your INSTALLED_APPS? On Tue, Apr 1, 2008 at 12:10 PM, knack <[EMAIL PROTECTED]> wrote: > > I created a brand new project and app, left the default settings > untouched, ran syncdb to create the user authentication tables,

Re: datetime 8 hours off

2008-04-01 Thread Simon Oberhammer
> What version of Django are you using?, what deployment method > are you using? (mod_python, fast cgi, mod_wscgi). i'm using mod_python and am running the current svn django. I've found an open timezone bug, but don't think its related http://code.djangoproject.com/changeset/7184 --~--~-

Re: Django book error

2008-04-01 Thread Evert Rol
> Well... the 'Django book error' subject... is because everyone seem to > have to go down this path and the book says nothing about having to > install the PIL library or even what it is. > > Sorry to bother with such trivial questions. > > It seems the whole website is down for the libjpeg. Is t

Re: Django book error

2008-04-01 Thread Poz
Well... the 'Django book error' subject... is because everyone seem to have to go down this path and the book says nothing about having to install the PIL library or even what it is. Sorry to bother with such trivial questions. It seems the whole website is down for the libjpeg. Is there another

Re: Get number of the day

2008-04-01 Thread Esteban Saavedra L.
Hi heidi, 2008/4/1, Heidi Bustamante <[EMAIL PROTECTED]>: > > Hello > A date anyone, how to get the number of the day that corresponds for day of the week, you can use: date1.isoweekday() Esteban -- M.Sc. Ing. Esteban Saavedra Lopez CEO Opentelematics.Bolivia Telefono:(+591.2) 5245959 Ce

Re: Newbie with Django

2008-04-01 Thread Richa
Thanks karen I had to get the svn version as I had both templates and media folders in my admin folder. The http://127.0.0.1/admin is showing the login screen and I am able to log in too. hehehehehe. Richa On Mar 31, 8:53 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > On Mon, Mar 31, 2008 at 1

Re: edit_inline and the Django Admin interface

2008-04-01 Thread [EMAIL PROTECTED]
I have exactly the same issue. Have you found a solution? /mac On Mar 27, 1:40 am, ocamljohn <[EMAIL PROTECTED]> wrote: > My model includes a class called "Topic", and there exists a many-to- > many relationship between Topics. This relationship between topics > also includes a field named "sour

Re: Django book error

2008-04-01 Thread Evert Rol
> I am a newbie learning Django and so far loving the process. I'm going > through the djangobook.com and came across a problem. > > In chapter 5 you create your first database (how exciting!) problem is > it seem like everyone that went thought this chapter(including me) got > this error: > > "~/

Re: Creating Custom Admin Views

2008-04-01 Thread oliver
This I think contains the main views. http://code.djangoproject.com/browser/django/trunk/django/contrib/admin/views/main.py line 769 def change_list(request, app_label, model_name): seems to be the view you need to copy and every thing that is attached to it. I have not gotten for in my implemen

Re: SelectDatewidget does not shows the correct value

2008-04-01 Thread theskyiscrape
SelectDateWidget cannot handle datetime fields. I subclassed the widget: class DatetimeSelectDateWidget(SelectDateWidget): """Overrides render to provide string value expected by SelectDateWidget. """ def render(self, name, value, attrs=None): # The SelectDateWidget in django

Django book error

2008-04-01 Thread Poz
Hello all, I am a newbie learning Django and so far loving the process. I'm going through the djangobook.com and came across a problem. In chapter 5 you create your first database (how exciting!) problem is it seem like everyone that went thought this chapter(including me) got this error: "~/Do

Re: Fixture? Testing? how do you do it?

2008-04-01 Thread Prairie Dogg
I just did this for the first time last night, although I definitely don't know how to write good tests, at least I wrote some tests. First thing you'll wanna check out if you haven't is: http://www.djangoproject.com/documentation/testing/ But I assume you have, so I'll just get on to the fixtu

Re: Get number of the day

2008-04-01 Thread Tim Chase
> A date anyone, how to get the number of the day that corresponds from which starting point? day of the year? day of the week? day of the month? Reading up on Python's strftime() method of datetime objects [1] may point you at what you need. Small caveat regarding current breakage for dat

Fixture? Testing? how do you do it?

2008-04-01 Thread Tony
I am relatively new to Django, and I am having trouble getting my head around fixtures. The Django documentation just assumes that you should know what a test fixture is and how to write one. I understand that fixtures are just test data, but how is one written? Any guidance/examples on this wo

Re: Get number of the day

2008-04-01 Thread erob
Hi Heidi, Perhaps you missed the part in the docs about the date filter ? In any cases, here's the link: http://www.djangoproject.com/documentation/templates/#date Hope this helps, Etienne On Apr 1, 12:10 pm, "Heidi Bustamante" <[EMAIL PROTECTED]> wrote: > Hello > A date anyone, how to get th

SelectDatewidget does not shows the correct value

2008-04-01 Thread Rocio Figueroa
Hello Within a form, a field date: UserForm = forms.models.form_for_instance(user) UserForm.base_fields [ 'record'].widget = SelectDateWidget() Does not shows the correct value, always shows the value of January 1, 2008, showing how to make the correct value Thanks --~--~-~--~~

Get number of the day

2008-04-01 Thread Heidi Bustamante
Hello A date anyone, how to get the number of the day that corresponds Thanks Heidi --~--~-~--~~~---~--~~ 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@googlegrou

Re: ImportError on login/logout

2008-04-01 Thread knack
I created a brand new project and app, left the default settings untouched, ran syncdb to create the user authentication tables, and created a very simple view (just returns an HttpResponse object) that requires login permission. Same error: "ImportError at /accounts/ login/: No module named login

Re: Creating Custom Admin Views

2008-04-01 Thread Bernd
no, I didn't found any answers :-( Could you send me the source code you copied from the django admin? I also looked into the django-admin source code, but I hadn't enough time to look deeper into this topic. Is there a possibility in newforms-admin to solve this problem? On Tue, 2008-04-01 at

Beta testers (and writers) wanted for the notmm project!

2008-04-01 Thread Etienne Robillard
Hello, I'd be much interested in getting feedback surrounding the notmm toolkit. In particular, it would be great to get some inputs back from the Django community or from people that uses Paste within Django, SQLAlchemy, Mako, Pylons, etc. Moreover, I'd be willing to pay up to 50.00$ USD

django-survey Extracted from PyCon

2008-04-01 Thread yml
Hello, Last week I have discovered that some of the apps composing PyCon backend [2] have been exposed on "code.google.com". I am especially interested by "django-survey" [1] since I have been working recently on something similar [3]. I like how the survey from is built using the newforms. I have

django-survey Extracted from PyCon

2008-04-01 Thread yml
Hello, Last week I have discovered that some of the apps composing PyCon backend [2] have been exposed on "code.google.com". I am especially interested by "django-survey" [1] since I have been working recently on something similar [3]. I like how the survey from is built using the newforms. I have

Re: Adding additional needed information in to newforms post

2008-04-01 Thread Evert Rol
> I thought that I could add in some additional information to a form > before it gets saved as a new object in the database but the following > isn't working: > > def groupadd(request): > >if request.method == 'POST': >form = GroupForm(request.POST) >if form.is_valid(): >

Re: Adding an "invalid" choice to a ChoiceField?

2008-04-01 Thread Thomas Guettler
Michael schrieb: > When specifying the choices parameter is there a way to mark say, for > example, the first choice as invalid? > > e.g. > > TOPIC_CHOICES = ( > ('erroneous', '-- pick one --'), # <-- I would not want this > choice to count as being valid > ('general', 'General enquiry'),

Re: Adding additional needed information in to newforms post

2008-04-01 Thread Michael
Is GroupForm a ModelForm? If not where is it supposed to be saving? What I don't understand is why this information is being adding to the cleaned_data outside of the form. Why don't you create a custom save function in the form and have the form handle this. Then there is no need to manipulate c

Adding additional needed information in to newforms post

2008-04-01 Thread timc3
Hi, I thought that I could add in some additional information to a form before it gets saved as a new object in the database but the following isn't working: def groupadd(request): if request.method == 'POST': form = GroupForm(request.POST) if form.is_valid(): da

Re: Really strange Newforms issue with Initial data.

2008-04-01 Thread Michael
Maybe redundant isn't the right word. It can be done with the code provided by newforms so that you don't need to define things inside your views like that. Let the form handle all of the form handling and your view handle the processing of the request to the form and then how to respond to the re

Re: Really strange Newforms issue with Initial data.

2008-04-01 Thread oliver
ok, still have to learn more (i thought i was getting to grips with newforms). Every time i figure something out it reduce the code I have writen before. The complexity with this project is that this is the 1st from from about 6 hence why we dump it all into request session. I looked at the form

Re: JSON serializers.serialize raises DoesNotExist on recursive data structures

2008-04-01 Thread Legioneer
My data model is very similar to your: class Category(models.Model): name = models.CharField(max_length=64) descr = models.CharField(max_length=255, blank=True) rank = models.PositiveIntegerField(default=10) parent = models.ForeignKey('self', null=True, blank=True,

Re: Really strange Newforms issue with Initial data.

2008-04-01 Thread Michael
Just briefly looking at the way that you have done this, I ask why are you using new forms in the first place? All the validation that you are doing is redundant, all the calls and initial values you are trying to accomplish is redundant. Newforms (and any python to HTML forms) are a tool to help

Re: Really strange Newforms issue with Initial data.

2008-04-01 Thread Evert Rol
> I just found a post where they do this .. > testform = BookingFormOne(initial={ > 'u_1stline': user.get_profile().currentAddress.street1, > } >) > as in call initial when the form class is called. and it seems to > work!?! > > can any one explain why thou? as i still dont get why

Re: inclusion tags and RequestContext

2008-04-01 Thread Panos Laganakos
I changed the definition of the inclusion tag to accept a second parameter in the form of: def my_function(context, myparam): ... but I didn't get access to the variables in the context, I had to: return { 'myparam': myparam, 'acontextvar': context['acontextvar'] } Is this normal,

Re: JSON serializers.serialize raises DoesNotExist on recursive data structures

2008-04-01 Thread 1234
this is my example class Type(models.Model): type = models.CharField('分类名称',maxlength=50,core=True) path = models.CharField('url地址',maxlength=250,blank=True,editable=False) typename = models.CharField('分类名称',maxlength=200,editable=False) parent = models.ForeignKey('self',related_na

Re: Really strange Newforms issue with Initial data.

2008-04-01 Thread oliver
I just found a post where they do this .. testform = BookingFormOne(initial={ 'u_1stline': user.get_profile().currentAddress.street1, } ) as in call initial when the form class is called. and it seems to work!?! can any one explain why thou? as i still dont get why my way is not

Re: JSON serializers.serialize raises DoesNotExist on recursive data structures

2008-04-01 Thread Legioneer
Thank you, Michael. Tried several combinations but it doesn't work either. 1. First I tried to use Category.objects.all(): c = Category.objects.all() serializers.serialize("json", c) and got the same error. 2. Then tried to init some variable with s[:5] and the result didn't change. 3. When

RE: Django font

2008-04-01 Thread Mat
Thanks, that's just what I was looking for, little pricey though Thanks again, Mat From: django-users@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Justin Lilly Sent: 01 April 2008 14:49 To: django-users@googlegroups.com Subject: Re: Django font It's a "homemade" logo, but th

Re: Creating Custom Admin Views

2008-04-01 Thread oliver
have you found any answers to this? as i am trying to do the same thing, I just want to change the data set that is send to the default template. I have been looking in the srouce code and am trying to copy what django admin does into my custom view, but it would be nice if there was an easier way

Really strange Newforms issue with Initial data.

2008-04-01 Thread oliver
Hi, I have this very wired problem and I just can not figure out why it is happening. Newfroms seem to not send the "initial" value for a field on the 1st load of the view. This is the code: http://dpaste.com/42561/ its "just" a form and a view that calls the form. The problem lies with addin

Re: 'module' object has no attribute 'day_abbr' --Problem editing using Admin

2008-04-01 Thread Erik Vorhes
That's because the table storing your information doesn't have an "EventDate" field, and it can't be ordered by something that doesn't exist. You'll need to update the table before it will work correctly. On Mon, Mar 31, 2008 at 1:25 AM, Ryan Vanasse <[EMAIL PROTECTED]> wrote: > > I just comment

Re: Django font

2008-04-01 Thread Justin Lilly
It's a "homemade" logo, but the font is called DLT Prokyon which can be purchased from http://www.dutchtypelibrary.nl/Prokyon_rdrct.html -justin On Tue, Apr 1, 2008 at 9:42 AM, Mat <[EMAIL PROTECTED]> wrote: > > Slightly off topic here, but I'm putting a website together at the moment, > and ne

Re: Django font

2008-04-01 Thread Antonio Cavedoni
On Tue, Apr 1, 2008 at 3:42 PM, Mat <[EMAIL PROTECTED]> wrote: > Slightly off topic here, but I'm putting a website together at the moment, > and need a logo, I really like the django font and it would fit in with the > rest of the style wonderfully, does anyone know what its called/have a link

Django newbie question about views and authentication

2008-04-01 Thread Matias Surdi
Hi, Suppose I've the following on the top of every page of my application (in base.html for example): {% if user.is_authenticated %} Welcome, {{ user.username }}. Thanks for logging in. {% else %} Welcome, new user. Please log in. {% endif %} Now, as far as I understand I must ALWAY

Django font

2008-04-01 Thread Mat
Slightly off topic here, but I'm putting a website together at the moment, and need a logo, I really like the django font and it would fit in with the rest of the style wonderfully, does anyone know what its called/have a link, or is it a homemade logo? Mat --~--~-~--~~~

Re: Strange login error in newforms-admin site: ViewDoesNotExist at /accounts/login/

2008-04-01 Thread Michael
> Yours was one of the posts I discovered when I googled this but my > problem seemed to come out of nowhere and your report seemed to imply > a more reproducible issue. It's difficult to reproduce, because it involves a rather deep level of importing and self importing. This happens every onc

Re: Calling syncdb twice

2008-04-01 Thread James Matthews
Thank you! On Tue, Apr 1, 2008 at 2:56 AM, blis102 <[EMAIL PROTECTED]> wrote: > > James, > > Django Evolution is a project that is working to take care of that > problem (http://code.google.com/p/django-evolution/). I have not used > it but, if what they say on their site is correct, it does what

Re: Strange login error in newforms-admin site: ViewDoesNotExist at /accounts/login/

2008-04-01 Thread AndyB
Thanks. Yours was one of the posts I discovered when I googled this but my problem seemed to come out of nowhere and your report seemed to imply a more reproducible issue. Is this problem intermittent or dependant on what type of Django configuration you are using? (i.e. mod_python vs Django dev

Re: inclusion tags and RequestContext

2008-04-01 Thread Panos Laganakos
OK, I (think!) understand that. But what if the inclusion tag requires an argument, that's not always in the same context? On Apr 1, 3:12 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Tue, 2008-04-01 at 04:58 -0700, Panos Laganakos wrote: > > Is there some way to have inclusion tags pi

Re: inclusion tags and RequestContext

2008-04-01 Thread Malcolm Tredinnick
On Tue, 2008-04-01 at 04:58 -0700, Panos Laganakos wrote: > Is there some way to have inclusion tags pick up on the variables > available from REQUEST_CONTEXT_PROCESSORS? > > I've read about `takes_context` option, but I couldn't figure out if I > could use it to get access to the above. The c

inclusion tags and RequestContext

2008-04-01 Thread Panos Laganakos
Is there some way to have inclusion tags pick up on the variables available from REQUEST_CONTEXT_PROCESSORS? I've read about `takes_context` option, but I couldn't figure out if I could use it to get access to the above. --~--~-~--~~~---~--~~ You received this mess

Re: ensuring uniqueness in newforms

2008-04-01 Thread Jonathan Buchanan
On Tue, Apr 1, 2008 at 4:00 AM, msoulier <[EMAIL PROTECTED]> wrote: > > If I have a field, for example a CharField named 'name', which must be > unique, what's the best way to ensure uniqueness whether creating a > new entry or editing an existing one? > > By default, the form won't know if it

Re: datetime 8 hours off

2008-04-01 Thread Ramiro Morales
On Tue, Apr 1, 2008 at 5:46 AM, Simon Oberhammer <[EMAIL PROTECTED]> wrote: > > hey group, > I have an inconsistant time problem, which goes away when I restart > apache, but then creeps up again after some time. When writing > comments in my custom app the time is 8hours behind (i'm CEST) *fo

Re: fetchall question

2008-04-01 Thread Malcolm Tredinnick
On Tue, 2008-04-01 at 12:06 +0200, Constantin Christmann wrote: > Hello, > > On my localhost with Postgres cursor.fetchall() returns a list of tuples > (one list element per row). > And on the production server with MySQL a tuple of tuples... How can > that be... is there perhaps an inconsiste

manage.py and transactions need help

2008-04-01 Thread sector119
HI All! When I use my own command with manage.py and got any psycopg2 exception on commit, not other exception, I can't create any object in model after rollback even if I do transaction.enter_transaction_management() and transaction.managed(True) How can I save and commit data after psycopg2.Op

fetchall question

2008-04-01 Thread Constantin Christmann
Hello, On my localhost with Postgres cursor.fetchall() returns a list of tuples (one list element per row). And on the production server with MySQL a tuple of tuples... How can that be... is there perhaps an inconsistency in the db interface? Thanks, Constantin --~--~-~--~~--

Re: to_template filter

2008-04-01 Thread glopglop
On 31 mar, 18:44, peschler <[EMAIL PROTECTED]> wrote: > Your "to_template" tag does what inclusion tags are for (not the {% > include %} tag!). > Fine, I forgot about those. Just one thing, though : this tag only has to be defined once. After that it's only html templating, no python. This inclu

Adding an "invalid" choice to a ChoiceField?

2008-04-01 Thread Michael
When specifying the choices parameter is there a way to mark say, for example, the first choice as invalid? e.g. TOPIC_CHOICES = ( ('erroneous', '-- pick one --'), # <-- I would not want this choice to count as being valid ('general', 'General enquiry'), ('bug', 'Bug report'), ('

datetime 8 hours off

2008-04-01 Thread Simon Oberhammer
hey group, I have an inconsistant time problem, which goes away when I restart apache, but then creeps up again after some time. When writing comments in my custom app the time is 8hours behind (i'm CEST) *for some users*. When I login with others, its okay. in settings.py I have TIME_ZONE = 'Eur

manually rendered templates not recognized for translation?

2008-04-01 Thread omat
Hi, I am sending notification e-mails to members on some actions. The message body comes from a template: {% load i18n %} {% blocktrans %} Your application is created successfully. Thanks. {% endblocktrans %} I load and render the template to form the body of the message. It works alright but w

Newbie: Setting up Lighttdp on Kubuntu 7:10

2008-04-01 Thread Douglas E
My stack postgreSQL 8.3 lighttdp standard install Python standard install 2.6? Django SVN Firestarter firewall all on Kubuntu 7:10 on an amd x2 64 bit First what works. My static web pages work. http://journeytothestars.webhop.net/ This is in var/www/index.html http://127.0.0.1 this gives me th

Re: "clever" fields

2008-04-01 Thread Grupo Django
Yes, of course I know, but it's not suitable for my projects as I need per row level permissions. On 1 abr, 07:59, martyn <[EMAIL PROTECTED]> wrote: > Hi, > > Do you know the class Admin, a subclass of your model > ?http://www.djangobook.com/en/1.0/appendixB/#cn311 > > Maybe it could help you.