Re: unknown encoding: cp0 --> django\forms\forms.py in full_clean (241)

2009-03-18 Thread Malcolm Tredinnick
On Wed, 2009-03-18 at 20:23 -0700, Keyton Weissinger wrote: > I'm running django on an Apache 2.2 server on a Windows XP box. I'm > running django 1.0.2. I had a simple form/view that worked like a > champ in my ubuntu box but now suddenly bombs in the django forms > code. > > Here's the trace:

Re: Value proposition of Rails

2009-03-18 Thread shabda raaj
>Nobody ever releases accurate information on site information, so >anything you get here will be a guess. "Five biggest" is kind of a bad >number anyway, since your customer won't be any of them and it's >unlikely you're targeting them as your customers (if you're only looking >at the five

Re: Testing

2009-03-18 Thread Preston Timmons
Hi Filip, The Django test runner looks for tests in two places in an application--the models.py file and an optional tests.py file. If you want to run tests for your views you can move your tests into a file called tests.py in your application. An example of testing a view with doctests can be

unknown encoding: cp0 --> django\forms\forms.py in full_clean (241)

2009-03-18 Thread Keyton Weissinger
I'm running django on an Apache 2.2 server on a Windows XP box. I'm running django 1.0.2. I had a simple form/view that worked like a champ in my ubuntu box but now suddenly bombs in the django forms code. Here's the trace: http://dpaste.com/16330/ Looking at other instances of similar

Re: My web page can not be Internationalized

2009-03-18 Thread Malcolm Tredinnick
On Wed, 2009-03-18 at 21:37 -0500, Jacob Kaplan-Moss wrote: > On Wed, Mar 18, 2009 at 9:35 PM, Eric wrote: > > Can anyone help me ? Tks > > Malcolm tried. He wrote: > > > Constructing a very small example, with, say, a form containing only the > > dropdown box, that

Re: My web page can not be Internationalized

2009-03-18 Thread Jacob Kaplan-Moss
On Wed, Mar 18, 2009 at 9:35 PM, Eric wrote: > Can anyone help me ? Tks Malcolm tried. He wrote: > Constructing a very small example, with, say, a form containing only the > dropdown box, that demonstrates the problem you're seeing would be a > reasonable start. We can't

Re: My web page can not be Internationalized

2009-03-18 Thread Eric
Can anyone help me ? Tks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to

Re: question about template system

2009-03-18 Thread Malcolm Tredinnick
On Wed, 2009-03-18 at 17:05 -0400, Alex Gaynor wrote: > > > On Wed, Mar 18, 2009 at 4:49 PM, Jason Wang > wrote: > > Hi all, > > I have a problem where i have a list which stores a bunch of > relevant > key to another

Re: Need two response statements on same def

2009-03-18 Thread Malcolm Tredinnick
On Wed, 2009-03-18 at 11:24 -0700, Jesse wrote: > In the view.py I have (def Bypub) that sends data to a template and > paginates it. I have a second (def TextFile) that uses the same data > to send to a CSV file. I would like to combine the two (def Bypub and > def TextFile) together into def

Re: Value proposition of Rails

2009-03-18 Thread Malcolm Tredinnick
On Wed, 2009-03-18 at 12:23 -0700, shabda wrote: > [Trying not be trollish, but the subject might be so. My apologies in > advance.] > > I run a small Django development firm ( www.uswaretech.com ), and a > lot of clients we go after need to be convinced on why they should > choose Django. What

Re: allowing a user to delete their own account and associated data.

2009-03-18 Thread tristan
Guys, thank you, both of you, I have searched hi and low for examples of this and found none. A question, would the example code you have posted behave in the same way as the delete function does in the Auth admin application, in that it would not just delete the user, but also all the profile

Count the number of times FormPreview displays preview?

2009-03-18 Thread JHeasly
Hello all, Using Django's sessions, I want to keep track of how many times a user displays the FormPreview preview. After a given number of re-displays, I'd like to redirect the user (via an HttpResponseRedirect) to a help page. I'm trying to discern if this is A.) a feasible workflow and B.)

Re: Access logs?

