Re: project help

2011-12-30 Thread Jesramz
Here it is again: https://github.com/wtrevino/django-djobberbase/wiki On Dec 31, 12:39 am, Jesramz wrote: > I found something promising https://github.com/wtrevino/ > django-djobberbase/wiki">Djobberbase. In case this helps anybody > else. > > On Dec 30, 2:10 am, Jesramz wrote: > > > > > > > >

Re: project help

2011-12-30 Thread Jesramz
I found something promising https://github.com/wtrevino/ django-djobberbase/wiki">Djobberbase. In case this helps anybody else. On Dec 30, 2:10 am, Jesramz wrote: > Thank you Denis!  django-userena seems great. Im glad I asked for > advice. > > Im a noob so I dont quite get pinax fully. > > On De

Re: Misfiring signal handler

2011-12-30 Thread akaariai
If you can create a self-contained small example project which does this, it would make it much easier to debug this. I don't know why the signal misfired, and I don't see a way that it could misfire. So, without some ability to reproduce this it is hard to help. - Anssi On Dec 30, 5:40 pm, Jay W

Managers of related fields

2011-12-30 Thread Daniel Kaplun
I have Articles that refer to Authors using ForeignKey(related_name='articles'). Given an Author author, I'd like to be able to use the default manager for author.articles, but I'd also like to have author.published_articles, using a custom manager. Is this possible? -- You received this message

Unable to display static content.

2011-12-30 Thread Chirdeep
Hi All, I am just learning Python and Django. I am able to see the webpage but css and images are not picked up. Configuration as below: Linux Ubuntu 11.04 Python 2.7.2 Django 1.3.1 I have setup Django using VirtualEnv. I am using PyCharm and my Django project is pointing to the VirtualEnv Djan

Re: django-admin.py startproject will NOT work.

2011-12-30 Thread Chris Kavanagh
On Dec 30, 8:10 am, Ramiro Morales wrote: > On Fri, Dec 30, 2011 at 1:32 AM, Chris Kavanagh wrote: > > Hi, I'm using WinXP, Python27, django 1.3.1. > > > When I try django-admin.py startproject mysite, I get a "Usage django- > > admin.py subcommand [options] [args]" listing of commands instead

Re: What does login() and logout() actually do?

2011-12-30 Thread David Zheng
Thanks. On Fri, Dec 30, 2011 at 4:55 PM, Mario Gudelj wrote: > Hey, > > All that code is in django.contrib.auth. The login() function is is in > views.py in that directory. > > Cheers, > > > > On 31 December 2011 11:34, David Zheng wrote: > >> Hi, all. >> >> In Django Document - User authenticat

Re: What does login() and logout() actually do?

2011-12-30 Thread David Zheng
Yeah, that's what i want. Thanks. On Fri, Dec 30, 2011 at 4:50 PM, Sebastian Goll wrote: > On Fri, 30 Dec 2011 16:34:13 -0800 (PST) > David Zheng wrote: > > > Does anyone know where can I find the source code of the login() and > > logout() function or any articles talking about these two functi

Re: What does login() and logout() actually do?

2011-12-30 Thread Mario Gudelj
Hey, All that code is in django.contrib.auth. The login() function is is in views.py in that directory. Cheers, On 31 December 2011 11:34, David Zheng wrote: > Hi, all. > > In Django Document - User authentication in Django, it talks about how > to log a user in and out. But I really what to

Re: What does login() and logout() actually do?

2011-12-30 Thread Sebastian Goll
On Fri, 30 Dec 2011 16:34:13 -0800 (PST) David Zheng wrote: > Does anyone know where can I find the source code of the login() and > logout() function or any articles talking about these two functions in > detail. I really need to know what happens behind the scene to better > understand Django's

Re: django-admin.py startproject will NOT work.

2011-12-30 Thread Chris Kavanagh
On Dec 30, 3:43 pm, Timothy Makobu wrote: > Hi, > > If you can, upload a screenshot of the command prompt with the commands > entered herehttps://droplr.comand send us the link. > > I'm not sure you'll be able to see the screenshot at the link, it's very > small. So, here's a copy/paste of it fr

What does login() and logout() actually do?

2011-12-30 Thread David Zheng
Hi, all. In Django Document - User authentication in Django, it talks about how to log a user in and out. But I really what to know what happens under the hood when calling the functions login() and logout(). There is little content concerned with this topic. I've read almost every article or docu

Re: django-admin.py startproject will NOT work.

