Pete Hardie | 2 Oct 2010 04:52
Picon

Re: Django expertise?

Thanks for the input, guys.  I'll give it a go.

On Fri, Oct 1, 2010 at 19:08, Rev. Johnny Healey <rev.null@...> wrote:
> Use the existing django User model.  So many things expect it that you'll
> regret using anything else.
>
> sent from my shoe phone
>
> On Oct 1, 2010 7:02 PM, "Pete Hardie" <pete.hardie@...> wrote:
>> On Fri, Oct 1, 2010 at 18:47, Richard Bronosky <Richard@...>
>> wrote:
>>> Don't ask to ask. Ask.
>>
>> "Do. Or do not. There is no try" :)
>>
>>>
>>> On 10/1/10, John Anderson <sontek@...> wrote:
>>>> Ask the questions
>>>>
>>>>
>>>>
>>
>> Ok, I'm trying to build up a website, and was going to create a suer
>> table in teh DB when I found the Django
>> User class. My big question is: are there any reasons not to use the
>> User class for my user table? I've seen the
>> tutorial that mentions setting up a relationship to the User table for
>> storing the app-specific data, so I know that it's
>> doable, but is it wise? Are there issues that might make me wish I
>> had used my own table?
(Continue reading)

Pete Hardie | 14 Nov 2010 05:26
Picon

Re: Django expertise?

Ok, I've gotten some progress with the user stuff, and have another question

I'd like the regular users to be sent to a different place then th
admin users when they log in - the admin user's would go to the
admin interface, and the rest to the application pages (which I will be writing)

The problem is, when I add in the line in urls.py to catch the result
of the login of a user, all the logins get sent there, not just
the nonadmin ones.

I have not been able to craft a search query that finds anything that
tells me if this is possible.

On Fri, Oct 1, 2010 at 22:52, Pete Hardie <pete.hardie@...> wrote:
> Thanks for the input, guys.  I'll give it a go.
>
>
> On Fri, Oct 1, 2010 at 19:08, Rev. Johnny Healey <rev.null@...> wrote:
>> Use the existing django User model.  So many things expect it that you'll
>> regret using anything else.
>>
>> sent from my shoe phone
>>
>> On Oct 1, 2010 7:02 PM, "Pete Hardie" <pete.hardie@...> wrote:
>>> On Fri, Oct 1, 2010 at 18:47, Richard Bronosky <Richard@...>
>>> wrote:
>>>> Don't ask to ask. Ask.
>>>
>>> "Do. Or do not. There is no try" :)
>>>
(Continue reading)

Richard Bronosky | 14 Nov 2010 05:41

Re: Django expertise?

I think you may be trying to do too much in the urls.py. Send all
logged in users to a view that uses the following tools:

user.is_staff
http://docs.djangoproject.com/en/dev/topics/auth/#django.contrib.auth.models.User.is_staff

redirect
http://docs.djangoproject.com/en/dev/topics/http/shortcuts/#django.shortcuts.redirect

On Sat, Nov 13, 2010 at 11:26 PM, Pete Hardie <pete.hardie@...> wrote:
> Ok, I've gotten some progress with the user stuff, and have another question
>
> I'd like the regular users to be sent to a different place then th
> admin users when they log in - the admin user's would go to the
> admin interface, and the rest to the application pages (which I will be writing)
>
> The problem is, when I add in the line in urls.py to catch the result
> of the login of a user, all the logins get sent there, not just
> the nonadmin ones.
>
> I have not been able to craft a search query that finds anything that
> tells me if this is possible.
>
>
>
> On Fri, Oct 1, 2010 at 22:52, Pete Hardie <pete.hardie@...> wrote:
>> Thanks for the input, guys.  I'll give it a go.
>>
>>
>> On Fri, Oct 1, 2010 at 19:08, Rev. Johnny Healey
(Continue reading)

Pete Hardie | 14 Nov 2010 15:35
Picon

Re: Django expertise?

On Sat, Nov 13, 2010 at 23:41, Richard Bronosky <Richard@...> wrote:
> I think you may be trying to do too much in the urls.py. Send all
> logged in users to a view that uses the following tools:
>
> user.is_staff
> http://docs.djangoproject.com/en/dev/topics/auth/#django.contrib.auth.models.User.is_staff
>
> redirect
> http://docs.djangoproject.com/en/dev/topics/http/shortcuts/#django.shortcuts.redirect

I shall give those a try.  I was suspecting that I was trying to do
more than the paradigm expected

>
> On Sat, Nov 13, 2010 at 11:26 PM, Pete Hardie <pete.hardie@...> wrote:
>> Ok, I've gotten some progress with the user stuff, and have another question
>>
>> I'd like the regular users to be sent to a different place then th
>> admin users when they log in - the admin user's would go to the
>> admin interface, and the rest to the application pages (which I will be writing)
>>
>> The problem is, when I add in the line in urls.py to catch the result
>> of the login of a user, all the logins get sent there, not just
>> the nonadmin ones.
>>
>> I have not been able to craft a search query that finds anything that
>> tells me if this is possible.
>>
>>
>>
(Continue reading)


Gmane