2009-03-18 Thread Theme Park Photo, LLC
Thanks! Armed with that information, I went back and checked my configuration files and, sure enough, I was missing the CustomLog /var/log/apache2/access.log combined statement in the VirtualHost entry for the django application. --~--~-~--~~~---~--~~ You

Re: Access logs?

2009-03-18 Thread Malcolm Tredinnick
On Wed, 2009-03-18 at 17:08 -0700, Theme Park Photo, LLC wrote: > Is there an existing Django application that will log normal requests? > There doesn't seem to be any mention of what seems like a large > omission in the django documentation... > > Django requests don't show up in the usual

Re: Access logs?

2009-03-18 Thread Andrew Ingram
Django doeesn't do any request logging, it should be handled by your web server's own logging (usually apache). There's nothing special about Django that would cause it to be treated any differently. - Andrew Theme Park Photo, LLC wrote: > Is there an existing Django application that will log

Access logs?

2009-03-18 Thread Theme Park Photo, LLC
Is there an existing Django application that will log normal requests? There doesn't seem to be any mention of what seems like a large omission in the django documentation... Django requests don't show up in the usual access log. --~--~-~--~~~---~--~~ You

Testing

2009-03-18 Thread Filip Gruszczyński
I am trying to have my function tested using docstring with examples. When I put it into models.py of an app, it gets tested. If I put it into views.py, it is not tested; this happens also, if I add another module (which I import). How can make testing framework test those? -- Filip

Django + servlet containers

2009-03-18 Thread Eagle Kessler
Hello all, I'm trying to get a Django app deployed on a JEE server (Glassfish, using Jython), following the tutorial. While I can get the admin login page to show up correctly, attempting to log in redirects me back to the login page with "Please log in again, because your session has expired.".

Re: sandbox install of Django?

2009-03-18 Thread James Bennett
On Wed, Mar 18, 2009 at 3:00 PM, bob wrote: > Is there an option to install Django into a sandbox area, and if so, > would it work? Python's distutils module is configurable in a variety of ways, including where it puts the packages it installs. You can use either one-off

Re: can't run django on uBUNTU

2009-03-18 Thread Dodol Garut
On 3/19/09, jayvandal wrote: > > I downloaded Django Django-1.0.2.tar.gz. > I tried to install by clicking on the by opening it and then extract > it. > i run python installand get no error messages. > I get the notice I am in Python > > I try to run Django-admin.py

Re: sandbox install of Django?

2009-03-18 Thread Kai Diefenbach
Hi, On 18 Mrz., 21:00, bob wrote: > Is there an option to install Django into a sandbox area You may take a look at virtualenv: http://pypi.python.org/pypi/virtualenv Regards Kai -- http://www.getlfs.com --~--~-~--~~~---~--~~ You received

can't connect with dbshell

2009-03-18 Thread waltbrad
First time I think I've ever tried this. I'm using postgres and the database is configured correctly and I have psql.exe on my path. So at the dos prompt I can: C:\>psql -d postgres -U admin type in the password and I'm fine. If I open the prompt within my project directory I can do the same

Re: Django bug that should be addressed: Idle timeouts do not clear session information

2009-03-18 Thread Jeff FW
My original suggestion would still work--run a cron job every minute (or so) that finds all of the sessions that have an expiration date since the last time the script was run--delete those, then log an entry in your audit table. Seems pretty simple to me, and I can't see any reason why it

Re: django choises field

2009-03-18 Thread Briel
Hi. I dont think you can get user input pn a field with choices, but then you dont really need choices if you want users to be able to input anything. Choices are used when you only want to accept certain values like a list of countries, states, or whatever. It doesn't seem like you have thought

Re: Using

2009-03-18 Thread Reiner
If the visitor should stay on the same page, you can leave out the url and only specify the anchor in href. ... The "problem" you've been facing here, probably is caused by the APPEND_SLASH setting, enforced by the CommonMiddleWare I think. It's used to ensure that a page has one, and only

Re: Need two response statements on same def

2009-03-18 Thread Andy Mckay
On 18-Mar-09, at 11:24 AM, Jesse wrote: > In the view.py I have (def Bypub) that sends data to a template and > paginates it. I have a second (def TextFile) that uses the same data > to send to a CSV file. I would like to combine the two (def Bypub and > def TextFile) together into def Bypub,

