On Tue, Aug 2, 2011 at 11:53 AM, somecallitblues <mario.gud...@gmail.com> wrote:
> Hey guys,
>
> I'm creating a site where multiple users will enter their details and
> get access to admin I want to create from them .I want to use default
> Django admin as a kind of Super User access for myself. I don't want
> these users to have access to Super User admin.
>
> I want them to have their own admins where they can enter some
> details, sync with an external web service and create some reports
> with the data I pull in from an external site.
>
> So, the way I imagine this is customer comes to my site and signs up.
> I generate a kind of console for them. They can access it via
> www.mysite.com/customername/console/ and get the reports from the
> console.
>
> What I'm not sure about is the following:
>
> -Can this be done in Django?

Yes. This sounds like a fairly vanilla usage of Django.

> -Would I use the inbuilt auth framework that's used also in admin or
> would I create another? I mean, should I create another Model for
> these users or use the existing one that's enabled in applications?

Unless you have some very specific requirements that the default auth
User doesn't provide (and can't provide through use of a Profile
model), the default Django admin should be enough.

> -Also,  how would I setup my urls.py to deal with this type of URL
> www.mysite.com/customername/console/? Should I just set it up to parse
> www.mysite.com/whatever/console/ and then use views.py to match the /
> customername/ part and pull in the info accordingly?

Essentially, yes. Set up a URL pattern that is something like:

   url(r'^(?P<customername>[a-zA-Z0-9_-]+)/console/$', console_view,
name='console-home')

And a view:

def console_view(request, customername):
   ...

and you're off and running. If your console will be more than a single
view, there are a bunch of things you could do to avoid duplicating
the <customername> bit of the URL pattern in multiple URL patterns:

 * You could wrap all the console URLs in a separate urls.py file and
include() it at the top level;

 * You could define your console as a class, and use a get_urls()
method to do dispatch internally (see the source for Django's admin
for an example of this)

> I'm learning Django at the moment and it looks like a framework I can
> use for this project, but I just wanted to make sure this can be done
> before spending more time on it.

Everything you've described here sounds like fairly vanilla Django.

Best of luck!

Yours,
Russ Magee %-)

-- 
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-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to