Re: New User Stuck on Tutorial Part 2

2010-05-10 Thread Old Davy
On 05/10/2010 08:18 PM, Shawn Milochik wrote: Exactly what directory is your copied template in? It's most likely not in the right place. Ensure that you have a template dir that your settings knows about, and that template dir has a subdirectory called 'admin' where that file is placed.

Re: Problem_Inline_max_num

2010-05-10 Thread Rolando Espinoza La Fuente
On Mon, May 10, 2010 at 5:06 PM, Dj Gilcrease wrote: > On Mon, May 10, 2010 at 3:29 PM, Javier Guerra Giraldez > wrote: >> On Mon, May 10, 2010 at 11:23 AM, carlos wrote: >>> I'm sorry but this is a translation of google >> >>

Re: New User Stuck on Tutorial Part 2

2010-05-10 Thread Shawn Milochik
Exactly what directory is your copied template in? It's most likely not in the right place. Ensure that you have a template dir that your settings knows about, and that template dir has a subdirectory called 'admin' where that file is placed. Shawn -- You received this message because you

Re: django takes all my toys

2010-05-10 Thread Jason R. Leveille
On May 10, 9:31 pm, "ah...@cs.ucla.edu" wrote: > Hi, > > I don't know very much about django, except that a piece of software > that one of my colleagues developed requires it to function properly. > > My problem is as follows : I have inherited responsibility for > installing

Re: Problem_Inline_max_num

2010-05-10 Thread Ramiro Morales
On Mon, May 10, 2010 at 6:06 PM, Dj Gilcrease wrote: > On Mon, May 10, 2010 at 3:29 PM, Javier Guerra Giraldez > wrote: >> On Mon, May 10, 2010 at 11:23 AM, carlos wrote: >>> I'm sorry but this is a translation of google >> >>

django takes all my toys

2010-05-10 Thread ah...@cs.ucla.edu
Hi, I don't know very much about django, except that a piece of software that one of my colleagues developed requires it to function properly. My problem is as follows : I have inherited responsibility for installing the aforementioned software on a pre-existing webserver which already hosts

New User Stuck on Tutorial Part 2

2010-05-10 Thread llanitedave
Using Ubuntu 10.04... I'm just starting out on django and going through the tutorials. Everything installed, got the polls working in parts 1 and 2 of the tutorial, and I think I'm sailing. Then I get to the bottom of Part 2, to the section "Customize the admin look and feel". In settings.py I

Re: How to define different user types?

2010-05-10 Thread Nick
Yeah, this is built in to django. You are on the right track with user.contrib.auth. If you are doing this all from the admin then it's as simple as creating a few groups, giving them the permisions you want and then assigning users to those groups. If you are doing it on a front facing site,

Paginating search results

2010-05-10 Thread Nick
I'm trying to paginate results from a search with multiple options. The only problem is, once I hit the next button it clears the query and I'm left paginating all the objects in the DB. Here is my view: def filter_search(request): if request.POST: reps = Rep.objects.all() else:

Re: Bug in Django auth

2010-05-10 Thread zweb
thanks so much Allison. That was the reason. test account I was using had is_superuser set to 1 in DB. Spent 4 hours debugging it. Thanks a lot. On May 10, 2:44 pm, Alisson Patrício wrote: > Maybe you're logged in with a superuser, superuser can do everything :) > >

Re: Bug in Django auth

2010-05-10 Thread Alisson Patrício
Maybe you're logged in with a superuser, superuser can do everything :) On Mon, May 10, 2010 at 3:52 PM, zweb wrote: > I displayed following values in my html template. I am running it on > wsgi, python 2.5 and Django 1.1.1 on webfaction. > {{perms.user}}Value

File replacer mix-in

2010-05-10 Thread Mick
Hey. I needed a fix to make some (but not all) models in an existing app delete the previous content of a FileField after update. I figured out a workaround, but should I be wary of anything with this implementation, or is there a better way to do it? Thanks. -Mick. from

Re: Problem_Inline_max_num

2010-05-10 Thread Dj Gilcrease
On Mon, May 10, 2010 at 3:29 PM, Javier Guerra Giraldez wrote: > On Mon, May 10, 2010 at 11:23 AM, carlos wrote: >> I'm sorry but this is a translation of google > > even worse, it's a google translation of a text without punctuations. It isnt all