Re: question about template system

2009-03-18 Thread Alex Gaynor
On Wed, Mar 18, 2009 at 4:49 PM, Jason Wang wrote: > > Hi all, > > I have a problem where i have a list which stores a bunch of relevant > key to another dictionary. I want to loop through the list and print > out the information contained in the keys to output. > >

question about template system

2009-03-18 Thread Jason Wang
Hi all, I have a problem where i have a list which stores a bunch of relevant key to another dictionary. I want to loop through the list and print out the information contained in the keys to output. Apparently it doesn't work. So for example i have the following: lst = ["a", "b"] dic =

django choises field

2009-03-18 Thread Psihonavt
hello, have a question, in my model, i have filed, like: cpu_ch =( ("Box","Box import"), ("EOM","EOM import"), ) import_type = models.CharField(_("Import type"), max_length=5, choices=cpu_ch, blank=True) I want to have a third choice in choices cpu_ch, for example,

Re: Sort of OT on the django book

2009-03-18 Thread Lakshman Prasad
I do not get these comments even on firefox on ubuntu. I know, my colleagues do get it on FF on ubuntu, But I dont. Thanks for pointing, it is done. I am going to read it too. BTW, when is James Bennet's book 2.0 release? On Thu, Mar 19, 2009 at 12:11 AM, waltbrad wrote:

Possible bug with DateTimeFields and admin site

2009-03-18 Thread Ryan Duffield
Hello, I thought I would check here first to see if what I am experiencing is, in fact, a bug (using Django 1.0.2). The admin site JavaScript, when creating a new instance of a model with a DateTimeField, attempts to focus on an element that does not exist. Take this example: class

can't run django on uBUNTU

2009-03-18 Thread jayvandal
I downloaded Django Django-1.0.2.tar.gz. I tried to install by clicking on the by opening it and then extract it. i run python installand get no error messages. I get the notice I am in Python I try to run Django-admin.py and get an error. It does not seem to recognize Django I run the

sandbox install of Django?

2009-03-18 Thread bob
My hosting service (webhostingpad.com) doesn't have a canned script that will install Django. But they do have Python 2.4.3 and I can ssh into a shell. I don't have permission to write to the site-packages directory, so I can't use the usual install script. Is there an option to install Django

Re: Value proposition of Rails

2009-03-18 Thread tracy . reed
Ditto on everything plus I'll add this... On Wed, Mar 18, 2009 at 02:45:37PM -0500, Tim Chase spake thusly: > PHP-raw is a maint. headache. Using some of the PHP frameworks > (cake, etc) helps alleviate those problems, but I still prefer > Python over PHP as a language. Not only that but

Re: Django form: Allow user to insert a date in dd-mm-yyyy format and then convert in yyyy-mm-dd

2009-03-18 Thread MarcoS
Thanks for your replies, Koeb and Ady. Ady, if I understood I've to place the code from http://code.djangoproject.com/attachment/ticket/3672/ticket%233672--patch-test.diff to - python/site-packages/django/forms/forms.py and - python/site-packages/django/forms/widgets.py and then I call the

Re: Value proposition of Rails

