Re: ModelForm, ImageField and User

2007-12-26 Thread Muchanic
Just FYI and for anyone else who comes across this thread - I had the same problem, trying to pass a ForeignKey via HiddenInput in an app I'm working on. If you need to/want to do it this way, the trick is that you have to use a ModelChoiceField and not an IntegerField for Django to be able to do

My SSL is not working when I use www.mysite.com...works fine with mysite.com

2007-12-26 Thread Greg
Hello, I purchase a SSL for my website...https://mysite.com. Everything works fine in IE. I can go to my site using both www.mysite.com and mysite.com. When I add products to my cart ( request.session['cart'] )...I can view the contents of the cart session variable when I access my secure site

Re: Django newb question about status of OneToOne relationships in ORM

2007-12-26 Thread Malcolm Tredinnick
On Thu, 2007-12-27 at 00:11 -0500, Jake B wrote: > Hi, I read here: > http://www.djangoproject.com/documentation/model-api/ > > "The semantics of one-to-one relationships will be changing soon, so > we don't recommend you use them. If that doesn't scare you away, keep > reading." > > I've

Django newb question about status of OneToOne relationships in ORM

2007-12-26 Thread Jake B
Hi, I read here: http://www.djangoproject.com/documentation/model-api/ "The semantics of one-to-one relationships will be changing soon, so we don't recommend you use them. If that doesn't scare you away, keep reading." I've never used Django before, and I'm trying to decide between using it

Re: forms.form_for_model

2007-12-26 Thread Empty
> Thanks for the reply I tried using the method you described and > searched the __init__.py, but just couldnt make any sense of it, > > def my_callback(field, **kwargs): > if f.name == 'customer': >return f.formfield(formfclass=forms.HiddenInput) Since you're receiving the

Re: MacOS X Leopard + mod_pyton + mysql problems

2007-12-26 Thread Graham Dumpleton
On Dec 27, 9:49 am, Oliver Beattie <[EMAIL PROTECTED]> wrote: > Did anyone ever get this working, I am tearing my hair out here trying > to figure it out; I finally get it to build and now I'm getting:- > > ImproperlyConfigured: Error loading MySQLdb module: dlopen(/Library/ >

Re: Performance of a django website

2007-12-26 Thread [EMAIL PROTECTED]
On Dec 11, 8:39 pm, Richard Coleman <[EMAIL PROTECTED]> wrote: > Forest Bond wrote: > >>> - How are you running your Django app? Mod_python? FastCGI? > >>> - What web server are you using? > >>> - What's the nature of the dynamic Django request you are measuring? > >>> How many DB queries does

Re: Datetime ordering correct?

2007-12-26 Thread Jeremy Dunck
On Dec 26, 2007 4:04 PM, Ryan K <[EMAIL PROTECTED]> wrote: > def get_sp_from_date_range(start_date, end_date, order=False): > s_products = ScheduledProduct.objects.filter(start__gt=start_date) > s_products = s_products.filter(finish__lt=end_date) > if order: > return

Re: Newform-admin: problem with loading admin templates and templatetags

2007-12-26 Thread Jeremy Dunck
On Dec 26, 2007 3:49 AM, Webchemist <[EMAIL PROTECTED]> wrote: > > Hi, all! > I am trying to switch to the new-form admin branch and created a > simple project in test purposes. > I installed 0.97-newforms-admin-SVN-6977 and created a test project. > When trying to start at 127.0.0.1:8000/admin I

Re: MacOS X Leopard + mod_pyton + mysql problems

2007-12-26 Thread Oliver Beattie
Did anyone ever get this working, I am tearing my hair out here trying to figure it out; I finally get it to build and now I'm getting:- ImproperlyConfigured: Error loading MySQLdb module: dlopen(/Library/ WebServer/.python-eggs/MySQL_python-1.2.2-py2.5-macosx-10.5-i386.egg- tmp/_mysql.so, 2):

Datetime ordering correct?

2007-12-26 Thread Ryan K
I have a simple functions that pulls objects from the database that are between a date range: def get_sp_from_date_range(start_date, end_date, order=False): s_products = ScheduledProduct.objects.filter(start__gt=start_date) s_products = s_products.filter(finish__lt=end_date) if

Re: django site-administration

2007-12-26 Thread andrea.dipersio
This happen because django have the autoescape set to on by default. check this http://www.djangoproject.com/documentation/templates/#autoescape and this http://www.djangoproject.com/documentation/templates/#safe an example: {{ blog.content|safe }} On 26 Dic, 18:22, goober <[EMAIL PROTECTED]>

Re: no such table: django_content_type