2011-12-30 Thread Chris Kavanagh
On Dec 30, 3:43 pm, Timothy Makobu wrote: > Hi, > > If you can, upload a screenshot of the command prompt with the commands > entered herehttps://droplr.comand send us the link. > > Certainly, thanks. https://droplr.com/images > > > > > > -- You received this message because you are subscrib

Re: Show deactived radio button on a form

2011-12-30 Thread Mario Gudelj
I think you may need a HTML or JS solution here. Check out this SO post http://stackoverflow.com/questions/1953017/why-cant-radio-buttons-be-readonly Cheers, On 31 December 2011 05:29, CrabbyPete wrote: > I have the following form: > > DEAL_CHOICES = [ >('Standard','Standard'),

Re: django-admin.py startproject will NOT work.

2011-12-30 Thread Timothy Makobu
Hi, If you can, upload a screenshot of the command prompt with the commands entered here https://droplr.com and send us the link. On Fri, Dec 30, 2011 at 10:13 PM, Chris Kavanagh wrote: > > > On Dec 30, 9:42 am, Kev Dwyer wrote: > > Chris Kavanagh wrote: > > > Hi, I'm using WinXP, Python27, dj

Re: django-admin.py startproject will NOT work.

2011-12-30 Thread Chris Kavanagh
On Dec 30, 9:42 am, Kev Dwyer wrote: > Chris Kavanagh wrote: > > Hi, I'm using WinXP, Python27, django 1.3.1. > > > When I try django-admin.py startproject mysite, I get a "Usage django- > > admin.py subcommand [options] [args]" listing of commands instead of > > starting the project in mysite f

Re: django-admin.py startproject will NOT work.

2011-12-30 Thread Chris Kavanagh
On Dec 30, 8:10 am, Ramiro Morales wrote: > On Fri, Dec 30, 2011 at 1:32 AM, Chris Kavanagh wrote: > > Hi, I'm using WinXP, Python27, django 1.3.1. > > > When I try django-admin.py startproject mysite, I get a "Usage django- > > admin.py subcommand [options] [args]" listing of commands instead

RE: model for legacy table without primary key

2011-12-30 Thread Sells, Fred
Thanks, that's the hack I was trying to remember. -Original Message- From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On Behalf Of akaariai Sent: Friday, December 30, 2011 1:06 PM To: Django users Subject: Re: model for legacy table without primary key On De

Re: model for legacy table without primary key

2011-12-30 Thread K.C. Smith
You said the four fields are unique together, but "userid" sounds like it should also be unique be itself, in which case it could be your PK. In either case, you are being a bit an4l about something that matters little. You should probably just create another column for an auto- incrementing PK.

Re: no plus-sign to add related object in admin

2011-12-30 Thread K.C. Smith
Hi, Oleg. I've discovered the issue (for my case, anyway). It goes beyond the field definition. The issue is that the FK fields which have no plus sign also have no independent admin pages. Instead, they are administered underneath another object as inlines. I have code in "admin.py" that is a

Show deactived radio button on a form