2009-03-18 Thread Tim Chase
> 1. Why choose Django over J2EE Clarity vs. complexity (I find J2EE over-the-top'ly baroque). using Python, I don't miss the compilation cycle in Java, and the astronomical number of JSRs numbs the mind. > 2. Why choose Django over RoR I prefer Python's readability over Ruby. Otherwise,

Re: FIXED: Can't run django on Apache

2009-03-18 Thread Bro
What's the best way to do it ? I don't understand the official tutorial --~--~-~--~~~---~--~~ 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: Value proposition of Rails

2009-03-18 Thread shabda raaj
Ok, I am stupid! I was reading an article and mistyped! http://jooto.com/blog/index.php/2005/10/29/rails-value-proposition/ On Mar 19, 12:23 am, shabda wrote: > [Trying not be trollish, but the subject might be so. My apologies in > advance.] > > I run a small Django

Value proposition of Rails

2009-03-18 Thread shabda
[Trying not be trollish, but the subject might be so. My apologies in advance.] I run a small Django development firm ( www.uswaretech.com ), and a lot of clients we go after need to be convinced on why they should choose Django. What is your experience in this? Specifically am I looking for is,

Re: Using Static Files

2009-03-18 Thread Gil Sousa
I already found my mistake :) I had this: urlpatterns = patterns('lafora.forum.views', # Uncomment the admin/doc line below and add 'django.contrib.admindocs' # to INSTALLED_APPS to enable admin documentation: # (r'^admin/doc/', include('django.contrib.admindocs.urls')), #

Re: Prepopulate form from URL?

2009-03-18 Thread Jorge Romo
Thank you so much to both of you! I was looking at the wrong documentation lol kudos! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: how to iterate list of list using template language

2009-03-18 Thread Alex Gaynor
On Wed, Mar 18, 2009 at 2:03 PM, ihome wrote: > > hi, > > i pass in one list of list into my template and want to iterate the > list in template language. for example, list1 = [ [1,2], [3,4] ] > > initially i thought of using: > > {% for a in list1 %} > a[0]a[1] > {%

Sort of OT on the django book

2009-03-18 Thread waltbrad
Since the Django book 2.0 is up and ready, I'm doing a read of it. At first I was using firefox to read it but decided to switch over to Opera so that I could use Opera's note taking feature. One of the interesting things about the 2.0 book is it's commenting feature. But this doesn't show up in

one to one foreign keys unique across tables, IP Address Pool used by multiple tables

2009-03-18 Thread Dan
* want to share a pool of IP Addresses which are unique for both model Plc and model Station. Want to use Admin for adding Plc's and Stations. As is, if I try to use an IP address used within model PLC for another PLC it fails validation as expected. If I try to use an IP address assigned to

Need two response statements on same def

2009-03-18 Thread Jesse
In the view.py I have (def Bypub) that sends data to a template and paginates it. I have a second (def TextFile) that uses the same data to send to a CSV file. I would like to combine the two (def Bypub and def TextFile) together into def Bypub, but I'm not sure how to write the statements to

Re: Using Static Files

2009-03-18 Thread Artiom Lunev
try: MEDIA_ROOT = 'C:\\Projects\\myproject\\static_media' or MEDIA_ROOT = 'C:\\Projects\\myproject\\static_media\\' On Wed, Mar 18, 2009 at 3:22 PM, Gil Sousa wrote: > > Hi! > > First of all, I already saw (and tried) this: >

Re: model already registered error

2009-03-18 Thread Artiom Lunev
I usually run "manage.py runserver" again and error is gone. On Wed, Mar 18, 2009 at 4:45 PM, nixon66 wrote: > > I just redid my models in an application and ran "manage.py > runserver". But when I tried to log into the admin interface I get > model is

how to iterate list of list using template language

2009-03-18 Thread ihome
hi, i pass in one list of list into my template and want to iterate the list in template language. for example, list1 = [ [1,2], [3,4] ] initially i thought of using: {% for a in list1 %} a[0]a[1] {% endfor %} but i received this error: Could not parse the remainder: '[0]' from 'a[0]' any

Re: Using Static Files

2009-03-18 Thread Rajesh D
> First of all, I already saw (and tried) > this:http://docs.djangoproject.com/en/dev/howto/static-files/ > > I want to use static files on development mode, but this is starting > to driving me mad, I am googling for almost 2 days and I didn't solve > my problem yet. > > How can I use static

Re: ImportError with Django rev. 10087

2009-03-18 Thread bobbyc
Well, it appears that r10088 fixed things up, actually. http://code.djangoproject.com/changeset/10088 Thanks for your interest in helping anyway, Ramiro! On Mar 18, 12:10 pm, Ramiro Morales wrote: > On Wed, Mar 18, 2009 at 12:06 PM, bobbyc wrote: > > >

Re: Type 'django-admin.py help. For usage.

2009-03-18 Thread python_django
I got it. I installed Django on another machine and it worked fine. My laptop's Windows registry was messed up. Here is what I did in order to fix it: 1) I uninstalled Python and Django from my laptop, using the Revo Uninstaller (http://www.revouninstaller.com) 2) Cleaned up my Windows

Re: ImportError with Django rev. 10087

2009-03-18 Thread Ramiro Morales
On Wed, Mar 18, 2009 at 12:06 PM, bobbyc wrote: > > r10071 was the last successful one. > Ok. Several questions, hopefully you have the time needed to answer them: What value does your DEBUG setting have? Can you checkout different revisions of Django and test to confirm

Re: Lookup across relations

2009-03-18 Thread Brett Parker
On 18 Mar 18:03, Malcolm Tredinnick wrote: > > On Wed, 2009-03-18 at 08:00 +0100, Matías Costa wrote: > > On Tue, Mar 17, 2009 at 9:28 PM, 3xM <3...@detfalskested.dk> wrote: > > I'll upgrade to Ubuntu 8.10 (with django 1.0) as soon as > > possible and > > get back to tell

Re: Using

2009-03-18 Thread NoviceSortOf
Thanks for the answer... Looking closer and testing direct on the URL Navigation bar using cut and paste figured out the following A slash "/" between mypage/#top makes all the difference. * this will reload the page, and go to the anchor. http://127.0.0.1:8000/myproj/mypage#top *this will

Re: Adding a field to a form during runtime

2009-03-18 Thread Marek W
Thanks for your response. Probably the reason was I didn't update a database, because now(after making syncdb) it works correctly. But by the time I've found a second problem: while to create a dynamic form this way: def make_car_form(extra): fields = { 'carType' : forms.CharField() } if

Re: yet another unicode question...

2009-03-18 Thread Adi Sieker
Hi, On 19.03.2009, at 11:02, Juan Hernandez wrote: > Hi there, > > This has been killing me for hours and I don't know what else to do. > Is about the famous charset in django. > > I have this model: > > class Post(models.Model): > user = models.ForeignKey(User) > category =

Re: yet another unicode question...

2009-03-18 Thread Briel
Hi. I'm not sure what exactly you are doing and how/where you are displaying this stuff. But it sounds like you are escaping the html, django does this by default to protect sites from XSS attacks ect. You can either stop the auto escaping in the template or use the |safe tag. You can read about

Re: yet another unicode question...

2009-03-18 Thread Alex Gaynor
On Wed, Mar 18, 2009 at 11:32 AM, Juan Hernandez wrote: > Hi there, > > This has been killing me for hours and I don't know what else to do. Is > about the famous charset in django. > > I have this model: > > class Post(models.Model): > user = models.ForeignKey(User) >

Re: Prepopulate form from URL?

2009-03-18 Thread Johan
You should be able to do it via foo_value = request.GET['foo']. PS: The above should work for a post like /?foo=bar On Mar 18, 4:06 pm, Jorge Romo wrote: > Hello! > > I was trying to see if there's a way (I'm pretty sure there is a way) > to prepopulate a form field

yet another unicode question...

2009-03-18 Thread Juan Hernandez
Hi there, This has been killing me for hours and I don't know what else to do. Is about the famous charset in django. I have this model: class Post(models.Model): user = models.ForeignKey(User) category = models.ForeignKey(Categories) title = models.CharField(max_length=50) post

Re: Adding a field to a form during runtime

2009-03-18 Thread Thomas Guettler
Hi, your code looks correct. You can try to debug it. Maybe insert assert False, self.fields into __init__() Do the fields from the model exist? Thomas Marek W schrieb: > Hi, I would like to add a field to a form dynamically. I'm using Django > 1.0.2. > > Here's my view code: > > class

Re: Model inheritance vs. User.get_profile()

2009-03-18 Thread Johan
HaHa (After some reading) Silly me my way is the get_profile route :) On Mar 18, 4:58 pm, Johan wrote: > Hiya , > >   I don't know the get_profile route (Am going to read up on that > now :)). But here is an example of what I'm using : > >   class

