Django application source code

2009-11-14 Thread sanju m
I am new in Django Please share any simple Django application source code with AJAX support, for reference. I am planing to develop an account managing web application in Django. If any one have source code of account managing web application in Django, please share with me for reference. -- You

Re: django-tagging causing str error

2009-11-14 Thread Karen Tracey
On Fri, Nov 13, 2009 at 11:42 PM, neridaj wrote: > I'm using django-tagging and I think it's causing an error when I try > to access the admin page. If I comment out the urls that reference > django-tagging views the error goes away. > > from django.conf.urls.defaults import * > from blog.models

View only django admin

2009-11-14 Thread Low Kian Seong
Dear all, What I need is a view only django admin. Asking on the channel, people there have suggested databrowse, which is great and all but my requirements is that I need a search similar to what is in django admin. Thinking about it all I need is the django admin object list with the ability to

Re: Auth and Sites in Admin

2009-11-14 Thread Carlos Ricardo Santos
I don't know for auth... neither sites... But to disable stuff from admin you just: admin.site.unregister(TheTargetModel) on urls.py [] 2009/11/15 Zeynel > > Is it possible to remove "Auth" and "Sites" sections from the Admin > panel? > > -- > > You received this message because you are subsc

Re: django-tagging causing str error

2009-11-14 Thread neridaj
Oops, sorry about that. Here is the error: TemplateSyntaxError at /admin/ Caught an exception while rendering: 'str' object is not callable admin/base.html, error at line 30 30 {% url django-admindocs-docroot as docsroot %} On Nov 14, 1:47 am, Daniel Roseman wrote: > On Nov 14, 4:42 am, n

Auth and Sites in Admin

2009-11-14 Thread Zeynel
Is it possible to remove "Auth" and "Sites" sections from the Admin panel? -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django

ManyToOne to auth.models.User

2009-11-14 Thread TiNo
Hi, In my apps, Users of the app participate in a certain Year. I would like a Year to continue a ManyToOne relationship with a User. As creating a ForeignKey on a User is not possible, what would be the best way to do this? I don't need a full-blown profile for a user, just this connection with a

Re: Many to many relation - parents without any children

2009-11-14 Thread Tomasz Zieliński
On 14 Lis, 23:20, Nagy Károly wrote: > Please help me in orm level filtering many-to-many relations. > > I have to filter all "authors" who does not belongs to any "articles". > Or the opposite of this, list of orphaned articles... > > I dont want to write sql in the model if possible. How abou

Many to many relation - parents without any children

2009-11-14 Thread Nagy Károly
Please help me in orm level filtering many-to-many relations. I have to filter all "authors" who does not belongs to any "articles". Or the opposite of this, list of orphaned articles... I dont want to write sql in the model if possible. Thank you, Charlie. -- You received this message because

Mediatemple/Django

2009-11-14 Thread kurious oranj
Has anyone tried the Mediatemple/Django grid component? Does it work nice? -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-

viewing and adding comments while editing an object in the admin interface

2009-11-14 Thread adball
I'm using the django.contrib.comments app in Django 1.1 and would really like to be able to enter contents for objects while editing them in the admin interface. Specifically, I have a Member model which represents a person who is a member of an organization and want users of the admin interface t

Re: weird error on django basic blog

2009-11-14 Thread Bobby Roberts
they are in there though? Now i'm getting a diff error On Nov 14, 2:27 pm, Carlos Ricardo Santos wrote: > I can only see that you're missing the > templates_path/blog/post_archive_day.html > template. > > 2009/11/14 Bobby Roberts > > > > > anyone know what this traceback means? > > >http://www.

Re: weird error on django basic blog

2009-11-14 Thread Carlos Ricardo Santos
I can only see that you're missing the templates_path/blog/post_archive_day.html template. 2009/11/14 Bobby Roberts > anyone know what this traceback means? > > > http://www.thecigarcastle.com/blog/2009/nov/1/my-first-blog-post/ > > -- > > You received this message because you are subscribed t

weird error on django basic blog

2009-11-14 Thread Bobby Roberts
anyone know what this traceback means? http://www.thecigarcastle.com/blog/2009/nov/1/my-first-blog-post/ -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from th

Re: User.objects.filter( theUser.get_profile().paid='No' )

2009-11-14 Thread Carlos Ricardo Santos
Thanks for the help, Karen, Solved :D Django is really so simple... I just keep thinking it has limits... The limit is only the mind. -- Karen's way: *User.objects.filter( profile__paid='N' )* #works great! Or even another way I found now: *profiles= UserProfile.objects.

Re: User.objects.filter( theUser.get_profile().paid='No' )

2009-11-14 Thread Karen Tracey
On Sat, Nov 14, 2009 at 11:21 AM, Carlos Ricardo Santos < carlosricardosan...@gmail.com> wrote: > Hi, > > I extended the user class with a UserProfile, with the Django docs > tutorial. > But now I need to do a query to list all users that haven't payed > (pay='No'). > > > I tried something like th

User.objects.filter( theUser.get_profile().paid='No' )

2009-11-14 Thread Carlos Ricardo Santos
Hi, I extended the user class with a UserProfile, with the Django docs tutorial. But now I need to do a query to list all users that haven't payed (pay='No'). I tried something like this: *User.objects.filter( User.get_profile().paid='No' )* or *User.objects.filter( User.profile.paid='No' )* Bu

Re: Is there a way to integrate php to a django app?

2009-11-14 Thread Alex Robbins
I guess the answer depends on what you mean by "integrate." If you have both written parts that serve html pages, just setup apache configs so that part of the urls are routed to django and the other urls are routed to php. Another way to integrate would be by setting up one of the installs as an