2011-12-30 Thread CrabbyPete
I have the following form: DEAL_CHOICES = [ ('Standard','Standard'), ('Sponsored','Sponsored'), ('Trial' ,'Trial') ] class ApplyForm(forms.Form): deal_type= forms.ChoiceField( required = True,

Re: model for legacy table without primary key

2011-12-30 Thread akaariai
On Dec 30, 7:53 pm, Bill Beal wrote: > But it can't be a primary key if the values are not unique, right? > The four fields are unique together, but not necessarily individually. It is not a real primary key. The idea is to tell Django it is a primary key even if it is not. And hope everything

Re: model for legacy table without primary key

2011-12-30 Thread Bill Beal
But it can't be a primary key if the values are not unique, right? The four fields are unique together, but not necessarily individually. Bill Beal On Fri, Dec 30, 2011 at 12:49 PM, akaariai wrote: > You could just define some arbitrary column as primary key. Primary > key doesn't play any imp

Re: model for legacy table without primary key

2011-12-30 Thread akaariai
You could just define some arbitrary column as primary key. Primary key doesn't play any important part in most select queries. It might be that some queries would break (like Django trying to group by the fake PK column when aggregating), but most things should just work. This is what I have done

model for legacy table without primary key

2011-12-30 Thread Sells, Fred
I thought I had read somewhere that it was possible to have a model for a legacy table without a primary key as long as the useage was read only and that the method was "filter" and not "get". I've been searching for quite a while now and all I can find indicates a primary key is mandatory for any

Re: no plus-sign to add related object in admin

2011-12-30 Thread Oleg Korsak
Hi. Could you paste full field definition in your case? I have same problem and looks like I know when it doesn't have plus sign 2011/12/30 K.C. Smith : > Thanks for your input.  I think you're probably right about non- > editable objects.  Unfortunately, that's not it in this case. > > K.C. > > O

Re: no plus-sign to add related object in admin

2011-12-30 Thread K.C. Smith
Thanks for your input. I think you're probably right about non- editable objects. Unfortunately, that's not it in this case. K.C. On Dec 29, 4:07 pm, Furbee wrote: > Just taking a stab in the dark, are the ones without the + sign editable in > the Admin? If they are not editable, I would imagi

Misfiring signal handler

2011-12-30 Thread Jay Wineinger
Hey guys, I have an odd problem where a post_save signal handler is getting called from a class different than what I specified as the sender. The code is at http://dpaste.com/hold/679348/ and also below for when the pastebin is deleted. I'm connecting the rating_denormalizer() function to the po

Re: django-admin.py startproject will NOT work.

2011-12-30 Thread Kev Dwyer
Chris Kavanagh wrote: > Hi, I'm using WinXP, Python27, django 1.3.1. > > When I try django-admin.py startproject mysite, I get a "Usage django- > admin.py subcommand [options] [args]" listing of commands instead of > starting the project in mysite folder. . .I've tried every workaround > I've fou

Re: Django-admin disable plus sign

2011-12-30 Thread Denis Darii
Also take a look at this ticket: https://code.djangoproject.com/ticket/9071 On Fri, Dec 30, 2011 at 3:38 PM, Denis Darii wrote: > You can rewrite the *has_add_permission* method of your admin class and > return False for your user. > More info here: > https://docs.djangoproject.com/en/1.3/ref/co

Re: Django-admin disable plus sign

2011-12-30 Thread Denis Darii
You can rewrite the *has_add_permission* method of your admin class and return False for your user. More info here: https://docs.djangoproject.com/en/1.3/ref/contrib/admin/#django.contrib.admin.ModelAdmin.has_add_permission On Fri, Dec 30, 2011 at 3:21 PM, torgia wrote: > If I have a model with a

Re: Django-admin disable plus sign

2011-12-30 Thread Oleg Korsak
I know a dirty hack - try to change your field from: fld = models.ForeignKey('ModelName', ... to: fld = models.ForeignKey('package.ModelName', ... This is why I DON'T have "+" sign... but I need it :) 2011/12/30 torgia : > If I have a model with a Foreignkey field, the django admin shows a > plus

Django-admin disable plus sign

2011-12-30 Thread torgia
If I have a model with a Foreignkey field, the django admin shows a plus button so you can add the related objects on the spot. Is there a way to disable this functionality for some models without editing user permission ? -- You received this message because you are subscribed to the Google Grou

Re: django-admin.py startproject will NOT work.

2011-12-30 Thread Ramiro Morales
On Fri, Dec 30, 2011 at 1:32 AM, Chris Kavanagh wrote: > Hi, I'm using WinXP, Python27, django 1.3.1. > > When I try django-admin.py startproject mysite, I get a "Usage django- > admin.py subcommand [options] [args]" listing of commands instead of > starting the project in mysite folder. . .I've t

django-admin.py startproject will NOT work.

2011-12-30 Thread Chris Kavanagh
Hi, I'm using WinXP, Python27, django 1.3.1. When I try django-admin.py startproject mysite, I get a "Usage django- admin.py subcommand [options] [args]" listing of commands instead of starting the project in mysite folder. . .I've tried every workaround I've found on Google & on this site. I've p

Re: sorting of foreign key elements

2011-12-30 Thread 软刀
may be attribute ModelAdmin.ordering can work for you , it was in docs/ref/contrib/admin/index.txt attribute:: ModelAdmin.ordering Set ordering to spcify how lists of objects should be ordered in the Django admin views. This should be a list or tuple in the same format as a models's django.db

sorting of foreign key elements

2011-12-30 Thread Jaroslav Dobrek
Hello, is there a way to change the order in which foreign key elements are displayed in the admin interface? I have got a model Currency that has a field currency_id: currency_id = models.ForeignKey(CurrencyID) ("Currencies" are language-dependent ways of referring to currencies, "Currency

Re: project help

2011-12-30 Thread Jesramz
Thank you Denis! django-userena seems great. Im glad I asked for advice. Im a noob so I dont quite get pinax fully. On Dec 28, 2:33 am, Denis Darii wrote: > You can also consider to use pinax:http://pinaxproject.com/ > > or userena for accounts:http://django-userena.org/ > > Denis. > > On Tue,