Re: Using

2009-03-18 Thread Adi Sieker
Hi, On 18.03.2009, at 15:47, NoviceSortOf wrote: > > We have a web form where the enduser clicks on a link and > is moved to different parts of the page. > > With the previous 3 generations of the site, we simply did something > like the following . > > ...in html to mark the spot > > > ...in

Re: Model inheritance vs. User.get_profile()

2009-03-18 Thread Johan
Hiya , I don't know the get_profile route (Am going to read up on that now :)). But here is an example of what I'm using : class Student(models.Model): base = models.OneToOneField(User, primary_key=True) first_name = models.CharField(max_length=100) last_name =

Re: ImportError with Django rev. 10087

2009-03-18 Thread bobbyc
r10071 was the last successful one. On Mar 18, 11:00 am, Ramiro Morales wrote: > On Wed, Mar 18, 2009 at 11:24 AM, bobbyc wrote: > > > Is anyone else having trouble with importing models into other models > > with the latest Django rev. (as I write this,

Re: ImportError with Django rev. 10087

2009-03-18 Thread Ramiro Morales
On Wed, Mar 18, 2009 at 11:24 AM, bobbyc wrote: > > Is anyone else having trouble with importing models into other models > with the latest Django rev. (as I write this, 10087). > > ../python2.5/site-packages/django/db/models/loading.py", line 57, in > _populate >    

Re: Prepopulate form from URL?

2009-03-18 Thread Briel
Hi. When you setup urls, they can have dynamic parts in them, so you dont need to use ?=, but could have an url foo/bar where your url would grab the bar and turn it into a variable. Fx if you had an url like this in your urls.py: (r'^foo/(?P\w+)/$', 'my_view_name') bar would become my_var, that

Using

2009-03-18 Thread NoviceSortOf
We have a web form where the enduser clicks on a link and is moved to different parts of the page. With the previous 3 generations of the site, we simply did something like the following . ...in html to mark the spot ...in html to jump to the spot. < href="/mypage#top_of_page"> Now with

Re: Martin Fowler's "Captcha for Django"

2009-03-18 Thread bendavis78
I've made some more changes/fixes to this, in case anyone's interested. Here's what's changed from the original: - updated for compatibility w/ django-1.1 - using sha1 instead of md5 to store captcha image (theoretically more secure) - added expire_time config variable - added imagetype

model already registered error

2009-03-18 Thread nixon66
I just redid my models in an application and ran "manage.py runserver". But when I tried to log into the admin interface I get model is alreadyregistered errors. Anyone have suggestions on how to fix this? --~--~-~--~~~---~--~~ You received this message

Adding a field to a form during runtime

2009-03-18 Thread Marek W
Hi, I would like to add a field to a form dynamically. I'm using Django 1.0.2. Here's my view code: class CarForm(ModelForm): def __init__(self, *args, **kwargs): super(CarForm, self).__init__(*args, **kwargs) self.fields['extraField'] = forms.CharField() class Meta:

ImportError with Django rev. 10087

2009-03-18 Thread bobbyc
Is anyone else having trouble with importing models into other models with the latest Django rev. (as I write this, 10087). ../python2.5/site-packages/django/db/models/loading.py", line 57, in _populate self.load_app(app_name, True) ../python2.5/site-packages/django/db/models/loading.py",

Prepopulate form from URL?

2009-03-18 Thread Jorge Romo
Hello! I was trying to see if there's a way (I'm pretty sure there is a way) to prepopulate a form field from an url. For example: /foo?=bar and that in my form field "bar" is displayed. I have to work with java? there is another way? --~--~-~--~~~---~--~~ You