2007-12-26 Thread Alex Koshelev
Add "django.contrib.contenttypes" to INSTALLED_APPS an run syncdb On 26 дек, 23:15, Chris Haynes <[EMAIL PROTECTED]> wrote: > I add 'django.contrib.auth', to my INSTALLED_APPS. This seems > necessary to use the admin interface, for I get prompted for the > superuser login and password when I run

Re: forms.form_for_model

2007-12-26 Thread mike
Thanks for the reply I tried using the method you described and searched the __init__.py, but just couldnt make any sense of it, def my_callback(field, **kwargs): if f.name == 'customer': return f.formfield(formfclass=forms.HiddenInput) gives me global name 'f' is not

filter substitution

2007-12-26 Thread [EMAIL PROTECTED]
Dear Django-Users: I'm trying to perform a filter substitution, whereby should someone try to fetch a QuerySet: qs = project.models.Model.manager.filter(att1=val1, att2=val2) I would like to wire this internally so as to return: qs = project.models.Model.manager.filter(att3=val3, att4=val4)

no such table: django_content_type

2007-12-26 Thread Chris Haynes
I add 'django.contrib.auth', to my INSTALLED_APPS. This seems necessary to use the admin interface, for I get prompted for the superuser login and password when I run syncdb. But then after table creation, (whether I decline to enter the superuser info or not), I get a no such table:

Re: UnicodeEncodeError

2007-12-26 Thread Rodrigo Culagovski
Thanks so much, that did the trick. Rodrigo On Dec 26, 3:05 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > On Dec 26, 2007 12:47 PM, rodrigo <[EMAIL PROTECTED]> wrote: > > > > > > > I am getting a "UnicodeEncodeError" when trying to add data containing > > accented characters (or 'ñ') via the

Re: UnicodeEncodeError

2007-12-26 Thread Karen Tracey
On Dec 26, 2007 12:47 PM, rodrigo <[EMAIL PROTECTED]> wrote: > > I am getting a "UnicodeEncodeError" when trying to add data containing > accented characters (or 'ñ') via the admin interface. > I am using the latest revision of Django via svn, and a mysql database > with "DEFAULT CHARACTER SET

UnicodeEncodeError

2007-12-26 Thread rodrigo
I am getting a "UnicodeEncodeError" when trying to add data containing accented characters (or 'ñ') via the admin interface. I am using the latest revision of Django via svn, and a mysql database with "DEFAULT CHARACTER SET utf8". Here's the odd part: The data does get added to the database, the

Re: Conditional template formatting

2007-12-26 Thread Jason Massey
Gah, sorry. The second after I hit the send button I saw the ifchanged tag. On Dec 26, 2007 12:33 PM, Jason <[EMAIL PROTECTED]> wrote: > > Let's say I have the following output in my template: > > John Smith37 widget1 > John Smith37 widget2 > Bill Rogers45 widget3 > Bill

Conditional template formatting

2007-12-26 Thread Jason
Let's say I have the following output in my template: John Smith37 widget1 John Smith37 widget2 Bill Rogers45 widget3 Bill Rogers45 widget4 What I'd like to see in the output, instead of the duplicated names: John Smith37 widget1 - -

django site-administration

2007-12-26 Thread goober
Greetings! I have been wrestling with django site-administration on and off for the past few days. I am trying to populate a simple blog using the models provided in the django tutorial. However, I am puzzled by adding simple text with html tags within the application. By this I mean if I mean:

Re: Devlopment vs.Production server

2007-12-26 Thread rodrigo
> it takes about 5 minutes to upgrade your webfaction django. I am   > running latest svn trunk on webfaction You're right, of course. For future reference: http://forum.webfaction.com/viewtopic.php?id=276 thanks, Rodrigo --~--~-~--~~~---~--~~ You received

Re: Devlopment vs.Production server

