Re: explicit m2m model

2007-08-22 Thread James Tauber
Looking at previous discussions, I think what I need is much simpler than others. I just have class Friendship(models.Model): to_user = models.ForeignKey(User, related_name="friends") from_user = models.ForeignKey(User, related_name="_unused_") and want to make sure that when Friend

Re: explicit m2m model

2007-08-22 Thread Russell Keith-Magee
On 8/23/07, James Tauber <[EMAIL PROTECTED]> wrote: > > So bottom line is I *can* do it, but I have to do the work myself? Pretty much. But, if you do the work yourself, it's an idea that has been informally blessed, so a good implementation of this feature could find itself in the trunk without

Another django book?

2007-08-22 Thread Ramdas S
Has someone seen this book? http://as.wiley.com/WileyCDA/WileyTitle/productCd-0470138092.html --~--~-~--~~~---~--~~ 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@go

Re: serving different applications for different domains

2007-08-22 Thread Paul Rauch
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Amirouche schrieb: >> what I want is to let mysite/urls.py include the other urlconfs >> according to the domain. >> e.g. let poll.mydomain.com include the mysite/polls/urls.py >> blog.mydomain.com => mysite/polls/blog.py >> mydomain.com => mysite/hp/

Re: NameError: name 'django' is not defined .... activating the admin interface...

2007-08-22 Thread Paul Rauch
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 jborup schrieb: > HI Django users, > New to python and django. I'm following the www.djangobook.com , and > chapter 6 talks about the admin interface. > > I have done this: > > Added this to the settings.py: > INSTALLED_APPS = ( > django.contri

Re: explicit m2m model

2007-08-22 Thread James Tauber
So bottom line is I *can* do it, but I have to do the work myself? I'll re-look through the archives. Thanks! James On 23/08/2007, at 2:03 AM, Russell Keith-Magee wrote: > > On 8/23/07, James Tauber <[EMAIL PROTECTED]> wrote: >> >> Say I want to express a symmetric m2m in a separate model. In

Re: explicit m2m model

2007-08-22 Thread Russell Keith-Magee
On 8/23/07, James Tauber <[EMAIL PROTECTED]> wrote: > > Say I want to express a symmetric m2m in a separate model. In other > words, instead of ... > Is there a nice way to do that, short of just copying a bunch of the > code from ManyRelatedManager? Hi James, At present, there isn't a built-in

News site examples

2007-08-22 Thread Alberto2005
Hi, i'm new in Django and i want to know if anybody has any code example of a news site, not a blog. I need something simple to learn how simple articles and photos are posted in a site. Thanks for your help --~--~-~--~~~---~--~~ You received this messa

count views plugin

2007-08-22 Thread Ramdas S
Is there a code/plugin/ available similar to Wordpress Count Views ( display the number of views on a post/article or a blog) plugin in django? Or can someone advise how I can write one? RS --~--~-~--~~~---~--~~ You received this message because you are subscribed

explicit m2m model

2007-08-22 Thread James Tauber
Say I want to express a symmetric m2m in a separate model. In other words, instead of class Person(models.Model): ... friends = models.ManyToManyField('self') I wanted class Person(models.Model): ... class Friendship(models.Model): to_person = models.ForeignKe

Re: deploy django on python-only hosting

2007-08-22 Thread Graham Dumpleton
On Aug 23, 9:55 am, Amirouche <[EMAIL PROTECTED]> wrote: > > Then which is the part that's not working? > > well, I really don't know, without ssh it seems a bit tricky, even > feasible you may try to contact the hosting compagny. > > in the django.fcgi file that use to server python files, get th

Re: Counts

2007-08-22 Thread Jeremy Dunck
On 8/22/07, Rohit <[EMAIL PROTECTED]> wrote: ... > > Each book is it's own entry, so right now it appears as: > > Django book > Django book > Django book > Django book ... 41 more times ... > Is there an easy way of doing this in Django? if not how would you > recommend implementing it? If you're

DEBUG = False yet debug shows.

2007-08-22 Thread TheMaTrIx
Am I loosing my marbles or is this normal, that if your logged into the admin with your super account, debug gets enabled automaticly for you? Any idea why django is showing a mix of my 404's, 500's and django's debug 404's and 500's in this scenario? Not just all custom errors or all django erro