Admin datetime picker

2009-03-18 Thread jeffhg58
>From converting over to Django 1.1 from 0.97, I had the admin datetime widget displayed on my search screen. With the latest version of django, it seems that the datetime widget only displays if the user is an administrator. I have narrowed down the problem that the javascript catalog is only

Re: How to get the root path ?

2009-03-18 Thread Bro
Thanks Jakob :) It works perfectly :) Bro --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group,

Re: FIXED: Can't run django on Apache

2009-03-18 Thread Bro
Thanks Graham !! It works perfectly, you own :) Bro --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this

Re: Activating admin site

2009-03-18 Thread Alex Gaynor
On Wed, Mar 18, 2009 at 9:42 AM, jeffhg58 wrote: > > At the beginning of the urls.py file > > from django.contrib import admin > > admin.autodiscover() > > In my urls.py I changed accessing my admin.site > > from > > r'^admin/(.*)', admin.site.root), > > to > > (r'^admin/',

Activating admin site

2009-03-18 Thread jeffhg58
At the beginning of the urls.py file from django.contrib import admin admin.autodiscover() In my urls.py I changed accessing my admin.site from r'^admin/(.*)', admin.site.root), to (r'^admin/', include(admin.site.urls)), But when I access my admin I get errors when trying to logout the

Using Static Files

