Re: Regex pattern for URL matching

2008-10-06 Thread Merrick
I think this is related to WSGI. On Oct 6, 7:17 pm, Merrick <[EMAIL PROTECTED]> wrote: > That is the approach I took and how I resolved the original problem > with the 404. It led me to find that "AllowEncodedSlashes On" in > Apache is needed for encoded slashes to be allowed in the pathname >

The best Django Forum app?

2008-10-06 Thread Alessandro
I need a forum with basical features, and: - search engine inside titles, posts and users - nice url rewrite (with slugs instead of simple thread ids on urls) - basic user stats (number of posts, send him a PM, signature on every post). Is there anything like this out of the box, or similar and

Re: Regex pattern for URL matching

2008-10-06 Thread Merrick
That is the approach I took and how I resolved the original problem with the 404. It led me to find that "AllowEncodedSlashes On" in Apache is needed for encoded slashes to be allowed in the pathname information following the filename. The problem now is that http%3A%2F%2F prints http:/ in my

Re: Generating widget based on class type for a Custom Form

2008-10-06 Thread Ronny Haryanto
On Tue, Oct 7, 2008 at 7:09 AM, Leon Yeh | New Avenue.net <[EMAIL PROTECTED]> wrote: > I need to generate a different output based if it is a select input type > or it is a text field. > > This code does not work. I am trying to do something like this: > > {% for field in form %} > {% ifequal

Re: Can this be solved without hardcoded SQL?

2008-10-06 Thread Russell Keith-Magee
On Tue, Oct 7, 2008 at 9:46 AM, Alex Ezell <[EMAIL PROTECTED]> wrote: > > On Mon, Oct 6, 2008 at 6:36 PM, Kasper Grubbe <[EMAIL PROTECTED]> wrote: > >> I have a date in my database. And i want to list all years and months >> in that, without duplicates. > >> I can get the data out without

Re: Can this be solved without hardcoded SQL?

2008-10-06 Thread Alex Ezell
On Mon, Oct 6, 2008 at 6:36 PM, Kasper Grubbe <[EMAIL PROTECTED]> wrote: > I have a date in my database. And i want to list all years and months > in that, without duplicates. > I can get the data out without duplicates with this SQL query: > SELECT DATE_FORMAT(my_date_field, '%Y %m') AS

Re: Django model version control

2008-10-06 Thread David Hall
Hi Jonknee, Thanks for the bug report, I've uploaded a patch which should take care of that problem. I've taken the liberty of inviting you to a django-reversion Google discussion group. If you are interested in improving the system, I'd love to hear your feedback and comments! David.

Re: Boosting your productivity when debugging Django apps

2008-10-06 Thread Jeremy Sandell
winpdb has been a life saver for me, as well. I had been using pyDev + Eclipse (for the debugger), with the viPlugin (for my sanity). The amount of ram used just to fire up the debugger made me want to cry. winpdb + vim (with Python bindings) solved that issue very nicely. I can code on my old

Re: Regex pattern for URL matching

2008-10-06 Thread Malcolm Tredinnick
On Mon, 2008-10-06 at 16:10 -0700, Merrick wrote: > keith, thanks for trying. > > %2f is the encoded value of /, but urls contain other characters as > well not just alphanumeric. I think you're debugging the wrong piece of the problem here. Your original regular expression must have been

Re: Multiple ManyToMany relations with the same class

2008-10-06 Thread Malcolm Tredinnick
On Mon, 2008-10-06 at 13:52 -0700, xkill wrote: > Hello, > > I tried to add multiple manytomany fields to a class, that pointing to > the same class. > > For example: > > class person(models.Model): > name = models.CharField(max_length=30) > phone = models.CharField(max_length=9,

Re: Django Hosting Survey

2008-10-06 Thread Kenneth Gonsalves
On Monday 06 October 2008 11:00:41 pm Jeff wrote: > 1. Web Faction - for those that want to get Django up and running as > quickly and easily as possible, using their automated setup. go for 64 mb ram > > OR > > 2. Slicehost - for those that want COMPLETE control of their hosting > environment.

Generating widget based on class type for a Custom Form

2008-10-06 Thread Leon Yeh | New Avenue.net
Hi, I need to generate a different output based if it is a select input type or it is a text field. This code does not work. I am trying to do something like this: {% for field in form %} {% ifequal field.field.widget django.forms.widgets.Select %} {{ field.label_tag }} {{ field.errors }}

Re: Django Admin - Does not see templates, images or templates.

2008-10-06 Thread Keith Eberle
ADMIN_MEDIA_PREFIX is set incorrectly. It should be a URL, not a filesystem path. If you want the admin media files served at http://myhost.com/media/, set the value to '/media/' (which is the default). To serve the admin media, just create a softlink to the admin media files on disk in your

Re: Keyword arguments with spaces and the url tag

2008-10-06 Thread Alexis Bellido
Thanks for the reply. I just submitted it as bug 9315. http://code.djangoproject.com/ticket/9315 Regards. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: Intensive Computations

2008-10-06 Thread Brian Neal
On Oct 6, 5:53 pm, puzzler <[EMAIL PROTECTED]> wrote: > That's why I'm asking now, ahead of programming, for more info about > how hard it is to incorporate an intensive computation into the Django > framework.  It could very well affect my choice of language. It is just python, really. So yes,

Re: dynamic associations?

2008-10-06 Thread Russell Keith-Magee
On Tue, Oct 7, 2008 at 5:53 AM, Alex G <[EMAIL PROTECTED]> wrote: > > Dear django-users, > > Does anyone know of a way to dynamically create an object related to a > model whose name is not known until runtime? Essentially, I have a > situation wherein I need to create this associated object,

Can this be solved without hardcoded SQL?

2008-10-06 Thread Kasper Grubbe
Hi guys. I have a date in my database. And i want to list all years and months in that, without duplicates. For an example i want to print out (only if they exists in the database): 2008: January August December 2007: September December I can get the data out without duplicates with this SQL

Re: Regex pattern for URL matching

2008-10-06 Thread Merrick
While I have not found the complete solution, I am closer. I added this to my apache settings for the virtual host: AllowEncodedSlashes On I am no longer getting a 404. But even though the url has two instances of %2f to represent two slashes:

Re: Resizing images when uploading

2008-10-06 Thread Juanjo Conti
Solved thanks to http://groups.google.com/group/django-users/browse_thread/thread/cae5c5a532a73b6d?pli=1 I was using image.resize instead of image.thumbnail. The second one resize in place. def save(self, **kwargs): super(Foto, self).save(**kwargs) path = self.image.path

Re: adding date to template

2008-10-06 Thread Karen Tracey
On Mon, Oct 6, 2008 at 4:55 PM, KillaBee < [EMAIL PROTECTED]> wrote: > Thanks I have read the forms doc. and it helped a great deal. > now I am get this error:'QueryDict' object has no attribute 'method' > at line 12. > > view: > from django.http import HttpResponse > from

Re: Django Hosting Survey

2008-10-06 Thread Joshua Jonah
I use Media Temple and have never been happier. Jeff wrote: > I am about to begin a new Django project and I am currently evaluating > hosting options. I know there has been a number of discussions on this > topic, and I have read most of them. However, seeing how quickly > things change in the

Re: Regex pattern for URL matching

2008-10-06 Thread Merrick
keith, thanks for trying. %2f is the encoded value of /, but urls contain other characters as well not just alphanumeric. I suspect this issue may have to do with apache or WSGI but not sure what. On Oct 6, 4:06 pm, "Keith Eberle" <[EMAIL PROTECTED]> wrote: > quick solution, i think you could

Re: Regex pattern for URL matching

2008-10-06 Thread Keith Eberle
quick solution, i think you could add the % to the regex (i'm hardly a regex master): r'^find/(?P[%-\w]+)$ keith On Mon, Oct 6, 2008 at 7:05 PM, Merrick <[EMAIL PROTECTED]> wrote: > > I have narrowed down the problem to %2F in my url, anyone? > > > > On Oct 6, 2:55 pm, Merrick <[EMAIL

Re: Regex pattern for URL matching

2008-10-06 Thread Merrick
I have narrowed down the problem to %2F in my url, anyone? On Oct 6, 2:55 pm, Merrick <[EMAIL PROTECTED]> wrote: > \w will only match alphanumeric characters, I need to match anything > and will let my modelform verify that it is indeed a URL. > > On Oct 6, 2:43 pm, Merrick <[EMAIL PROTECTED]>

Re: Intensive Computations

2008-10-06 Thread puzzler
> I don't know much about your background so please forgive me if I give > you obvious advises, but perhaps you'd be better *first* coding the > solution to your problem - eventually looking for help on > comp.lang.python. Then you'll have real facts, not estimations. > Specially if

Re: Boosting your productivity when debugging Django apps

2008-10-06 Thread felix
yes, I get this all the time. the input that I type isn't echoed to the screen/output but it does work. its really annoying. has anyone figured out why or if there's a cure ? otherwise I love using pdb, its invaluable. On Aug 22, 9:33 pm, Tim Chase <[EMAIL PROTECTED]> wrote: > >    

Re: dynamic associations?

2008-10-06 Thread bruno desthuilliers
On 6 oct, 23:53, Alex G <[EMAIL PROTECTED]> wrote: > Dear django-users, > > Does anyone know of a way to dynamically create an object related to a > model whose name is not known until runtime? Essentially, I have a > situation wherein I need to create this associated object, but seem to > have

Re: Intensive Computations

2008-10-06 Thread bruno desthuilliers
On 6 oct, 23:18, puzzler <[EMAIL PROTECTED]> wrote: > > I'm afraid you failed to give enough informations about your > > "intensivecomputation" (ie: what kind ofcomputation, what input data > > does it requires, what does it outputs, is it mostly IO bound or cpu > > bound or else, etc), nor

Re: Regex pattern for URL matching

2008-10-06 Thread Merrick
Thank you, I meant urls.py. APPEND_SLASH = False so I omitted the trailing slash from the regex line: r'^find/(?P[-\w]+)$ and if I pull up the address: http://mydomain.com/find/http%3A%2F%2Fwww.wired.com%2F I still get Not Found The requested URL /find/http://www.wired.com/ was not found on

Re: select_related and intermediary tables

2008-10-06 Thread Alessandro Ronchi
2008/10/3 Robert <[EMAIL PROTECTED]>: > > I've been banging my head against this problem for several days now, > and have decided to ask for help. I've read the Django DB API and > searched this mailing list. > > Assuming the following models: > > http://dpaste.com/82218/ > > What I would like to

Flatpages, get_absolute_url() and ABSOLUTE_URL_OVERRIDES

2008-10-06 Thread John Allen
There are a few fairly recent threads touching this issue - including one of mine - but I'd like to ask a new question. The FlatPage model requires an explicity defined - ie hard-coded - URL and get_absolute_url() is set equal to this hard-coded URL (eg "/ about/"). For my purposes I needed to

Re: check if file exists before uploading | adding a validator to a field

2008-10-06 Thread Carl Meyer
Hi jelle, On Oct 6, 5:34 am, jelle <[EMAIL PROTECTED]> wrote: > Now, what I'd like to do is to write a validator which will check if a > ( renamed ) file is already existing. Writing the validator itself > isnt too hard; I can just use pre_save.connect and call a function > from here. What I do

Re: Regex pattern for URL matching

2008-10-06 Thread Merrick
\w will only match alphanumeric characters, I need to match anything and will let my modelform verify that it is indeed a URL. On Oct 6, 2:43 pm, Merrick <[EMAIL PROTECTED]> wrote: > Thank you, I meant urls.py. APPEND_SLASH = False so I omitted the > trailing slash from the regex line: > >

dynamic associations?

2008-10-06 Thread Alex G
Dear django-users, Does anyone know of a way to dynamically create an object related to a model whose name is not known until runtime? Essentially, I have a situation wherein I need to create this associated object, but seem to have no way of getting at it. I am trying to do it by way of

seeking help in model design...

2008-10-06 Thread paul
hi, I'm designing my first django app and would appreciate any advice how best to organise my models. I have a hierarchal model called Node. this allows me to create a hierarchy of nodes - and perform hierarchal operatoins. So far so good. each node can be of two 'types': 1/ job 2/ shot I

Re: Intensive Computations

2008-10-06 Thread puzzler
> I'm afraid you failed to give enough informations about your > "intensivecomputation" (ie: what kind ofcomputation, what input data > does it requires, what does it outputs, is it mostly IO bound or cpu > bound or else, etc), nor about the expected load. According to these > informations,

Re: Django Hosting Survey

2008-10-06 Thread tupixo
> I am about to begin a new Django project and I am currently evaluating > hosting options. I know there has been a number of discussions on this > topic, and I have read most of them. However, seeing how quickly > things change in the web development / hosting world, I wanted to get > some

Re: Multiple ManyToMany relations with the same class

2008-10-06 Thread James Bennett
On Mon, Oct 6, 2008 at 3:52 PM, xkill <[EMAIL PROTECTED]> wrote: > But it doesn't work, how can I do it? The error message you will receive will tell you what to do. -- "Bureaucrat Conrad, you are technically correct -- the best kind of correct."

Re: django cms outside of django

2008-10-06 Thread Jeff Anderson
chiggsy wrote: >> By "outside of Django" I'm guessing you mean "outside of a web environment" >> > > Yes, that is what i meant. > > >> Yes, you can use Django components separately. At work we use Django's >> ORM for management scripts such as print accounting. >> >> I've set up a

Multiple ManyToMany relations with the same class

2008-10-06 Thread xkill
Hello, I tried to add multiple manytomany fields to a class, that pointing to the same class. For example: class person(models.Model): name = models.CharField(max_length=30) phone = models.CharField(max_length=9, blank=True, null=True) def __unicode__(self): return

Re: adding date to template

2008-10-06 Thread KillaBee
On Oct 6, 1:33 pm, KillaBee <[EMAIL PROTECTED]> wrote: > On Oct 6, 1:29 pm, KillaBee <[EMAIL PROTECTED]> > wrote: > > > > > On Oct 6, 3:40 am, Daniel Roseman <[EMAIL PROTECTED]> > > wrote: > > > > On Oct 6, 5:48 am, KillaBee <[EMAIL PROTECTED]> > > > wrote: > > > > > I have been trying to add

Re: Intensive Computations

2008-10-06 Thread bruno desthuilliers
On 6 oct, 18:46, puzzler <[EMAIL PROTECTED]> wrote: > Let's say I want to provide a web form, where the user enters in some > data. Then, when the user hits the submit button, it triggers a very > computationally intensive program to process that data that will take, > say, 4 or 5 minutes. Is

Re: Resizing images when uploading

2008-10-06 Thread Juanjo Conti
Thanks for your reply, but... Whats resized? It's not in my namespace. 2008/10/4 varikin <[EMAIL PROTECTED]>: > > > > On Oct 3, 4:18 pm, "Juanjo Conti" <[EMAIL PROTECTED]> wrote: >> Hi, I used to use a pre 1.0 svn version of Django. There I had this class: >> >> class Foto(models.Model): >>

Re: Regex pattern for URL matching

2008-10-06 Thread Keith Eberle
it looks like you have mismatched parens, and no trailing slash, which will matter if APPEND_SLASH = True. the regex should look like: r'^find/(?P[-\w]+)/$' should be urls.py too, not views.py. keith On Mon, Oct 6, 2008 at 1:17 PM, Merrick <[EMAIL PROTECTED]> wrote: > > I am trying to

Re: How to add more information to a many-to many relationship related to the model itself with 'symmetrical = True'

2008-10-06 Thread Matrixer
and wonder is there other solution --~--~-~--~~~---~--~~ 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

Re: How to add more information to a many-to many relationship related to the model itself with 'symmetrical = True'

2008-10-06 Thread Matrixer
thanks Karen, and sorry about my poor English for example, the Friedship between the Users should be symmetrical, if I need more fields(as columns in db table) for the relationship, such as create_date, per the docs, I should set symmetrical to False and use a intermediary model class, add

Possible to sort query results by relevance?

2008-10-06 Thread M Godshall
I'm trying to find a simple search solution for django that will allow me to sort the results by relevance (in this case, I'm using MySQL). I've been told that djangosearch and django-search aren't very stable at the moment, and django-sphinx is a little too complicated for my needs right now, so

Re: Django Hosting Survey

2008-10-06 Thread Horst Gutmann
I'm currently running 2 personal sites on a 256MB slice at Slicehost and each one takes about 30MB with one dedicated mod_wsgi daemon process (and perhaps a couple of MBs more for servicing static files through Apache and the database connection). So depending on the size of your application, a

Re: Django Coding Style and PEP 257

2008-10-06 Thread Russell Keith-Magee
On Sat, Oct 4, 2008 at 1:03 AM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > I see that > http://docs.djangoproject.com/en/dev/internals/contributing/#coding-style > prefers docstrings like """Calculates something and returns the > result.""" to those like """Calculate something and return

VIM Plugin: Django Projects

2008-10-06 Thread Gregor Müllegger
Hi Djangonauts! Today i've written a plugin for vim to support django's management commands from within vim like runserver or syncdb etc. It supports settingup multiple projects. Just have a look at the plugin page on vim.org to see all details:

Re: How to add more information to a many-to many relationship related to the model itself with 'symmetrical = True'

2008-10-06 Thread Karen Tracey
On Mon, Oct 6, 2008 at 11:08 AM, Matrixer <[EMAIL PROTECTED]> wrote: > > sorry for that, I didn't mean to post it twice times, I don't know how > to edit the 1st post, so in order to explain more clearly, I deleted > it before posting the second one. > > Thanks Karen, I know the way to create the

Re: adding date to template

2008-10-06 Thread KillaBee
On Oct 6, 1:29 pm, KillaBee <[EMAIL PROTECTED]> wrote: > On Oct 6, 3:40 am, Daniel Roseman <[EMAIL PROTECTED]> > wrote: > > > > > On Oct 6, 5:48 am, KillaBee <[EMAIL PROTECTED]> > > wrote: > > > > I have been trying to add date to my template, but for the life of me > > > have not. > > > > I

Re: adding date to template

2008-10-06 Thread KillaBee
On Oct 6, 3:40 am, Daniel Roseman <[EMAIL PROTECTED]> wrote: > On Oct 6, 5:48 am, KillaBee <[EMAIL PROTECTED]> > wrote: > > > > > I have been trying to add date to my template, but for the life of me > > have not. > > > I have a field in the MYSQL db, and In my models class but when I put > >

Re: Django Hosting Survey

2008-10-06 Thread jonknee
> 2. Slicehost - for those that want COMPLETE control of their hosting > environment. Only drawback (for some) is that everything needs to be > installed from scratch. > > In the case of Slicehost, I am also curious if the 256 slice is > sufficient for most Django apps. > I've got a Slicehost

Re: Django Hosting Survey

2008-10-06 Thread Michael Semcheski
On Mon, Oct 6, 2008 at 1:30 PM, Jeff <[EMAIL PROTECTED]> wrote: > In the case of Slicehost, I am also curious if the 256 slice is > sufficient for most Django apps. You can definitely develop and deploy a small application on a 256MB slice. Whether 256 is enough depends on the nature of your

Re: Django Hosting Survey

2008-10-06 Thread Raymond Cote
Jeff wrote: > >From this, and other sources, I believe the best hosting options to > be: > > 1. Web Faction - for those that want to get Django up and running as > quickly and easily as possible, using their automated setup. > > I cannot comment on Slicehost, but I can say that WebFaction has

Re: select_related and intermediary tables

2008-10-06 Thread Alessandro Ronchi
2008/10/3 Robert <[EMAIL PROTECTED]>: > > I've been banging my head against this problem for several days now, > and have decided to ask for help. I've read the Django DB API and > searched this mailing list. > > Assuming the following models: > > http://dpaste.com/82218/ > > What I would like to

auth.login problems in Django 1.0

2008-10-06 Thread Robocop
Having looked through the archived posts, i found a similar problem that had found no solution: http://groups.google.com/group/django-users/browse_thread/thread/bf056018de75c6b5/12723e786ce0fa6e?lnk=gst=login#12723e786ce0fa6e It looks like django is not actually logging my user in, or not

Re: Django directory

2008-10-06 Thread Felipe Sodré Silva
Thanks for that Daniel! On Mon, Oct 6, 2008 at 12:31 AM, Daniel Hepper <[EMAIL PROTECTED]>wrote: > > Hi, > > if django is in your python path, you can try: > > >>> import django > >>> django.__file__ > > On a side note, it's probably not a good idea to edit anything in your > django installation

Re: No FlatPage matches the given query.

2008-10-06 Thread Matt
I had not. Thanks! On Oct 5, 6:27 pm, John Allen <[EMAIL PROTECTED]> wrote: > Have you looked at these notes on how to get the Practical Django > Projects examples to > work:http://blog.haydon.id.au/2008/08/notes-on-practical-django-projects.html > ?

(newb) ImportError in script but not in interactive shell

2008-10-06 Thread Gerard flanagan
Hello, I have a utility script 'load_data.py' that primes a database with dummy data via the application Models. It sits in my project root directory: myproj/ settings.py manage.py load_data.py ... myapp/ ... When I do 'python manage.py

Django Hosting Survey

2008-10-06 Thread Jeff
I am about to begin a new Django project and I am currently evaluating hosting options. I know there has been a number of discussions on this topic, and I have read most of them. However, seeing how quickly things change in the web development / hosting world, I wanted to get some opinions if the

Intensive Computations

2008-10-06 Thread puzzler
Let's say I want to provide a web form, where the user enters in some data. Then, when the user hits the submit button, it triggers a very computationally intensive program to process that data that will take, say, 4 or 5 minutes. The user is taken to a page that shows a little "waiting"

Regex pattern for URL matching

2008-10-06 Thread Merrick
I am trying to figure out how to match / capture a URL. views.py === urlpatterns = patterns('', url(r'^find/(?P(.*)$', view = 'myapp.views.find', name = 'find' ), when I enter in this address: mydomain.com/find/www.wired.com my view / template are executed, but if

Re: select_related and intermediary tables

2008-10-06 Thread Robert
Thanks for the tips. I have edited my model's layout as you recommended. It seems I was going about it from the wrong starting point. By making the query you suggested (starting at AgencyDoc instead of Documents) I was able to get the information I wanted. You've increased my knowledge a fair

Re: Access logged in user in models?

2008-10-06 Thread Benjamin Buch
I found a way! Am 04.10.2008 um 18:28 schrieb Ulises: > Anyway, I still think that the heavy lifting should be done in a view > and that the template should be in charge of just displaying what has > been sent to it. And I did it in the view... models.py: def get_monthly_expenses(self, user):

Re: (newb) ImportError in script but not in interactive shell

2008-10-06 Thread Gerard flanagan
Karen Tracey wrote: > > If your code contains imports of the form myproj.myapp, then the > directory containing myproj needs to be on your PYTHONPATH when you run > the script. (manage.py shell does this for you automatically so that is > why it works there.) > > Karen > Ah, obvious

Re: How to add more information to a many-to many relationship related to the model itself with 'symmetrical = True'

2008-10-06 Thread Matrixer
sorry for that, I didn't mean to post it twice times, I don't know how to edit the 1st post, so in order to explain more clearly, I deleted it before posting the second one. Thanks Karen, I know the way to create the relationship with symmetrical set to False, and using the intermediary model

Re: Rendering just child template...

2008-10-06 Thread megrez80
Yes this helps, and it works, sort of. The resulting updated container is the entire page, minus the actual data. So I'm wondering, should I use render_to_response (really HttpResponse) to return the rendered HTML, or should I use something else in response to the Ajax.Updater request? Thanks

Re: (newb) ImportError in script but not in interactive shell

2008-10-06 Thread Karen Tracey
On Mon, Oct 6, 2008 at 10:10 AM, Gerard flanagan <[EMAIL PROTECTED]>wrote: > > Hello, > > I have a utility script 'load_data.py' that primes a database with dummy > data via the application Models. It sits in my project root directory: > > myproj/ >settings.py >manage.py >

Re: how to add more information in a model with a many-to-many field to itself, and 'symmetrical=True'

2008-10-06 Thread Karen Tracey
Answered on the other thread started with the same question. Karen --~--~-~--~~~---~--~~ 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: Django 1.0 for brand new site

2008-10-06 Thread Kasper K. Grubbe
There isn't much difference between those two. Use whichever you are most confident with. I use Ubuntu on my laptops because of the great desktop experience, i haven't tried Ubuntu on a server yet as i am happy with Gentoo and Debian. I like Debian because of their stable branch which is very

Re: How to add more information to a many-to many relationship related to the model itself with 'symmetrical = True'

2008-10-06 Thread Karen Tracey
On Mon, Oct 6, 2008 at 7:52 AM, Matrixer <[EMAIL PROTECTED]> wrote: > > in django, it's not allowed to create an intermediary model, when > 'symmetrical' is set to True in this kind of many-to-many > relationship, then how to add more information for the relationship, > is there any good

Re: Why does MySql gives warning? Incorrect string value: '\xE6\x9D\xB1\xE8\xA8\xBC...' for column 'title' at row 1

2008-10-06 Thread tamonash
Thanks for the suggestion :) --~--~-~--~~~---~--~~ 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

Django Admin - Does not see templates, images or templates.

2008-10-06 Thread NoviceSortOf
I'm using Linux Fedora, Apache and mod_python. I have 3 dashboard.css candidates on my system but Django admin will not see any of them... - # locate dashboard.css [RETURNS]

Re: varible reference in template problem

2008-10-06 Thread Daniel Roseman
On Oct 6, 12:46 pm, Stephen Cheng <[EMAIL PROTECTED]> wrote: > Hi django friends > > I got a problem with varible reference in template. the case is like > this: > > I pass a map to a template, I am trying to get map[key], in the case > the key= modelA.id, then I have to use map.modelA.id, then

ModelMultipleChoiceField

2008-10-06 Thread Livia
Como preencher uma LISTBOX com a opção ModelMultipleChoiceField ou similar. Preciso de uma lista dos registros de um determinado arquivo para que eu possa fazer múltiplas escolhas. Por exemplo: quando eu cadastrar um Usuário quero escolher a quais empresas ele pertence. Ok?

Re: installing tiny mce for flatpages

2008-10-06 Thread Brian Neal
On Oct 5, 10:12 pm, Bobby Roberts <[EMAIL PROTECTED]> wrote: > > So you did this > > part?http://code.djangoproject.com/wiki/AddWYSIWYGEditor#UsingTinyMCEwithf... > > > Do you have MEDIA_URL and MEDIA_ROOT setup correctly in settings.py? > > Are you using the development server? Do you have that

How to add more information to a many-to many relationship related to the model itself with 'symmetrical = True'

2008-10-06 Thread Matrixer
in django, it's not allowed to create an intermediary model, when 'symmetrical' is set to True in this kind of many-to-many relationship, then how to add more information for the relationship, is there any good solutions for this, or do I have to use the unsymemtrical one instead and do some

Re: Why does MySql gives warning? Incorrect string value: '\xE6\x9D\xB1\xE8\xA8\xBC...' for column 'title' at row 1

2008-10-06 Thread David Reynolds
On 6 Oct 2008, at 10:14 am, tamonash wrote: > mysql> show create table ac_project_messages; > +- > +- > -- >

how to add more information in a model with a many-to-many field to itself, and 'symmetrical=True'

2008-10-06 Thread Matrixer
in django, it's not allowed to create an intermediary model, when 'symmetrical' is set to True in this kind of many-to-many relationship, then how to add more information for the relationship, is there any good solutions for this, or do I have to use the unsymemtrical one instead and do some

varible reference in template problem

2008-10-06 Thread Stephen Cheng
Hi django friends I got a problem with varible reference in template. the case is like this: I pass a map to a template, I am trying to get map[key], in the case the key= modelA.id, then I have to use map.modelA.id, then it won't work. How can I conquer this? Can I assign modelA.id to another

Re: displaying list from dictionnary -django 1.0

2008-10-06 Thread bruno desthuilliers
On 3 oct, 22:06, "David Durham, Jr." <[EMAIL PROTECTED]> wrote: > On Fri, Oct 3, 2008 at 12:13 PM, tsmets <[EMAIL PROTECTED]> wrote: > > I have an application that records the status of an applications. > > Basically something like : > > _ started-request > > _ started > > _ stop-requested >

Re: a NameError happened when using Meta option 'unique_together'

2008-10-06 Thread Matrixer
thanks, Malcolm On 10月6日, 上午7时40分, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Sun, 2008-10-05 at 06:42 -0700, Matrixer wrote: > > hi, when I was trying to use the Meta option 'unique_together' in my > > Membership model below, a NameError happened, I don't know what the > > problem is, I

Re: displaying list from dictionnary -django 1.0

2008-10-06 Thread tsmets
:( = 1 {% extends "Base.html" %} 2 3 {% block title %}Show Acronyme{% endblock %} 4 5 {% block content %} 6 7 List of deployments for {{ acronym.letters }} 8 9 {% for env, statuses in

Re: a NameError happened when using Meta option 'unique_together' in model

2008-10-06 Thread Matrixer
@_@ thanks Karen On 10月5日, 下午11时34分, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > On Sun, Oct 5, 2008 at 9:47 AM, Matrixer <[EMAIL PROTECTED]> wrote: > > > hi, when I was trying to use the Meta option 'unique_together' in my > > Membership model below, a NameError happened, I don't know what the

check if file exists before uploading | adding a validator to a field

2008-10-06 Thread jelle
Hi, I'm working on an asset managment app, that will rename uploaded files according to a specified nomenclature. Now, what I'd like to do is to write a validator which will check if a ( renamed ) file is already existing. Writing the validator itself isnt too hard; I can just use

Newbie help with limit_choices_to on ManyToMany

2008-10-06 Thread Lars Stavholm
Hi All, I'm rather new to django (and python) so I tend to get lost sometimes: I'm looking to limit the choices in a ManyToMany relationship: class Computer(models.Model): host = models.CharField(max_length = 20, unique = True) def __unicode__(self): return self.host class

Re: Django directory

2008-10-06 Thread Daniel Hepper
Hi, if django is in your python path, you can try: >>> import django >>> django.__file__ On a side note, it's probably not a good idea to edit anything in your django installation because you will loose these changes once you run an update. Maybe have a look at the docs how to define your own

Re: Why does MySql gives warning? Incorrect string value: '\xE6\x9D\xB1\xE8\xA8\xBC...' for column 'title' at row 1

2008-10-06 Thread tamonash
Thanks Malcolm, You solved my problem. These tables were something that I was using from a previous application so all the mess.. As suggested by you, this is what I did. mysql> show create table ac_project_messages; +-

Re: mptt + contrib.comments?

2008-10-06 Thread Jonathan Nelson
@pihentagy: I've looked at it, and the code, but it's not I need, and I wasn't able to get my head around the code that was there to be able to adapt it to what I needed. @Chis: I found that article this week. Thanks. I'm actually porting some of that code for my own project. I'll post a

Re: Why does MySql gives warning? Incorrect string value: '\xE6\x9D\xB1\xE8\xA8\xBC...' for column 'title' at row 1

2008-10-06 Thread krylatij
Set collation to utf-8 I had the same problem with Russian until i change collation for all char field in my DB to utf-8 and default collation for DB --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users"

Re: Sadly shifting to php sob sob. Need help finding right framework

2008-10-06 Thread Erik Allik
I've lately noticed that Drupal is very cool, especially if you know Django. The URL system is similar, source code is elegant and lightweight, it does have forms, and the framework provides a lot of stuff out of the box plus a lot of reusable modules (like Django apps). Erik On

Re: adding date to template

2008-10-06 Thread Daniel Roseman
On Oct 6, 5:48 am, KillaBee <[EMAIL PROTECTED]> wrote: > I have been trying to add date to my template, but for the life of me > have not. > > I have a field in the MYSQL db, and In my models class but when I put > the text box it doesn't post to the db.  No field does. And the > calendar does

Re: Sadly shifting to php sob sob. Need help finding right framework

2008-10-06 Thread ionut
You should try Simfony: http://www.symfony-project.org On Oct 6, 10:12 am, binaryj <[EMAIL PROTECTED]> wrote: > i love Django . but my company is not so cool like me to try out > new things in life. > > Well i know people here would be using python but i guess a lot of > them would have some

Re: Why does MySql gives warning? Incorrect string value: '\xE6\x9D\xB1\xE8\xA8\xBC...' for column 'title' at row 1

2008-10-06 Thread Malcolm Tredinnick
On Mon, 2008-10-06 at 00:29 -0700, tamonash wrote: > I am using webfactional for hosting my site. I created my database > from the control panel with utf8 as the encoding. I want my > application to be able to use other characters than English like > Japanese etc.. This is one of my models:

Why does MySql gives warning? Incorrect string value: '\xE6\x9D\xB1\xE8\xA8\xBC...' for column 'title' at row 1

2008-10-06 Thread tamonash
I am using webfactional for hosting my site. I created my database from the control panel with utf8 as the encoding. I want my application to be able to use other characters than English like Japanese etc.. This is one of my models: class AcProjectMessages(models.Model): milestone_id =

Sadly shifting to php sob sob. Need help finding right framework

2008-10-06 Thread binaryj
i love Django . but my company is not so cool like me to try out new things in life. Well i know people here would be using python but i guess a lot of them would have some php background. The framework i would like to find is phpDjango but i know its not there but a desent frame work

Re: How do I pass along an extra parameter to a view?

2008-10-06 Thread Theme Park Photo, LLC
Well what do you know! Someone went through the exact same thing as I did and documented it here: http://mccormac.org/blog/2007/apr/04/dynamically-serving-static-content-django/ This was exactly what I was looking for. --~--~-~--~~~---~--~~ You received this