Re: Admin problems now via apache2/mod-python

2007-08-22 Thread jwitherspoon
Umm, nevermind. Forgot I had a vestigial "mysite" leftover in my root directory, from before I realized Django didn't like those files kept in root (duh), & was making the changes there. Deleted that folder, so hopefully it'll be a while b4 I bug you guys w/any further stupid question! On Aug

Re: Importing Excel/CVS into Database

2007-08-22 Thread Ben Ford
It worked? Sweet ;-) On 23/08/07, Amirouche <[EMAIL PROTECTED]> wrote: > > > > > On 22 août, 09:51, "Ben Ford" <[EMAIL PROTECTED]> wrote: > > A quick hack that should work would be to create a DictReader object to > read > > the csv with (have a look in the python docs > > here

Admin problems now via apache2/mod-python

2007-08-22 Thread Jason Witherspoon
Well, upwards & onwards. In the interest of forward momentum, I managed to solve my css problem simply be copying the media folder into my htdocs folder, & then setting: SetHandler None ...in httpd.conf so that folder gets statically served (thanks to Chpt. 21 of the Python book "Deploy

Counts

2007-08-22 Thread Rohit
So I've built this QuerySet of book names from my DB. I'm trying to aggregate them and display them as follows: Django book (45) Python for Dummies (4) O'Reily Python (10) and so on. Each book is it's own entry, so right now it appears as: Django book Django book Django book Django book ... 41

Re: how to get class name from a relation name

2007-08-22 Thread Russell Keith-Magee
On 8/22/07, Grégoire Cachet <[EMAIL PROTECTED]> wrote: > Hi, > > I would like to get the class name from a relation name (OneToOne) ... > I want to get the class of the object a.modelb (ie ModelB) without > instanciating a ModelA. Is there a clever way to get it from the model > definition ? or do

Re: Importing Excel/CVS into Database

2007-08-22 Thread Amirouche
On 22 août, 09:51, "Ben Ford" <[EMAIL PROTECTED]> wrote: > A quick hack that should work would be to create a DictReader object to read > the csv with (have a look in the python docs > here). That's actullay what I did but I didn't know about the obj.

Re: deploy django on python-only hosting

2007-08-22 Thread Amirouche
> Then which is the part that's not working? well, I really don't know, without ssh it seems a bit tricky, even feasible you may try to contact the hosting compagny. in the django.fcgi file that use to server python files, get the current dire with os.path.abspath('.') if everything works corr

static css problems on debian sarge

2007-08-22 Thread jwitherspoon
Hi folks-- Rank django newbie here. After a couple of solid days of banging my head on various brick walls, I've installed Django 0.96 on my Debian VPS. It's a headless co-location server, so I've set up django to be administered via Apache2/mod-python on port (80 is our regular active web

Re: ANN: Satchmo 0.5 Release

2007-08-22 Thread Forest Bond
On Wed, Aug 22, 2007 at 11:37:24PM -, SamFeltus wrote: > Keep at it, Python has needed a good online store forever. And the world needs an osCommerce replacement ASAP ;) ... grumble grumble PHP grumble grumble grumble ... -Forest -- Forest Bond http://www.alittletooquiet.net signature.asc

Re: ANN: Satchmo 0.5 Release

2007-08-22 Thread SamFeltus
Keep at it, Python has needed a good online store forever. On Aug 22, 3:46 pm, "Chris Moffitt" <[EMAIL PROTECTED]> wrote: > I am very pleased to announce that release 0.5 of Satchmo is now available. > > Satchmo is an Open Source framework for creating unique and robust online > stores. It is dev

GIFTS - For All Occasions

2007-08-22 Thread Salah U Shamsi
*Sending Gifts to your loved ones is as easy as any thing else.* *Click to read:* * http://www.12three.info/gifts/index.htm* - --~--~-~--~~~---~--~~

Re: ImageField via admin

2007-08-22 Thread Carl Karsten
Grigory Fateyev wrote: > Hello Carl Karsten! > On Tue, 21 Aug 2007 10:21:06 -0500 you wrote: > >> Grigory Fateyev wrote: >>> Hello Carl Karsten! >>> On Mon, 20 Aug 2007 14:07:39 -0500 you wrote: >>> > settings.py:MEDIA_ROOT = BASE_DIR+'/media/' > settings.py:MEDIA_URL = '/site_media/' >

Re: Navigation Bar

2007-08-22 Thread Amirouche
On Aug 22, 9:16 pm, Matt Haggard <[EMAIL PROTECTED]> wrote: > I'm becoming accustomed to Django... and I have a design question: > > I have something like this: > > Page1 > - Subpage 1 > - Subpage 2 > - Subsubpage 1 > - Subsubpage 2 > - Subpage 3 > > And I want to create a navigati

Re: merge models for generic view

2007-08-22 Thread Doug B
q = list(a) + list(b) + list(c) q.sort('-date') The problem you have here is the q.sort() method doesn't understand how to compare your objects. '-date' means nothing to it.I'm pretty sure you need to write your own comparison function and pass that to sort. If you've got models with the sam

Re: How to link SVN Django to Python? (for easy update)

2007-08-22 Thread Amirouche
On Aug 22, 6:02 pm, b3n <[EMAIL PROTECTED]> wrote: > I did search but didn't find anything. Probably because the answer is > too obvious... on unix based OS > I'm using Windows XP. Switch to an UNIX based OS then: svn co .../django one solution among other easy one : add to your .bashrc export

Re: subfolder for 'Views'

2007-08-22 Thread hiddenhippo
thanks very much for your reply; it fixed the problem 100%. On Aug 22, 9:50 pm, Jonathan Buchanan <[EMAIL PROTECTED]> wrote: > > polls/ > > __init__.py > > models.py > > views.py > > views/ > > main.py > > main2.py > > You need an __init__.py in your views direct

Re: serving different applications for different domains

2007-08-22 Thread Amirouche
> what I want is to let mysite/urls.py include the other urlconfs > according to the domain. > e.g. let poll.mydomain.com include the mysite/polls/urls.py > blog.mydomain.com => mysite/polls/blog.py > mydomain.com => mysite/hp/urls.py > > is there a way to do this? You could trick the user with

Re: subfolder for 'Views'

2007-08-22 Thread Jonathan Buchanan
> polls/ > __init__.py > models.py > views.py > views/ > main.py > main2.py You need an __init__.py in your views directory as well - Python won't recognise a directory as being a module without it. Jonathan. --~--~-~--~~~---~--~---

ANN: Satchmo 0.5 Release

2007-08-22 Thread Chris Moffitt
I am very pleased to announce that release 0.5 of Satchmo is now available. Satchmo is an Open Source framework for creating unique and robust online stores. It is developed using the Django framework and has many features, including: - 100% template driven design using the django template system

subfolder for 'Views'

2007-08-22 Thread hiddenhippo
Hi, I'm having a slight problem; I've got the 'mysite' django application created as per the example on the help pages. I've created an application called polls which creates polls/ __init__.py models.py views.py All this works fine; i've editing the INSTALLED_APPS within setting

Re: Marty Alchin's AuditTrail

2007-08-22 Thread George Vilches
Kai Kuehne wrote: > Hi, > > On 8/22/07, perrito666 <[EMAIL PROTECTED]> wrote: >> Hello people, i have found a situation where AutidTrail comes very >> handy, but it does not work out of the box on my model, it says here >> http://www.djangoproject.com/weblog/2007/aug/19/djangoroundup/#comments >>

django-atompub: full atom feed support

2007-08-22 Thread James Tauber
I'm interested in getting feedback on my atom.py module which supports the full set of Atom 1.0 elements. http://code.google.com/p/django-atompub/ The project above includes a bunch of test infrastructure, but all you need to download is the atom.py file. If you're creating feeds fr

NameError: name 'django' is not defined .... activating the admin interface...

2007-08-22 Thread jborup
HI Django users, New to python and django. I'm following the www.djangobook.com , and chapter 6 talks about the admin interface. I have done this: Added this to the settings.py: INSTALLED_APPS = ( django.contrib.admin, 'django.contrib.auth', 'django.contrib.contenttypes', 'djang

Re: Marty Alchin's AuditTrail

2007-08-22 Thread Kai Kuehne
Hi, On 8/22/07, perrito666 <[EMAIL PROTECTED]> wrote: > > Hello people, i have found a situation where AutidTrail comes very > handy, but it does not work out of the box on my model, it says here > http://www.djangoproject.com/weblog/2007/aug/19/djangoroundup/#comments > that someone is working o

Marty Alchin's AuditTrail

2007-08-22 Thread perrito666
Hello people, i have found a situation where AutidTrail comes very handy, but it does not work out of the box on my model, it says here http://www.djangoproject.com/weblog/2007/aug/19/djangoroundup/#comments that someone is working on that, does anybody knows if there is an improved version availa

duplicate key error when using cache

2007-08-22 Thread omat
Hi, I am receiving occasional db errors. Looking at the postgres error log, I found the following line, repeating all across the log: ERROR: duplicate key violates unique constraint "cache_pkey" I think this translates: "you are trying to insert an item with a primary key that already exists"

Re: merge models for generic view

2007-08-22 Thread Drasty
On Aug 22, 2:10 pm, "Kai Kuehne" <[EMAIL PROTECTED]> wrote: > It's just an idea... you could cast to list and use extend. For the list: q = list(a) + list(b) + list(c) q.sort('-date') I'm unfamiliar, though with "extend." How do I use it? --~--~-~--~~~---~--~~

Navigation Bar

2007-08-22 Thread Matt Haggard
I'm becoming accustomed to Django... and I have a design question: I have something like this: Page1 - Subpage 1 - Subpage 2 - Subsubpage 1 - Subsubpage 2 - Subpage 3 And I want to create a navigation bar that provides links to the current page and all of the parent pages. So, if

Re: merge models for generic view

2007-08-22 Thread Kai Kuehne
Hi, On 8/22/07, Drasty <[EMAIL PROTECTED]> wrote: > > Is there a way to concatenate model querysets and use the > concatenation as the basis for a date-based generic view? Or, would I > be able to mimic the generic view code but alter it in such a way that > it handles the concatenation? > > (Eac

merge models for generic view

2007-08-22 Thread Drasty
Is there a way to concatenate model querysets and use the concatenation as the basis for a date-based generic view? Or, would I be able to mimic the generic view code but alter it in such a way that it handles the concatenation? (Each of the models would have a DateTimeField called "date") E.g.

Re: queryset cache

2007-08-22 Thread Doug B
> mediaform = CustomMediaForm > # get the initial queryset fo a large table > qs=mediaform.base_fields['somefield'].queryset > > forms = [] > > for i in requested_forms: > form=mediaform(data, auto_id="some_generated_id") > # assign the queryset to the choices > form.base_fields['some

Problems with syncdb

2007-08-22 Thread shabda
When I run the command $ python manage.py syncdb I am getting an error like Failed to install index for auth.Message model: (2006, 'MySQL server has gone away')Installing index for auth.Permission model I am on python 2.3.4, mysql 5.0.46, cent OS. My tables get created though. What can be the pro

Re: editable=False? visible=False?

2007-08-22 Thread Nathaniel Whiteinge
> is there a way to show the value of the field without making it > editable? This isn't possible by throwing an option into your field definition. If you trust your Admin-site users, the easiest thing to do is probably add the disabled [1]_ attribute to the element via custom admin javascript [

Re: using django components outside of django

2007-08-22 Thread James Bennett
On 8/22/07, Lee Connell <[EMAIL PROTECTED]> wrote: > Thanks for response, how do i setup a "minimal" django app? just > create a settings file that describes the model and then import django > and apply those settings? http://www.djangoproject.com/documentation/settings/#using-settings-without-s

Re: How to link SVN Django to Python? (for easy update)

2007-08-22 Thread Jonathan Buchanan
On 8/22/07, b3n <[EMAIL PROTECTED]> wrote: > > I did search but didn't find anything. Probably because the answer is > too obvious... > > I checked out django using SVN but how do I do the next bit? > > "Symlink django_src/django so that django is within your Python site- > packages directory, or

Re: using django components outside of django

2007-08-22 Thread Lee Connell
Thanks for response, how do i setup a "minimal" django app? just create a settings file that describes the model and then import django and apply those settings? On Aug 21, 9:25 pm, "James Bennett" <[EMAIL PROTECTED]> wrote: > On 8/21/07, Lee Connell <[EMAIL PROTECTED]> wrote: > > > I was wonder

newforms.extras.SelectDateWidget + form_for_instance(object)

2007-08-22 Thread Patrick
I have been looking at the Django docs and newforms library tests and I couldn't figure out how to ensure that SelectDateWidget defaults to date_field from instance. Here's my code: from django import newforms as forms from django.newforms.extras import SelectDateWidget form = forms.form_for_ins

Re: deploy django on python-only hosting

2007-08-22 Thread Oin
the problem with putting django in /home/user/pythonlib/ is that i don't have ssh access. I only have ftp, and that ftp points to the web root so i don't know the absolute path. I don't know whether the server uses mod_python or not, but I'm assuming it uses fastcgi. This is the hosting plan: h

Re: How to link SVN Django to Python? (for easy update)

2007-08-22 Thread Ramiro Morales
On 8/22/07, b3n <[EMAIL PROTECTED]> wrote: > > I did search but didn't find anything. Probably because the answer is > too obvious... > > I checked out django using SVN but how do I do the next bit? > > "Symlink django_src/django so that django is within your Python site- > packages directory, or

Re: How to link SVN Django to Python? (for easy update)

2007-08-22 Thread Kai Kuehne
Hi, On 8/22/07, b3n <[EMAIL PROTECTED]> wrote: > > Yeah that's how I've done it at the moment. > > But it's not good! > > Every time I run SVN Update, I would need to copy everything from > django_src to site-packages again. The snippet I quoted above implies > that that's not necessary. If you

Re: How to link SVN Django to Python? (for easy update)

2007-08-22 Thread b3n
Yeah that's how I've done it at the moment. But it's not good! Every time I run SVN Update, I would need to copy everything from django_src to site-packages again. The snippet I quoted above implies that that's not necessary. --~--~-~--~~~---~--~~ You received t

Re: How to link SVN Django to Python? (for easy update)

2007-08-22 Thread Kai Kuehne
Hi, On 8/22/07, b3n <[EMAIL PROTECTED]> wrote: > > I did search but didn't find anything. Probably because the answer is > too obvious... > > I checked out django using SVN but how do I do the next bit? > > "Symlink django_src/django so that django is within your Python site- > packages directory

How to link SVN Django to Python? (for easy update)

2007-08-22 Thread b3n
I did search but didn't find anything. Probably because the answer is too obvious... I checked out django using SVN but how do I do the next bit? "Symlink django_src/django so that django is within your Python site- packages directory, or update your PYTHONPATH to point to it." I'm using Window

Re: How to make a mapping/alias db table? (many-to-many)

2007-08-22 Thread Brian Rosner
On 2007-08-22 04:36:12 -0600, b3n <[EMAIL PROTECTED]> said: > > I got Django to create the table by running 'reset' and then re- > running 'syncdb'. > > manage.py reset > mange.py syncdb > > I thought I read somewhere that syncdb should add the table anyway? > Bug? No, syncdb only creates new

Re: management.py application commands and one off scripts

2007-08-22 Thread George Vilches
Graham Carlyle wrote: > The pending ability to allow custom application commands made me think > about a few on-off scripts i have that i wouldn't want to have available > as a command but do django stuff from the command line. > > Maybe its worth adding a new core command for invoke these sorts

management.py application commands and one off scripts

2007-08-22 Thread Graham Carlyle
The pending ability to allow custom application commands made me think about a few on-off scripts i have that i wouldn't want to have available as a command but do django stuff from the command line. Maybe its worth adding a new core command for invoke these sorts of scripts? Rather than having t

Re: queryset cache

2007-08-22 Thread RajeshD
On Aug 22, 10:21 am, sean <[EMAIL PROTECTED]> wrote: > That's the problem, I don't know how to cache the queryset. > But for what it's worth, here's something i tried. I tried to take > advantage of the default caching of querysets, but that doesn't work > here. > > mediaform = CustomMediaForm >

Re: Variable names in templates

2007-08-22 Thread Tom Badran
Solved, i can use 'template_object_name' in the dict, sorry for the noise, completely missed that first time reading docs. Tom On 8/22/07, Tom Badran <[EMAIL PROTECTED]> wrote: > I have a generic view using object_detail, so in my template i have an > object variable i can use. However i use a t

Variable names in templates

2007-08-22 Thread Tom Badran
I have a generic view using object_detail, so in my template i have an object variable i can use. However i use a template include to do some display, and the template expects the object to have a different name. In my urls the dictionary is setup as: objects_dict = { 'queryset' : Object.objec

Re: deploy django on python-only hosting

2007-08-22 Thread Amirouche
> I only have access to my hosting account via ftp. : / > I can't install anything, wrong, you can install somethings like django and many other python libraries > I believe i have to copy the django directory onto the ftp and then > specify this into the .fcgi, but i don't know how. it's in th

Re: queryset cache

2007-08-22 Thread sean
That's the problem, I don't know how to cache the queryset. But for what it's worth, here's something i tried. I tried to take advantage of the default caching of querysets, but that doesn't work here. mediaform = CustomMediaForm # get the initial queryset fo a large table qs=mediaform.base_field

Re: queryset cache

2007-08-22 Thread RajeshD
On Aug 22, 8:08 am, sean <[EMAIL PROTECTED]> wrote: > Hi all, > I'm running into a performance problem with some pages i created. The > page has multiple forms, which are all the same, with the exception of > the initial data (it's a kind of batch insert functionality), but all > foreign keys an

serving different applications for different domains

2007-08-22 Thread Paul Rauch
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hallo *, I'd like to serve different applications for different domains. imagine my setup like this: mysite/ mysite/urls.py mysite/polls/ mysite/polls/urls.py mysite/blog/ mysite/blog/urls.py mysite/hp/ mysite/hp/urls.py what I want is to let mysite

Re: More than one Django version installed - possible?

2007-08-22 Thread Nimrod A. Abing
I used to do this a while back. Off the top of my head what I did was unpack 0.96 and the svn versions in separate directories. Then using the PYTHONPATH environment variable you should be able to specify which version you want to use. For example: 0.96 is in... ~/Python/libs/django-0.96/django

More than one Django version installed - possible?

2007-08-22 Thread Jarek Zgoda
Is it possible to have installed (and use in different projects) both 0.96 and svn trunk? Any hints? -- Jarek Zgoda Skype: jzgoda | GTalk: [EMAIL PROTECTED] | voice: +48228430101 "We read Knuth so you don't have to." (Tim Peters) --~--~-~--~~~---~--~~ You receiv

Re: Dynamically changing newforms

2007-08-22 Thread Matt
Doug, That's awesome, thanks. It's a shame that it requires an extra database hit after the POST, but that's still infinitely neater than my suggestion. Can you clarify for me what the return statement in form_builder is doing? I'm new to python, but I thought type() was used to determine the da

Re: Can Django be combined with a more powerful ORM?

2007-08-22 Thread Neil Blakey-Milner
On 8/20/07, Stefan Matthias Aust <[EMAIL PROTECTED]> wrote: > SC keeps all persistent data two global dicts that contain other dicts > containing more dicts and arrays. I tried to map the data onto > database tables but doing this, most of the elegance of Python seems > to vanish. My code is actua

queryset cache

2007-08-22 Thread sean
Hi all, I'm running into a performance problem with some pages i created. The page has multiple forms, which are all the same, with the exception of the initial data (it's a kind of batch insert functionality), but all foreign keys and such are identical (and as such lead to the same querysets, th

Re: unicode characters garbled on dumpdata / loaddata using postgres

2007-08-22 Thread Ivan Sagalaev
Wiley wrote: > I was wondering if anyone else had trouble or a workaround for dumping > and loading data with mixed character sets using a postgres backend. > My data has quite a few Chinese characters, they run from my normal > installation fine, but when i dump and reload the data, it's all > co

Re: IntegrityError, MySQL, unicode strings equality (accents and umlauts)

2007-08-22 Thread ludo
It should be a collation issue. mysql> set names utf8; Query OK, 0 rows affected (0.00 sec) mysql> select 'm n'='men'; +--+ | 'm n'='men' | +--+ |1 | +--+ 1 row in set (0.00 sec) You might want to use the SELECT BINARY operator: mysql> select bin

unicode characters garbled on dumpdata / loaddata using postgres

2007-08-22 Thread Wiley
I was wondering if anyone else had trouble or a workaround for dumping and loading data with mixed character sets using a postgres backend. My data has quite a few Chinese characters, they run from my normal installation fine, but when i dump and reload the data, it's all corrupted. Any hints her

Re: How to make a mapping/alias db table? (many-to-many)

2007-08-22 Thread b3n
I got Django to create the table by running 'reset' and then re- running 'syncdb'. manage.py reset mange.py syncdb I thought I read somewhere that syncdb should add the table anyway? Bug? It's a bit annoying having to repopulate the data. If I added the join table manually would Django still w

IntegrityError, MySQL, unicode strings equality (accents and umlauts)

2007-08-22 Thread mezhaka
Hi djangers! I've accidentally bumped into an IntegrityError problem as I added unique_together = (("word", "language"),) to my Keyword class. Debugging the problem I was surprised to discover the following behavior in MySQL shell: mysql> select 'm n'='man'; +--+ | 'm n'='man' | +--

editable=False? visible=False?

2007-08-22 Thread patrickk
when using the field option "editable=False", the field is not displayed in the admin at all. is there a way to show the value of the field without making it editable? e.g, when I insert the current user on save, I´d like to display the user in the change-form without having the possibility to ed

Re: ImageField via admin

2007-08-22 Thread Grigory Fateyev
Hello Carl Karsten! On Tue, 21 Aug 2007 10:21:06 -0500 you wrote: > > Grigory Fateyev wrote: > > Hello Carl Karsten! > > On Mon, 20 Aug 2007 14:07:39 -0500 you wrote: > > > >>> settings.py:MEDIA_ROOT = BASE_DIR+'/media/' > >>> settings.py:MEDIA_URL = '/site_media/' > >>> urls.py:(r'^site_me

deploy django on python-only hosting

2007-08-22 Thread Oin
I would like to deploy django on a hosting package that only includes python (and php, perl). So it doesn't have django installed. I think i already read this: http://www.djangoproject.com/documentation/fastcgi/#running-django-on-a-shared-hosting-provider-with-apache about 10 times, but i still ca

admin_order_field and foreign keys

2007-08-22 Thread eXt
Hi! I've got a class UserProfile that has a FK to django.contrib.auth.models.User class: class UserProfile(models.Model): user = models.ForeignKey(User, unique=True, num_in_admin=1,min_num_in_admin=1, max_num_in_admin=1,num_extra_on_c

Re: How to make a mapping/alias db table? (many-to-many)

2007-08-22 Thread b3n
When I run syncdb, it says: "No fixtures found." If I look in my database using phpmyadmin, I don't see the join table. The only app tables are: mylinks_bookmarks and mylinks_categories If I go into the Python shell and try to add a Category to a Bookmark. It tells me that the table doesn't exi

how to get class name from a relation name

2007-08-22 Thread Grégoire Cachet
Hi, I would like to get the class name from a relation name (OneToOne) For example : class ModelA(models.Model): label = models.CharField(max_length=255) class ModelB(models.Model): a = models.OneToOneField(ModelA) class ModelC(models.Model): a = models.OneToOneField(ModelA) If I

4000 usd every month by the time you can reach or more

2007-08-22 Thread kasim
AGLOCO: The Internet's First Economic Network Today's hottest Internet businesses are all about the power of social networks. Companies like MySpace, Facebook, and YouTube have become worth billions because businesses have realized that these social networks are generating huge advertising and ma

Re: Importing Excel/CVS into Database

2007-08-22 Thread Ben Ford
A quick hack that should work would be to create a DictReader object to read the csv with (have a look in the python docs here). For each row you need to write do: for row in reader: obj = MyDjangoModel() obj.__dict__ = row obj.save() I haven't

Re: GoFlow: a workflow engine for django

2007-08-22 Thread Pigletto
Seems that is what I need (!) but as CorbeChen already stated there should be some docs in English too. In general I took a look at demo, but I'm not sure how should I start using workflow engine in my apps. Short 'How to' (in english) about installation, including download link (or svn path), a