2009-03-18 Thread Gil Sousa
Hi! First of all, I already saw (and tried) this: http://docs.djangoproject.com/en/dev/howto/static-files/ I want to use static files on development mode, but this is starting to driving me mad, I am googling for almost 2 days and I didn't solve my problem yet. How can I use static files on

[Job] Senior Web Engineer (Django, Javascript)

2009-03-18 Thread Jesse Noller
Hi Everyone, I'm helping a good friend of mine find someone with Django/Web skills for a new startup - the opening will be posted on djangogigs soon, but I also wanted to share it with you. Feel free to contact me (jnoller at gmail dot com) or jobs at nasuni dot com about this position. I've

Re: How to get the root path ?

2009-03-18 Thread Briel
Hi. Instead of generating all of your urls as a base url + something, you can insteadl use the url template tag, that way you can get your url in the template more or less like this (if you use named urls): {% url user_change %} using reverse matching, django can figure out what the url needs to

Re: Modify value of a Django form field during clean()

2009-03-18 Thread Karen Tracey
On Tue, Mar 17, 2009 at 11:16 AM, Ben Gerdemann wrote: > > I am adding custom validation to my forms and custom fields in my > Django app. I would like to be able to modify the value of a field > when triggering an error. For example, if there is an error, the form > should be

Re: DateField with Django

2009-03-18 Thread Adi Sieker
Hi, On 18.03.2009, at 11:51, Wim Feijen wrote: > > Hello people, > > It has been over a month do I'd like to raise the same question again, > with all due respect. > > Does anybody know how to control a form's output format of a stored > DateField? Unfortunately, different countries use

Re: Django form: Allow user to insert a date in dd-mm-yyyy format and then convert in yyyy-mm-dd

2009-03-18 Thread Adi Sieker
Hi, On 18.03.2009, at 13:01, MarcoS wrote: > > Hi Adi, thanks for your reply! > > I had just tried the DateField.input_formats, but the problem was that > I'm using the date admin widgets. > If I specify input_formats like: '%d.%m.%y', I can't use the admin > widgets 'cause it insert the date in

Re: Django form: Allow user to insert a date in dd-mm-yyyy format and then convert in yyyy-mm-dd

2009-03-18 Thread koenb
On 18 mrt, 13:01, MarcoS wrote: > Hi Adi, thanks for your reply! > > I had just tried the DateField.input_formats, but the problem was that > I'm using the date admin widgets. > If I specify input_formats like: '%d.%m.%y', I can't use the admin > widgets 'cause it insert

How to get the root path ?

2009-03-18 Thread Bro
Hi, My project root path is : http://127.0.0.1:8000/ The user path is : http://127.0.0.1:8000/user/ The change form path is : http://127.0.0.1:8000/user/change/ In the template.html file I use : {{ root_path }}change/ My question : how to get the variable of the root path (http://

Re: DateField with Django

2009-03-18 Thread koenb
> Does anybody know how to control a form's output format of a stored > DateField? Unfortunately, different countries use different customs to > represent dates and I'd like to represent the date in another > international format (%d-%m-%Y). Any help would be very much > appreciated! I use the

Re: Model inheritance vs. User.get_profile()

2009-03-18 Thread ntoll
Thanks for the information and link Malcolm. To cut a long story short, I'll just use get_profile(). On Mar 17, 11:32 pm, Malcolm Tredinnick wrote: > On Tue, 2009-03-17 at 09:49 -0700,ntollwrote: > > Guys, > > > Asking for advice here. > > > What is the best way to

Re: Model inheritance vs. User.get_profile()