Re: Problem_Inline_max_num

2010-05-10 Thread Javier Guerra Giraldez
On Mon, May 10, 2010 at 11:23 AM, carlos wrote: > I'm sorry but this is a translation of google even worse, it's a google translation of a text without punctuations. -- Javier -- You received this message because you are subscribed to the Google Groups "Django users"

Bug in Django auth

2010-05-10 Thread zweb
I displayed following values in my html template. I am running it on wsgi, python 2.5 and Django 1.1.1 on webfaction. {{perms.user}}Value displayed: set([]) {{perms.core}}Value displayed: set([]) {{perms.core.add_project}} Value Displayed: True ( BUG: should be false as perms.user and

Problem_Inline_max_num

2010-05-10 Thread carlos
Hola, tengo un problema con django 1.2 rc 1 en los Inline bueno paso a explicarles, antes en la version 1.1.1 cuando colocaba un max_num = 20 me los pintaba bien ahora que pongo max_num = 9 me los pinta bien pero una ves que sobrepaso ese valor no funciona algo esta pasando con la version de 1.2

Re: Localeurl and django-multilingual

2010-05-10 Thread Alessandro Ronchi
2010/5/10 Nuno Maltez > How are you creating the url for the links? Are you using the {% url > %} tag and reverse() functions? It should work, we have sites with > localeurl and django-multilingual running fine in production. > > I solved with your solution. Thanks. --

Re: Help Requested: Getting Started with Django

2010-05-10 Thread Steven Degutis
There is no 'full version' as far as I know. You're meant to write the project along with the tutorial and by the time you complete the 4 tutorials, you will have a full django project. This is how I got my feet wet with django, and afterwards I used all the thorough documentation as a reference

Re: Django App and Memory Mgmt

2010-05-10 Thread Ross
On May 6, 7:04 pm, Graham Dumpleton wrote: > On May 7, 4:40 am,Ross wrote: > > > I have a Django app that selects one of many possible XML documents, > > parses it with minidom.parse(), finds all elements of a certain tag > > with

Re: Django App and Memory Mgmt

2010-05-10 Thread Ross
Thanks for that Bill. I was wondering if that was the case, as my SAX knowledge is purely anecdotal and I haven't played with it. Thanks for the summary. I'll read up on that... Ross. On May 6, 4:41 pm, Bill Freeman wrote: > You may want to consider using a sax based

Re: MacPorts installation, Django $PATH issue

2010-05-10 Thread HelloWorld
So for future users who have the same problem. I uninstalled the macports version of django with this: sudo port -f uninstall and then reinstalled with easy setup which automatically puts the django package in the correct place. Now everything worked as described in the tutorial. Could be

How to copy project folder from one folder location to another

2010-05-10 Thread Gath
Am using eclipse+pydev to build my django apps. I created a new workspace, built a new pydev project then created an empty folder in the new pydev project. In that empty folder i imported my old django application. Eclipse copied all the files & folders from my old django location to the new

Importing schema from xsd file

2010-05-10 Thread MarC
Hi, I'm relatively new to Django and I've seen that there is some work done to export a Django model to an XSD spec (http://bitbucket.org/ eegg/django-model-schemas/wiki/Home). Does anybody know any library to go the other way round (from XSD to Django)? Best MarC -- You received this message

Re: django with mod_wsgi on centos

2010-05-10 Thread Ivan Uemlianin
@Graham see my reply this morning to your post on the modwsgi list: http://groups.google.com/group/modwsgi/browse_thread/thread/a157d0eba50b826a @Sam I didn't change the home directory permissions on either machine: they seem to have different default settings (775 on ubuntu, 700 on centos).

Re: Pass variable to all templates

2010-05-10 Thread zinckiwi
Write yourself a context processor and register it in your settings.TEMPLATE_CONTEXT_PROCESSORS. For example, registering myapp.context_processors.template_defaults: # myapp/context_processors.py def template_defaults(request): return { "BASE_TEMPLATE": "base/base.html",

Re: django with mod_wsgi on centos

2010-05-10 Thread Sam Walters
Yes, +1 to forgetting to update permissions at some stage of the game. Best approarch to all this stuff is to make an interactive bash script so wen you update a production server you just run the script. Or document the steps, its often the smaller obvious steps which catch people out. On Mon,

Re: django with mod_wsgi on centos

2010-05-10 Thread Graham Dumpleton
On May 10, 10:42 pm, Ivan Uemlianin wrote: > Dear All > > The nginx/fastcgi set up is now working (there's an easy-to-follow > howto on the django advent site [1]). > > Embarrasingly I may have stumbled upon what was getting me 403s with > mod_wsgi, and it's nothing to do with

Re: django with mod_wsgi on centos

2010-05-10 Thread Ivan Uemlianin
Dear All The nginx/fastcgi set up is now working (there's an easy-to-follow howto on the django advent site [1]). Embarrasingly I may have stumbled upon what was getting me 403s with mod_wsgi, and it's nothing to do with apache or mod_wsgi. After setting up nginx with fastcgi I got the same

Re: django with mod_wsgi on centos

2010-05-10 Thread Graham Dumpleton
On May 10, 7:25 pm, Tom Evans wrote: > On Mon, May 10, 2010 at 9:39 AM, Ivan Uemlianin wrote: > > Dear Kenneth > > > Thanks for your suggestion. > > > I tried > > >    $ chmod -R a+x mysite > > > (where mysite is the django site directory) > > > and

Representing a directional ManyToManyField on self

2010-05-10 Thread Xavier Ordoquy
Hi, I am looking at a decent way to represent a directional many to many relation with a legacy database. Currently, I have a class Person with a parents / children relation on itself. The many to many table has a parent and a child column. There is no id field. Up to now, I have used this

How to define different user types?

2010-05-10 Thread signallock
Hi all, I'm a Python n00b but find Django very useful for me. However, there is a problem in my recent project which needs several user roles. For example, the 'user' role can browse some information and submit some register forms, the 'admin' role can view and verify these forms and/or modify

Re: MacPorts installation, Django $PATH issue

2010-05-10 Thread HelloWorld
Thanks a lot backdoc!! I found the site packages you mentioned, but neither Python 2.5 nor 2.6 have any django in it. I know that on the commandline it is running version 2.5 and django is freshly installed and so could need 2.6. How could I install it there? I start to think the Macports

Re: Localeurl and django-multilingual

2010-05-10 Thread Nuno Maltez
How are you creating the url for the links? Are you using the {% url %} tag and reverse() functions? It should work, we have sites with localeurl and django-multilingual running fine in production. Nuno On Sat, May 8, 2010 at 12:34 PM, Alessandro Ronchi wrote: > I

Re: django with mod_wsgi on centos

2010-05-10 Thread Tom Evans
On Mon, May 10, 2010 at 9:39 AM, Ivan Uemlianin wrote: > Dear Kenneth > > Thanks for your suggestion. > > I tried > >    $ chmod -R a+x mysite > > (where mysite is the django site directory) > > and stopped and started apache, but no effect. > > I'm finding nginx a lot easier to

Re: django with mod_wsgi on centos

2010-05-10 Thread Ivan Uemlianin
Dear Kenneth Thanks for your suggestion. I tried $ chmod -R a+x mysite (where mysite is the django site directory) and stopped and started apache, but no effect. I'm finding nginx a lot easier to work with than apache, especially CentOS' apache. My plan now is to get rid of apache

Pass variable to all templates

2010-05-10 Thread janedenone
Hi, my Django project has several apps, and each app contains a constant named APPLABEL. This constant should be passed to all templates, but I'd like to avoid adding it to each rendering context manually. Is that possible? Thanks, Jan -- You received this message because you are subscribed to

Re: Thread safety, transactions and best practices

2010-05-10 Thread Silvio
I would split the model into two fields, date and counter. That way, you can use the F() function easily, instead of having to do the calculation in the code. See http://docs.djangoproject.com/en/dev/topics/db/queries/#filters-can-reference-fields-on-the-model for help on how to add 1 with a

wierd template issue with perms (django auth)

2010-05-10 Thread zweb
I have {% if perms.core.add_project %} which is expected to be false but it is returning true. I am running it on webfaction (mod_wsgi, python 2.5 , django 1,1,1). I do {{perms.user}} in my html on webfaction and I get - perms: set([u'core.view_project']) which is correct. and