Re: un-escaping params

2008-05-19 Thread [EMAIL PROTECTED]
Perfect, thanks! On May 19, 10:40 pm, Brian <[EMAIL PROTECTED]> wrote: > On Tue, May 20, 2008 at 12:44 AM, [EMAIL PROTECTED] < > > [EMAIL PROTECTED]> wrote: > > > Hi, > > > I'm parsing a URI manually, and trying to extract the GET params. > > > What does django use to un-escape the params? Yah

Re: Trouble installing PIL

2008-05-19 Thread Austin Govella
It was a PYTHONPATH problem. I fixed it using this tutorial: * http://emmby.blogspot.com/2008/05/installing-python-pil-on-mac-os-x-1052.html (I'm using python 2.4, so I adjusted the path accordingly.) Everything validates. Server runs with no ImageField errors, but now we get a new ImportError:

Re: un-escaping params

2008-05-19 Thread Brian
On Tue, May 20, 2008 at 12:44 AM, [EMAIL PROTECTED] < [EMAIL PROTECTED]> wrote: > > Hi, > > I'm parsing a URI manually, and trying to extract the GET params. > > What does django use to un-escape the params? Yah know to go from %20 > to " " in unicode? > > Thanks, > Ivan > tipjoy.com > > > I'm

Re: Adding database table to Selection Widget on newforms

2008-05-19 Thread Rishabh Manocha
Since the list of countries is coming from a model, why not use ModelChoiceField [1]. So, your field will look something like: Country = forms.ModelChoiceField(required=True,widget=forms.Select(attrs = attrs_dict), queryset = Country.objects.all()) Best, R On Mon, May 19, 2008 at 10:02 AM,

un-escaping params

2008-05-19 Thread [EMAIL PROTECTED]
Hi, I'm parsing a URI manually, and trying to extract the GET params. What does django use to un-escape the params? Yah know to go from %20 to " " in unicode? Thanks, Ivan tipjoy.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to

Re: Getting FK-Value without knowing the name of the field

2008-05-19 Thread Diego Ucha
If you just need to know the value of a FK field, and you know how to get this object (which filter to use), then i recommend that you read the section "Selecting Objects" from Chapter 5 of Django Book, the answer is there. Chapter 5 - http://www.djangobook.com/en/1.0/chapter05/ []s Diego Ucha

Re: business logic and good practices

2008-05-19 Thread ristretto
Hello, I'm going down the same adoption path. Coming over from Java skipping and happy. I'm fighting (and loosing) the urge to create a manager.py that will basically hold business logic and interface with the models. Additionally, I have read the unit testing documentation, and I want to make

Re: "request"object within models.py

2008-05-19 Thread Richard Dahl
James, Thanks, this is great. I never made this connection before. I have been using threadlocals for a while (to implement a custom manager with role-based access). Since the start I have been passing a users role as a kw argument in to the Manager via the shell for testing, and until

Re: newforms-admin and intermediary tables for m2m relationships

2008-05-19 Thread Russell Keith-Magee
On Tue, May 20, 2008 at 6:55 AM, David Robinson <[EMAIL PROTECTED]> wrote: > > We are using our own intermediary table for a many-to-many relationship > so that we can store additional information about the relationship ... > Is there anything about the newforms-admin branch that might make it >

Re: Link to different URLs by Class

2008-05-19 Thread Alex Baker
Okay, so I've got get_absolute_url() to work, but I'm still running into some trouble. The problem is that TVEpisode and Movie are both subclasses of Source, and I can't seem to override the get_absolute_url() function that's included in the Source class. How can I override this method in the

newforms-admin and intermediary tables for m2m relationships

2008-05-19 Thread David Robinson
We are using our own intermediary table for a many-to-many relationship so that we can store additional information about the relationship itself, and we are just embarking on a thorough overhaul of this app's code. In the existing project, we heavily modified change-list and change-form

branches/0.96-bugfixes or tags/releases/0.96.2 ?

2008-05-19 Thread Ewout ter Haar
I would like to update my djangos on several servers. I installed 0.96 through svn and could do an svn switch. What is the recomended svn switch target: branches/0.96-bugfixes or tags/releases/0.96.2 ? I notice 0.96.2 is not yet tagged in svn, should I just switch to branches/0.96-bugfixes and

Re: OperationalError (1267, "Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '='") Why