2009-03-18 Thread ntoll
Dougal, Thanks for the heads up... looks like I'l user get_profile if only for the the next guy who comes along... :-) Nicholas. On Mar 17, 11:01 pm, Dougal Matthews wrote: > get_profile is newer than model inheritance I believe. > Working with profile is how everybody

Re: Django form: Allow user to insert a date in dd-mm-yyyy format and then convert in yyyy-mm-dd

2009-03-18 Thread MarcoS
Hi Adi, thanks for your reply! I had just tried the DateField.input_formats, but the problem was that I'm using the date admin widgets. If I specify input_formats like: '%d.%m.%y', I can't use the admin widgets 'cause it insert the date in the format: '%Y-%m-%d' (how you can see in

Re: Forms: custom clean for DateField

2009-03-18 Thread Wim Feijen
Hi Marco, In Django 1.0, you don't need to call clean from clean, Django will do that automatically for you. :) So what you can do is: def clean(self): data = self.cleaned_data if (data['firstDate'] >= data['lastDate']): raise ValidationError("Error")

Re: Django form: Allow user to insert a date in dd-mm-yyyy format and then convert in yyyy-mm-dd

2009-03-18 Thread Adi Sieker
Hi, On 18.03.2009, at 11:43, MarcoS wrote: > > Hi all, > I'm implementing a form in django with a DateField field in forms.py. > My purpose is to allow a user to insert a date in european format (dd/ > mm/) and then, obviously, convert it in the /mm/dd format to > let's django check if

Django form: Allow user to insert a date in dd-mm-yyyy format and then convert in yyyy-mm-dd

2009-03-18 Thread MarcoS
Hi all, I'm implementing a form in django with a DateField field in forms.py. My purpose is to allow a user to insert a date in european format (dd/ mm/) and then, obviously, convert it in the /mm/dd format to let's django check if it's a valid date and save it in a db. currently I've a

Re: Completions

2009-03-18 Thread Filip Gruszczyński
I see. Thanks a lot :-) 2009/3/18 Alex Gaynor : > > > On Tue, Mar 17, 2009 at 8:10 PM, Alex Gaynor wrote: >> >> >> 2009/3/17 Filip Gruszczyński >>> >>> > Are you talking about autocompletion as in what the browser does, or >>> >

Re: allowing a user to delete their own account and associated data.

2009-03-18 Thread Tim Chase
> From the interactive shell, it's easy to delete a user:: > > >>> from django.contrib.auth.models import User > >>> u = User.objects.get(username='jacob') > >>> u.delete() > > So, you'd need to write a view that essentially does the above. > Remember that in views, the

Re: How can i access UserProfile from User in the views?

2009-03-18 Thread Paolo Corti
On Mar 17, 7:24 pm, Andy Mckay wrote: > If you use request context then you will get the user available: > > http://docs.djangoproject.com/en/dev/ref/templates/api/?from=olddocs#... I could correctly access context, in fact i had the error also from the shell. The problem i

Re: My web page can not be Internationalized

2009-03-18 Thread Eric
Our website is : www.cubelive.cn . when you use English browser and log in the index page , the problem will be shown ! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group,

Re: Django first app doubt

2009-03-18 Thread Reiner
I haven't read the tutorials in a while, but shouldn't it be http://localhost:8000/admin/ instead of http://localhost:8000/*polls/*admin/ ? Regards, Reiner On Mar 17, 6:53 pm, Gustavo Senise wrote: > Hello fellows, > > I am starting the django first app and I am having

Re: simple venue representation

2009-03-18 Thread Dougal Matthews
If you just want to store the location you could just store the address or latitude and longatude in the model? I think GeoDjango has way more than you'll need unless your missing out some features... Dougal --- Dougal Matthews - @d0ugal http://www.dougalmatthews.com/ 2009/3/18 Viktor Nagy

Re: simple venue representation

2009-03-18 Thread Kenneth Gonsalves
On Wednesday 18 March 2009 14:44:16 Viktor Nagy wrote: > My basic idea could be represented with the following model: > class Venue(models.Model): >   title = models.CharField >   gurl = models.URLField # a url to include a google maps > > And then I would add a venue to every conference. Do you

  1   2   >