Re: Is anybody using django-tracking ?

2009-11-14 Thread Fedya
It looks interesting, especially GoogleAnalyticsMiddleware. On Nov 6, 2:29 pm, Johan wrote: > Is anybody using django-tracking (http://code.google.com/p/django- > tracking/) and if so is it any good ? Is there any other applications > that does this type of logging? -- You received this message

Re: Increment a value in a database table field

2009-11-14 Thread Karen Tracey
On Sat, Nov 14, 2009 at 10:25 AM, Denis Bahati wrote: > Hi, > Here is my model am using to update items status. > > class User(models.Model) > users = models.ForeignKey(User) > resources = models.ForeignKey(Resource) >date_tracked = models.DateTimeField('Date T

Re: New user login problem

2009-11-14 Thread Zeynel
I figured that "active" and "staff" need to be checked as explained here: http://docs.djangoproject.com/en/dev/faq/admin/ Does anybody know how to make admin "view only" for a user? This paragraph from the above appears to explain a similar process: How do I limit admin access so that objects ca

Can't execute SQL functions in app_name/sql/*.sql (IndexError: tuple index out of range)

2009-11-14 Thread Monika Sulik
I have two SQL functions that I'd like to use in Django. They both work no problem if I paste them into psql (PostgreSQL's shell). As I have the same problem with both, I'll just post and explain the simpler one. It looks like this: CREATE OR REPLACE FUNCTION skater_name_match(INTEGER,VARCHAR) RET

Re: Increment a value in a database table field

2009-11-14 Thread Denis Bahati
Hi, Here is my model am using to update items status. class User(models.Model) users = models.ForeignKey(User) resources = models.ForeignKey(Resource) date_tracked = models.DateTimeField('Date Tracked') description = models.TextField() statu

Re: why doesn't this display as a text area in the admin?

2009-11-14 Thread Karen Tracey
On Sat, Nov 14, 2009 at 9:47 AM, Bobby Roberts wrote: > Specifically, why doesn't Definition show up as a text area in /admin: > > It does when I cut and paste your defs into a test project. Thus there doesn't seem to be anything wrong with the code you posted, so your seeing different results i

Django not recognizing a GeoDjango model

2009-11-14 Thread arnav khare
As GeoDjango is now integrated into Django framework, it should be able to recognize GeoDjango models. But, as soon as I add "from django.contrib.gis.db import models" instead of "from django.db import models", Django stops recognizing the app and gives this error: Error: App with label locat

Re: My project is not detecting the geodjango application

2009-11-14 Thread arnav khare
I have the same problem as soon as I add "from django.contrib.gis import models" instead of "from django.db import models", the "sqlall" command gives this error: Error: App with label location could not be found. Are you sure your INSTALLED_APPS setting is correct? As soon as I add "from django.d

why doesn't this display as a text area in the admin?

2009-11-14 Thread Bobby Roberts
Specifically, why doesn't Definition show up as a text area in /admin: class DictionAid (models.Model): Id = models.AutoField(primary_key=True) Term = models.CharField (max_length=50, blank=False, db_index=True) Definition = models.TextField (max_length=1000, blank=False)

New user login problem

2009-11-14 Thread Zeynel
Hello, I am creating a new user successfully but I cannot login with that new user. I make sure that username and pw (case sensitive) are correct. Is there more to creating a new user? -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to

Re: Questions about ContentType generic relations

2009-11-14 Thread esatterwh...@wi.rr.com
You might want to do a search on django-tagging. this has been done and done well. On Nov 13, 6:04 pm, Continuation wrote: > How do I do queries when ContentType is involved? > > Using the example in the doc > (http://docs.djangoproject.com/en/dev/ref/contrib/contenttypes/#id1 > ) > > class Tagg

Re: How to use French accent on django template?

2009-11-14 Thread Andy Mikhailenko
The problem is not in templates. Probably either a view or a template tag does something wrong to the caption string. If Django hides the traceback, try testing each module separately. The simplest way to evade the "raise wrapped" is to raise an exception right _before_ rendering data prepared by y

Re: QuerySet Question

2009-11-14 Thread Chris
I have got tracks working with the extra() function. I do the following: tracks.extra(select={'owned':'SELECT Count(*) FROM shop_track_owners WHERE track_id=shop_track.id and user_id='+str(user.id)}) This works great for tracks. However, how will I do this when I'm just passing a queryset of albu

Re: CSV to JSON snippet

2009-11-14 Thread Zeynel
Great, thank you. When I ran it in the command prompt it worked fine. I noticed that the first column needs to be "pk" with rows starting with integers. On Nov 13, 11:24 pm, Karen Tracey wrote: > On Fri, Nov 13, 2009 at 10:57 PM, Zeynel wrote: > > Thanks, I tried but this did not work either: >

Re: django-tagging causing str error

2009-11-14 Thread Daniel Roseman
On Nov 14, 4:42 am, neridaj wrote: > I'm using django-tagging and I think it's causing an error when I try > to access the admin page. If I comment out the urls that reference > django-tagging views the error goes away. > > from django.conf.urls.defaults import * > from blog.models import Entry, L

Re: Questions about ContentType generic relations

2009-11-14 Thread Daniel Roseman
On Nov 14, 12:04 am, Continuation wrote: > How do I do queries when ContentType is involved? > > Using the example in the doc > (http://docs.djangoproject.com/en/dev/ref/contrib/contenttypes/#id1 > ) > > class TaggedItem(models.Model): >     tag = models.SlugField() >     content_type = models.Fo