2007-12-26 Thread rodrigo
> I think you'll find most people do at least the early development work > locally, since it's so easy to do so (that's why the development > webserver exists, for example). I know that's the way I work all the > time: all development is done locally and the only production server > "testing" I

Re: order_by perils

2007-12-26 Thread Malcolm Tredinnick
On Wed, 2007-12-26 at 05:57 -0800, tomer filiba wrote: > i'm having a lot of trouble with order_by on foreign keys, or namely, > ManyToMany fields. Generally, ordering by a many-to-many field doesn't make sense. You have a result set, each of which can have *multiple* related objects and just

Re: Devlopment vs.Production server

2007-12-26 Thread Kenneth Gonsalves
On 26-Dec-07, at 6:55 PM, Malcolm Tredinnick wrote: >> 3- I have Django 0.97 on my laptop, but my host (webfaction) has >> 0.96. >> Should I downgrade the local version so I'm using the same one as the >> host? it takes about 5 minutes to upgrade your webfaction django. I am running latest

Geodetic software development

2007-12-26 Thread Fred
Dear software developer, GeoDLL supports the development of geodetic software on various platforms by providing geodetic functions. GeoDLL contains precise functions of the themes 2D and 3D coordinate transformation, geodetic datum shift and reference system conversion, meridian strip changing,

Re: Page not showing correct data

2007-12-26 Thread Karen Tracey
On Dec 25, 2007 9:18 PM, <[EMAIL PROTECTED]> wrote: > After reloading the page the browser does not show the new data. > > Here is the odd thing, if I wait about 10 minutes before clicking on the > link then the new data appears. > > Any suggestions? > Sounds like you've enabled some form of

order_by perils

2007-12-26 Thread tomer filiba
i'm having a lot of trouble with order_by on foreign keys, or namely, ManyToMany fields. here's a simplified version of the code: # holds info about a test (filename, etc.) class TestInfo(models.Model): name = models.CharField(max_length=200) filename = models.CharField(max_length=200,

Re: save method and many to many

2007-12-26 Thread grassoalvaro
Unfortunately this solutions dosen't work. Even if i do something (stupid) like that: def post_save_gallery(instance): dispatcher.disconnect(post_save_gallery, signal=signals.post_save, sender=Gallery) gallery = Gallery.objects.get(slug=instance.slug) photos = Photo.objects.all()

Re: Devlopment vs.Production server

2007-12-26 Thread Malcolm Tredinnick
On Wed, 2007-12-26 at 05:15 -0800, rodrigo wrote: > Hi, > > I am a complete Django newbie, and about to start developing my first > project. Some questions about development vs. production servers: > 1- do you usually develop on a local server and then move to a remote > production server once

Devlopment vs.Production server

2007-12-26 Thread rodrigo
Hi, I am a complete Django newbie, and about to start developing my first project. Some questions about development vs. production servers: 1- do you usually develop on a local server and then move to a remote production server once it's done? Or develop on the production server? 2- how seamless

Re: Grouping of records

2007-12-26 Thread matimba
Thanks Alex -- Got it going. --~--~-~--~~~---~--~~ 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

dumpdata --traceback for 0.96

2007-12-26 Thread Bulkan
Hi All, http://code.djangoproject.com/changeset/6936 Just wondering if i there is a way to get this functionality for 0.96? Im trying to dump the data in our production server so that i can use it as data for testing but it fails for two apps in the project with the following error Unable to

Re: Grouping of records

2007-12-26 Thread Alex Koshelev
If "continents" is contex variable wich is Continent.objects.all() so: {% for continent in continents %} {{continent.name}} {% for country in continent.country_set.all %} - {{country.country_name}} ({{country.city_set.count}}) {% endfor %} {% endfor %} But this

Grouping of records

2007-12-26 Thread matimba
Hi -- My model have three classes: Continent, Country, City class Continent(models.Model): name = models.CharField(maxlength=60) class Country(models.Model): country_name = models.CharField(maxlength=60) continent = models.ForeignKey(Continent) class City(models.Model):

Re: Performance of a django website

2007-12-26 Thread Graham Dumpleton
On Dec 26, 6:44 pm, Dima Dogadaylo <[EMAIL PROTECTED]> wrote: > On Dec 11, 8:37 pm, Richard Coleman <[EMAIL PROTECTED]> > wrote: > > > 1. mod_python > > 2. apache 2.2.4 > > 3. I'm using funkload and ab to measure the requests per second of one > > of the base pages within the dynamic part of the

Newform-admin: problem with loading admin templates and templatetags

2007-12-26 Thread Webchemist
Hi, all! I am trying to switch to the new-form admin branch and created a simple project in test purposes. I installed 0.97-newforms-admin-SVN-6977 and created a test project. When trying to start at 127.0.0.1:8000/admin I got an error TemplateDoesNotExist at /admin/ admin/login.html Ok, I add

Re: widget looks like user permissions management?

2007-12-26 Thread supafly
Sorry, all this regulated by filter_interface=models.HORIZONTAL in model definition. e.g.: field = models.ManyToManyField(Link, filter_interface=models.HORIZONTAL) On 26 дек, 11:11, supafly <[EMAIL PROTECTED]> wrote: > Is there simple way to render many-to-many/one-to-many relationship > such

widget looks like user permissions management?

2007-12-26 Thread supafly
Is there simple way to render many-to-many/one-to-many relationship such as permissions box in django admin interface? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send