2008-05-19 Thread [EMAIL PROTECTED]
Make sure the columns themselves are set to UTF-8. On May 18, 4:13 am, coco <[EMAIL PROTECTED]> wrote: > Hi List, > > Django show this message to me: > > OperationalError at /champselysees/services/ > (1267, "Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and >

Project with two settings.py problem

2008-05-19 Thread konatufe
Hello Guys: I'm using one project with two applications that are different, but they use the same users. One of these apps is the base and the other could or not be installed. They use different 404 and 505 error pages. To set that I configured two differents settings.py, the fist app read the

Re: Link to different URLs by Class

2008-05-19 Thread Alex Baker
Okay, so I finally found get_absolute_url(), and I wrote the function, but I think I might have to back off from generic views because I need the actual source object whereas I now only have a copy of the quote object in the view. I'll have to look into this some more. I was worried at first

Re: Trouble installing PIL

2008-05-19 Thread Austin Govella
Still trying to get MacPorts to work... "port installed" says everything (plus more!) is installed: expat @2.0.1_0 (active) freetype @2.3.5_1 (active) gettext @0.17_3 (active) jpeg @6b_2 (active) libiconv @1.12_0+darwin_8 (active) ncurses @5.6_0 (active) ncursesw @5.6_1 (active)

Re: load external xml and css with varibles?

2008-05-19 Thread sebey
can anyone help me? On May 19, 10:50 am, sebey <[EMAIL PROTECTED]> wrote: > ok so my site is a podcasting network and I need to import feeds form > different places and i am thinking for my model I should the URLField > and validate it with the XMLField? my shows all have a color binded > with

Re: questions about templates within templates and ajax pop-up window

2008-05-19 Thread sebey
I just read a bit of it and that sound like what I am looking for thank you very much you have been a great help On May 19, 9:43 pm, "Richard Dahl" <[EMAIL PROTECTED]> wrote: > Are you looking for template > inheritance?http://www.djangoproject.com/documentation/templates/ > > On 5/19/08, sebey

Re: questions about templates within templates and ajax pop-up window

2008-05-19 Thread sebey
oh ok that wonderful thank you On May 19, 9:41 pm, "Richard Dahl" <[EMAIL PROTECTED]> wrote: > It is going through django. Maybe I do not understand your question. A user > requests the 'first' page of your site, django processes the requests > creates whatever message you want dynamically,

Django Book translation (es) finished

2008-05-19 Thread Manuel Kaufmann
Hi list! I'm proud to announce that we have finished the Spanish translation of the "Django Book". We still need a final proofread to polish some details for the final version. We need your help on this task, to correct all the mistakes that can be found. We are working on the details to make

Link to different URLs by Class

2008-05-19 Thread Alex
I'd like to make a link to an item based on which class it is in. I'm creating a quotes database that has quotes from movies, tv shows, etc. Movie, TVShow, etc. are all separate classes, and they have separate URLs for viewing them. I'm trying to create a link to the source based on which

Re: "request"object within models.py

2008-05-19 Thread James Bennett
On Mon, May 19, 2008 at 4:10 PM, Tim Chase <[EMAIL PROTECTED]> wrote: > It's the last bit that can throw folks...many folks seem to use > very nice/helpful bits of the framework that abstract the save() > call so it's never thought-about. Wouldn't adding a parameter to > save() stymie the admin

Re: "request"object within models.py

2008-05-19 Thread Tim Chase
>> how do you pass the request object to models? > > Same way you pass any argument to any function or method in > Python: write your function/method to accept the argument, and > pass it from the code that calls the function/method. It's the last bit that can throw folks...many folks seem to

Re: "request"object within models.py

2008-05-19 Thread enri57ar
On May 19, 5:35 pm, "Richard Dahl" <[EMAIL PROTECTED]> wrote: > http://code.djangoproject.com/wiki/CookBookThreadlocalsAndUser > -richard > Thanks!, it works --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django

Re: "request"object within models.py

2008-05-19 Thread James Bennett
On Mon, May 19, 2008 at 3:45 PM, Richard Dahl <[EMAIL PROTECTED]> wrote: > how do you pass the request object to models? Same way you pass any argument to any function or method in Python: write your function/method to accept the argument, and pass it from the code that calls the

Re: redirect based on selected choice from simple form

2008-05-19 Thread zehi
I've changed to: p = Question.objects.all() r = p[p.count()-1] a = r.color ... and it works. However, I'm sure, there is more elegant solution, isn't it? On May 19, 2:51 pm, zehi <[EMAIL PROTECTED]> wrote: > Ok, here is

Re: "request"object within models.py

2008-05-19 Thread Richard Dahl
how do you pass the request object to models? -richard On 5/19/08, James Bennett <[EMAIL PROTECTED]> wrote: > > > On Mon, May 19, 2008 at 3:24 PM, enri57ar <[EMAIL PROTECTED]> wrote: > > How access to request object within models ? > > Pass it as an argument the same as any other value. Magical

Re: questions about templates within templates and ajax pop-up window

2008-05-19 Thread Richard Dahl
Are you looking for template inheritance? http://www.djangoproject.com/documentation/templates/ On 5/19/08, sebey <[EMAIL PROTECTED]> wrote: > > > and again just to say that the template is actually seperate from the > ajax pop-up window question sorry I should have made that more clear > so

Re: questions about templates within templates and ajax pop-up window

2008-05-19 Thread Richard Dahl
It is going through django. Maybe I do not understand your question. A user requests the 'first' page of your site, django processes the requests creates whatever message you want dynamically, (via a database call, computation based on time/day/month/phase of the moon/tide/solar cycle/browser

Re: questions about templates within templates and ajax pop-up window

2008-05-19 Thread sebey
and again just to say that the template is actually seperate from the ajax pop-up window question sorry I should have made that more clear so please keep'em coming On May 19, 9:33 pm, sebey <[EMAIL PROTECTED]> wrote: > ok but I may want enable it and disable it and change the message form > time

Re: "request"object within models.py

2008-05-19 Thread James Bennett
On Mon, May 19, 2008 at 3:24 PM, enri57ar <[EMAIL PROTECTED]> wrote: > How access to request object within models ? Pass it as an argument the same as any other value. Magical hacks to try to make it available otherwise are likely to land you in trouble later on. -- "Bureaucrat Conrad, you

Re: "request"object within models.py

2008-05-19 Thread Richard Dahl
http://code.djangoproject.com/wiki/CookBookThreadlocalsAndUser -richard On 5/19/08, enri57ar <[EMAIL PROTECTED]> wrote: > > > How access to request object within models ? > > > from django.contrib.auth.models import User > > Class Message(models.Model): >message = ... >user_id =

Re: questions about templates within templates and ajax pop-up window

2008-05-19 Thread sebey
ok but I may want enable it and disable it and change the message form time to time which is why I would like it go though django On May 19, 5:27 pm, "Richard Dahl" <[EMAIL PROTECTED]> wrote: > There are a number of ways to do this, you do not need a separate template > within your template.

Re: questions about templates within templates and ajax pop-up window

2008-05-19 Thread sebey
cool that sounds good and jquery as well ( the libery I am useing)read my mind On May 19, 5:27 pm, "Richard Dahl" <[EMAIL PROTECTED]> wrote: > There are a number of ways to do this, you do not need a separate template > within your template. You do not even need to use AJAX, as you seem to be >

"request"object within models.py

2008-05-19 Thread enri57ar
How access to request object within models ? from django.contrib.auth.models import User Class Message(models.Model): message = ... user_id = models.ForeignKey(User) def save(self): user_id = request.user.id # doesn't work super(Mensaje, self).save()

Re: Try Except Statement not working properly.

2008-05-19 Thread Greg
Bruno, That is originally how I had my code. /// import csv from myproject.site.models import OrderEmail reader = csv.reader(open("myfile.csv", "rb")) for row in reader: try: b = OrderEmail(name=row[0], email=row[1], been_sent="0") b.save() except: pass

Anyone familiar with ''ModelBase' object is not iterable' error?

2008-05-19 Thread Kenneth McDonald
I'm trying to get a form working so that a user can enter data without using the admin interface. I've gotten this far, but this error has me stumped, as I'm not sure where in my chain of things (form from model, template, etc.) it's likely cause is. Hoping someone else has had something

Re: Try Except Statement not working properly.

2008-05-19 Thread Brant Fitzsimmons
Hey Greg, It may help to know what the exception is. By using except without specifying what exception is being targeted you may be experiencing something other than what you were expecting. The loop may be breaking for a reason (or reasons) you never considered. Try the loop without the try:

Re: Try Except Statement not working properly.

2008-05-19 Thread bruno desthuilliers
On 19 mai, 20:48, Greg <[EMAIL PROTECTED]> wrote: > Hello, > I have the following code: > > /// > > import csv > from myproject.site.models import OrderEmail > > reader = csv.reader(open("myfile.csv", "rb")) > for row in reader: > try: > b = OrderEmail(name=row[0], email=row[1],

Re: Add column to generated ManyToMany table and access from admin

2008-05-19 Thread Peter Bailey
Thanks Russ. On May 17, 4:26 am, "Russell Keith-Magee" <[EMAIL PROTECTED]> wrote: > On Sat, May 17, 2008 at 2:19 AM, Peter Bailey <[EMAIL PROTECTED]> wrote: > > > However, I would really like to add a column to the join table, > > "order", so I can use the admin of my Page class to add Items and

Re: Try Except Statement not working properly.

2008-05-19 Thread Greg
Brant, No I don't On May 19, 2:27 pm, "Brant Fitzsimmons" <[EMAIL PROTECTED]> wrote: > Do you know what the exception is? > > > > On Mon, May 19, 2008 at 3:23 PM, Greg <[EMAIL PROTECTED]> wrote: > > > Brant, > > Nope...did the same thing. > > > On May 19, 2:00 pm, "Brant Fitzsimmons" <[EMAIL

Re: Try Except Statement not working properly.

2008-05-19 Thread Brant Fitzsimmons
Do you know what the exception is? On Mon, May 19, 2008 at 3:23 PM, Greg <[EMAIL PROTECTED]> wrote: > > Brant, > Nope...did the same thing. > > On May 19, 2:00 pm, "Brant Fitzsimmons" <[EMAIL PROTECTED]> > wrote: > > You may want to try 'continue' instead of 'pass'. > > > > > > > > On Mon, May

Re: Try Except Statement not working properly.

2008-05-19 Thread Greg
Brant, Nope...did the same thing. On May 19, 2:00 pm, "Brant Fitzsimmons" <[EMAIL PROTECTED]> wrote: > You may want to try 'continue' instead of 'pass'. > > > > On Mon, May 19, 2008 at 2:48 PM, Greg <[EMAIL PROTECTED]> wrote: > > > Hello, > > I have the following code: > > > /// > > > import csv

Re: Try Except Statement not working properly.

2008-05-19 Thread Brant Fitzsimmons
You may want to try 'continue' instead of 'pass'. On Mon, May 19, 2008 at 2:48 PM, Greg <[EMAIL PROTECTED]> wrote: > > Hello, > I have the following code: > > /// > > import csv > from myproject.site.models import OrderEmail > > reader = csv.reader(open("myfile.csv", "rb")) > for row in reader:

redirect based on selected choice from simple form

2008-05-19 Thread zehi
Ok, here is my 'Modelform' problem: I want to redirect based on selected choice from simple form: QUESTION OPTIONS: 1, 2, 3 Obviously, by me chosen approach with 'get.objects.latest' is not the one, that works... Somebody have an idea? Thanks views.py from django.shortcuts import

Try Except Statement not working properly.

2008-05-19 Thread Greg
Hello, I have the following code: /// import csv from myproject.site.models import OrderEmail reader = csv.reader(open("myfile.csv", "rb")) for row in reader: try: b = OrderEmail(name=row[0], email=row[1], been_sent="0") b.save() except: pass assert False, "End"

Re: moving from MySQL to PostgreSQL on a "live" site ..

2008-05-19 Thread AndrewK
AFAIK, you will probably need to do conversion between boolean types (in MySQL BooleanField uses 0 and 1, and in PostgreSQL it uses True and False). I was doing it with JSON. And then you will need to empty all tables like django_content_type and auth_permission in the target db or exclude them

Re: One-to-One vs direct assignation

2008-05-19 Thread bcurtu
Thanks, really well explained. On 19 mayo, 19:43, Rajesh Dhawan <[EMAIL PROTECTED]> wrote: > On May 19, 1:29 pm, bcurtu <[EMAIL PROTECTED]> wrote: > > > Thanks Rajesh, > > > The actual question is what the difference is between those 2 > > definitions, between a OntToOne and an instance

Re: One-to-One vs direct assignation

2008-05-19 Thread Rajesh Dhawan
On May 19, 1:29 pm, bcurtu <[EMAIL PROTECTED]> wrote: > Thanks Rajesh, > > The actual question is what the difference is between those 2 > definitions, between a OntToOne and an instance relationship? A OneToOneField in a model class implies that Django will create a database-level Foreign Key

Problem about Url

2008-05-19 Thread free won
i found this Problem when i decide to use Paginator. the str*(?P\w+/)$* can express* ?query=xxx* so if i wanna express *?query=xxx=1*, how can I write the str for urls.py? THanks. :D -- Start Dream http://www.freeis.cn/ --~--~-~--~~~---~--~~ You

Re: One-to-One vs direct assignation

2008-05-19 Thread bcurtu
Thanks Rajesh, The actual question is what the difference is between those 2 definitions, between a OntToOne and an instance relationship? Cheers! On 19 mayo, 16:22, Rajesh Dhawan <[EMAIL PROTECTED]> wrote: > Hi, > > On May 18, 12:49 pm, bcurtu <[EMAIL PROTECTED]> wrote: > > > Hi, > > > What's

Re: Is it OK to use the cool Javascript calendar and stuff on non-admin pages?

2008-05-19 Thread [EMAIL PROTECTED]
While it technically can be done, it is not worth the effort, and not reccomended, as you said, jQuery(and many other JS libs) have good options for this. On May 19, 12:24 pm, mw <[EMAIL PROTECTED]> wrote: > Hello, > > Is there a reason why a person would not want to use the cool date and > time

Is it OK to use the cool Javascript calendar and stuff on non-admin pages?

2008-05-19 Thread mw
Hello, Is there a reason why a person would not want to use the cool date and time picker that you have for DateTime fields in the admin pages on externalish pages? (Forms that users submit data on?) The code as far as I can see is in DateTimeShortcuts.js and maybe another file. If not, I

Re: Django experts wanted

2008-05-19 Thread Gonzalo Delgado
El Mon, 19 May 2008 11:46:38 -0500 "James Bennett" <[EMAIL PROTECTED]> escribió: > > On Mon, May 19, 2008 at 10:56 AM, Jim R. Wilson <[EMAIL PROTECTED]> wrote: > > I am compiling a contact list of Django experts who may be interested > > in opportunities under the right circumstances. I am not

Re: code runs in django shell but not apache

2008-05-19 Thread Ian Lawrence
Hi, > You did not say what the view code does do. Does it raise an exception > whose trace you can share? Thx for answering No, this was the most confusing thing and what made me think it was an apache permission problem. I fired up the dev server and the code ran so i then hunted around the web

Re: Django experts wanted

2008-05-19 Thread James Bennett
On Mon, May 19, 2008 at 10:56 AM, Jim R. Wilson <[EMAIL PROTECTED]> wrote: > I am compiling a contact list of Django experts who may be interested > in opportunities under the right circumstances. I am not a recruiter > - I'm a regular developer who sometimes gets asked for referrals when > I'm

Re: questions about templates within templates and ajax pop-up window

2008-05-19 Thread Richard Dahl
There are a number of ways to do this, you do not need a separate template within your template. You do not even need to use AJAX, as you seem to be wanting to return both the main content and the 'message' in one response.) You could simply wrap your message html in a div that is hidden and use

questions about templates within templates and ajax pop-up window

2008-05-19 Thread sebey
can you load a template in a template and I what at time to have when you go to my site and the first thing that should come up will be an ajax window with a message I wondering should I create a app fo r this or is there other way as it may seem a bit of a waste of an app thanks

Django experts wanted

2008-05-19 Thread Jim R. Wilson
Hi all, Django is a great project and a growing niche. As it becomes even more popular, there will be increasing demand for experts in the field. I am compiling a contact list of Django experts who may be interested in opportunities under the right circumstances. I am not a recruiter - I'm a

Django bloggers: want to host a series for me?

2008-05-19 Thread Ken
Hey people who write stuff that goes on the Community Aggregator, I'm thinking about doing a short series on some Django techniques, including minimalism and some new REST and AJAX related techniques that I came up with recently. But I don't have syntax highlighting or other niceties on my

Re: microsoft sql server 2005

2008-05-19 Thread Tim Chase
> is it possible to setup python/django and run it on a sql server? yes, for small values of "run"...you might call it "walking" or "crawling" (or maybe "limping") rather than "running". There has been various bits of code that allow for connecting, but SQL-Server is a bit broken in a number

Re: use the two column select like in admin/auth/user/ edit form

2008-05-19 Thread Emmanuel Vaïsse
Exploring the framework, I just found the solution : books = models.ManyToManyField(Book, verbose_name="books form the author", null=True, filter_interface=models.HORIZONTAL ) the final options allow you to looking trough many items. On May 19, 4:34 pm, Emmanuel Vaïsse <[EMAIL PROTECTED]>

Re: Adding database table to Selection Widget on newforms

2008-05-19 Thread Jorge Romo
Thanks for you answer, V! Unfortunately, it didn't work for me... I get this Error: ValueError at /accounts/register/ need more than 1 value to unpack If I just use Country.objects.all() I get: TypeError at /accounts/register/ 'Country' object is not iterable On May 19, 3:06 am, V <[EMAIL

Re: Bind MultiValueField?

2008-05-19 Thread brightnesslevels
Nevermind, what I needed to do is to override value_from_datadict. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To

Re: microsoft sql server 2005

2008-05-19 Thread Adam V.
It's possible to use Django (trunk, best against 7540 or better to get the most recent security fixes) against SS2005 with the caveat that there is no core support for doing this. I'm maintaining an external database backend here: http://code.google.com/p/django-mssql/ That backend works well

[django-admin] use the two column select like in admin/auth/user/ edit form

2008-05-19 Thread Emmanuel Vaïsse
Can I use the two column select field like in "admin/auth/user/x" in an other form of my app ? Where should I look in admin files ? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to

Re: One-to-One vs direct assignation

2008-05-19 Thread Rajesh Dhawan
Hi, On May 18, 12:49 pm, bcurtu <[EMAIL PROTECTED]> wrote: > Hi, > > What's the difference between: > > class Other(models.Model): > ins=Instrument() > > class Other2(models.Model): > ins=models.OneToOneField(Instrument) > > How do I define Instrument in order the fist class to be valid?

microsoft sql server 2005

2008-05-19 Thread mccomas . chris
i just took a job with a group that just bought a microsoft sql server 2005, they want to drop ASP.net that they're currently using, i was interested in using django on the site going forward. is it possible to setup python/django and run it on a sql server?

Re: FileField not working, however ImageField is.

2008-05-19 Thread Rodrigo Culagovski
I commented out the validator_list = [is_archivo] , and it's working now, albeit sans validation, of course. This seems odd, as the other 2 validator lists (is_texto & is_link) work fine. > Have you tried uploading files with more than one browser? Is the html > code in the forms set up

Re: Problem displaying value(s) from ManyToMany relationship

2008-05-19 Thread phillc
variable name collision. caused by locals() On May 18, 8:05 pm, Brandon Taylor <[EMAIL PROTECTED]> wrote: > Very odd. On a whim, I changed: > > > {% for instructor in instructors %} > {{ instructor.first_name }} #there is no value output > here > {% endif %} > > > to > > > {% for i in

Re: Bind MultiValueField?

2008-05-19 Thread brightnesslevels
Seriously, could someone please point me to an example of a form containing a MultiValueField bound to model? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: TypeError: Cannot resolve keyword 'slug' into field

2008-05-19 Thread Karen Tracey
On Mon, May 19, 2008 at 9:48 AM, Brian <[EMAIL PROTECTED]> wrote: > > On May 19, 8:19 am, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > > Ah, sorry, I missed the fact that it was admin causing the error. The > error > > looks to be in the old manipulator/validator code for the slugfield. > With >

Re: code runs in django shell but not apache

2008-05-19 Thread Rajesh Dhawan
Hi Ian, > Hi, > I have been bashing my head trying to work this out. This code creates > the new theme fine: > > [EMAIL PROTECTED]:~/Web/django_projects/webtheme$ export > DJANGO_SETTINGS_MODULE DJANGO_SETTINGS_MODULE=webtheme.settings > [EMAIL PROTECTED]:~/Web/django_projects/webtheme$

Re: TypeError: Cannot resolve keyword 'slug' into field

2008-05-19 Thread Brian
On May 19, 8:19 am, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > Ah, sorry, I missed the fact that it was admin causing the error.  The error > looks to be in the old manipulator/validator code for the slugfield.  With > newforms-admin this code is on its way out, so unlikely to get much >

Re: Secure file access with contrib.auth

2008-05-19 Thread Julien
Thanks, this is all clear now. Is there a method/function/attribute in Django that tells you what server you're currently running on, that is, the dev server or others like Apache? On May 19, 11:25 pm, John Hensley <[EMAIL PROTECTED]> wrote: > On May 19, 2008, at 4:18 AM, Julien wrote: > > > I

Re: Secure file access with contrib.auth

2008-05-19 Thread John Hensley
On May 19, 2008, at 4:18 AM, Julien wrote: > I installed mod_xsendfile and I tried your code, but the file that's > downloaded from the view is empty. > This might be because I've tested it using the development server on > port 8080. So I guess Apache is out of the loop :/ Yes, this approach

Re: TypeError: Cannot resolve keyword 'slug' into field

2008-05-19 Thread Karen Tracey
On Mon, May 19, 2008 at 12:11 AM, Brian <[EMAIL PROTECTED]> wrote: > > On May 18, 6:01 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > > > > Based on the choices the error message lists, it appears you have added > code > > that tries to access the slug field in an Mp3_Set model instance. >

Re: Error in new project creation

2008-05-19 Thread Tim Chase
> i have set both $PATH variable and $PYTHONPATH variable to > C:\Django-0.96.2.tar\\Django-0.96.2\django My first concern is that Windows isn't terribly smart about handling .tar files. So if C:\Django-0.96.2.tar is actually a tar-file, you may not be able to get anywhere with this unless

Re: Django and Linux distros

2008-05-19 Thread Kevin Monceaux
On Mon, 19 May 2008, Gene Campbell wrote: > I totally agree. I took this path over the last 5 years: redhat (1 > yr) -> gentoo (3 yrs)-> archlinux (6 mos) -> pclinuxos (1 day) -> > ubuntu (6 mos) I took a similar path. I started with Slackware back in the 1.xx kernel days. Recently I did

Re: How to deal with "IndentationError"

2008-05-19 Thread Eric Abrahamsen
Also, this can often mean that you've inadvertently mixed tabs and spaces. If there's no obvious indentation error, check to see if your text editor or whatever has a 'cleanup' command, or a tabs-to-spaces/ spaces-to-tabs command. Running that often clears up these glitches. That's a heck

Re: Django and Linux distros

2008-05-19 Thread lhonda
Hi John, I have Ubuntu in my Macbook. I think you can try to use Eric, because it provides debugging, project support, syntax highlighting, code completion. Ubuntu works fine and it provides tons of Free/Open Source software. Regards, Luiz Honda On May 16, 7:24 am, JonSidnell <[EMAIL

Re: How to deal with "IndentationError"

2008-05-19 Thread Petar
Indentation means your Python code isn't formatted properly. I recommend you to read this: http://docs.python.org/ref/indentation.html On 19 mei, 14:29, coco <[EMAIL PROTECTED]> wrote: > Hi list, > > IndentationError > unindent does not match any outer indentation level (views.py, line > 681)

How to deal with "IndentationError"

2008-05-19 Thread coco
Hi list, IndentationError unindent does not match any outer indentation level (views.py, line 681) Request Method: GET Request URL: http://www.magicparis.com/webs/ Exception Type: IndentationError Exception Value: unindent does not match any outer indentation level (views.py, line 681) Exception

code runs in django shell but not apache

2008-05-19 Thread Ian Lawrence
Hi, I have been bashing my head trying to work this out. This code creates the new theme fine: [EMAIL PROTECTED]:~/Web/django_projects/webtheme$ export DJANGO_SETTINGS_MODULE DJANGO_SETTINGS_MODULE=webtheme.settings [EMAIL PROTECTED]:~/Web/django_projects/webtheme$ django-admin.py shell Python

Re: Error in new project creation

2008-05-19 Thread swapna
Hi, Thanks for the quick reply... i have set both $PATH variable and $PYTHONPATH variable to C:\Django-0.96.2.tar\\Django-0.96.2\django ( i have a small query. $path variable should have value of what?? i.e when i am giving command "django-admin.py startproject mysite" i gave the

Re: Error in new project creation

2008-05-19 Thread Scott Moonen
Swapna, did you install Django from SVN? If you extract Django from SVN, it creates the following directory tree: django-trunk/ (it looks like you may have renamed this to django/) django/ docs/ examples/ . . . Notice that there's a "django" *sub*-directory there. I'm not sure if you're

Re: Error in new project creation

2008-05-19 Thread Tim Chase
> i am new to Django.After installing Django, i tried to create a new > project called 'startproject' by giving the command- > 'django-admin.py startproject mysite' > > the above command gave this error > > Traceback (most recent call last): > File

Error in new project creation

2008-05-19 Thread swapna
Hi, i am new to Django.After installing Django, i tried to create a new project called 'startproject' by giving the command- 'django-admin.py startproject mysite' the above command gave this error Traceback (most recent call last): File

Canberra developers

2008-05-19 Thread Ryan
I live in Canberra, Australia and I'm putting together a web start-up, hopefully using the Django framework. Does anyone know of any competent Django developers, or at least Python coders, in my neck of the woods? --~--~-~--~~~---~--~~ You received this message

HOT sexxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

2008-05-19 Thread . .
-- http://groups.google.com/group/goroh/subscribe http://groups.google.com/group/goroh/subscribe http://groups.google.com/group/goroh/subscribe http://groups.google.com/group/goroh/subscribe http://groups.google.com/group/goroh/subscribe http://groups.google.com/group/goroh/subscribe

load external xml and css with varibles?

2008-05-19 Thread sebey
ok so my site is a podcasting network and I need to import feeds form different places and i am thinking for my model I should the URLField and validate it with the XMLField? my shows all have a color binded with them so how would I guess make a colorField(or hexfield i guess)? I am thinking

Fwd: Django and Linux distros

2008-05-19 Thread Gene Campbell
Oh right, I read that somewhere else - use the svn version. Sorry, I'm very new to django, and really just wanted to say 1. What LInux OS I use 2. How much I am so totally impressed with Django and Python (after years of suffering with Java.) I most certainly didn't want to imply I knew

moving from MySQL to PostgreSQL on a "live" site ..

2008-05-19 Thread oliver
Hi, I am planning to move from Mysql to PostgreSQL (mainly for transaction support). I just wanted to know if I can take my active django projects (all with lots of data in mysql, with more or less every model field type possible) and do a XML data dump and than just load this into the Postgresql

Re: Django and Linux distros

2008-05-19 Thread Matthias Kestenholz
On Mon, 2008-05-19 at 10:30 +0200, Matthias Kestenholz wrote: > On Mon, 2008-05-19 at 19:10 +1200, Gene Campbell wrote: > > I totally agree. I took this path over the last 5 years: redhat (1 > > yr) -> gentoo (3 yrs)-> archlinux (6 mos) -> pclinuxos (1 day) -> > > ubuntu (6 mos) > > > > I

Re: Django and Linux distros

2008-05-19 Thread Matthias Kestenholz
On Mon, 2008-05-19 at 19:10 +1200, Gene Campbell wrote: > I totally agree. I took this path over the last 5 years: redhat (1 > yr) -> gentoo (3 yrs)-> archlinux (6 mos) -> pclinuxos (1 day) -> > ubuntu (6 mos) > > I loved Gentoo, taught me quite a bit. Now I love Ubuntu for the > opposite

Re: Secure file access with contrib.auth

2008-05-19 Thread Julien
Hi, Thanks a lot for that info. This is really useful. I installed mod_xsendfile and I tried your code, but the file that's downloaded from the view is empty. This might be because I've tested it using the development server on port 8080. So I guess Apache is out of the loop :/ I also have

Re: Adding database table to Selection Widget on newforms

2008-05-19 Thread V
I think what you would like is a choice field [1] populated with the elements coming from the django-countries model. Something like country = forms.ChoiceField(choices=models.Countries.objects.all().values('printable_name')) I hope this is correct and will help you. V [1]:

################################################################################

2008-05-19 Thread . .
http://ebookhelper.blogspot.com/search/label/Social Language ebooks Computer IT ebooks Java ebooks Computer Hacking -- http://groups.google.com/group/goroh/subscribe http://groups.google.com/group/goroh/subscribe http://groups.google.com/group/goroh/subscribe

Re: How to achieve a function in template to show "Some hours ago"?

2008-05-19 Thread XeboyZou
Thank. What a idiot! I don't see it. On Mon, May 19, 2008 at 3:34 PM, Eric Abrahamsen <[EMAIL PROTECTED]> wrote: > > This: > http://www.djangoproject.com/documentation/templates/#timesince > > and the one right under it. > > E > > > On May 19, 2008, at 3:24 PM, ERic ZoU wrote: > > > > > Hi all,

Re: How to achieve a function in template to show "Some hours ago"?

2008-05-19 Thread Eric Abrahamsen
This: http://www.djangoproject.com/documentation/templates/#timesince and the one right under it. E On May 19, 2008, at 3:24 PM, ERic ZoU wrote: > > Hi all, > > I have blog system that require a function that to show the hours/mins > before/ago for the last post. Any way to solve it? > >

  1   2   >