Re: How to make responsinator.com working with Django?

2015-03-13 Thread luis zarate
I have this problem with my site, if I put my public site
http://www.solvosoft.com in responsinator.com all iframes are empty.
I guest it's a security configuration to prevent Clickjacking protection.

A proof of concept is writting a simple html page with Iframe.


http://www.solvosoft.com;>


ref.
https://docs.djangoproject.com/en/1.7/ref/clickjacking/#clickjacking-prevention





2015-03-10 13:19 GMT-06:00 James Schneider :

> responsinator.com





-- 
"La utopía sirve para caminar" Fernando Birri

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAG%2B5VyNFzwsTf5UvTpxHSCP3pZyweiCJ2FvW_YN9GY8XzsF8BQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: django beginner

2015-03-13 Thread luis zarate
what is the output of django-admin --version ?

Instructions:
 1) open cmd
2) change your current directory to your work directory
3) run django-admi --version
4) copy and paste the output  here.

The output will be like "1.7.2"

2015-03-13 11:47 GMT-06:00 :

> ok i put the folder that the django-admin file is in at the variables path
> of windows
> i hope that deals with later problems with files
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/e8554c44-f7fa-4ee8-a5b7-52594bc97fb1%40googlegroups.com
> 
> .
>
> For more options, visit https://groups.google.com/d/optout.
>



-- 
"La utopía sirve para caminar" Fernando Birri

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAG%2B5VyPVyy8uBniqn9TZvBFxKRK2pLRBftka_70-Lu2%2B1EoAjw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django OperationalError

2015-03-12 Thread luis zarate
If you deleted your db and created again and the issue persist then maybe
the problem is in your apps.

Try removing db, comment 3th party apps in settings and run migrate with
only django core apps, put again 3th party apps and run migrate.

El jueves, 12 de marzo de 2015, Collin Anderson 
escribió:
> Hi,
> Do you have the correct file path set to your sqlite3 database? Does it
have proper permissions?
> I found a similar issue here:
> https://www.pythonanywhere.com/forums/topic/1814/
>
> Collin
> On Wednesday, March 11, 2015 at 2:04:45 AM UTC-4, Petar Pilipovic wrote:
>>
>> Hey Collin,
>> I have done what have you told me, but I still have that error, I even
created data base on www.pythonanywhere.com, and amend mine setting.py file
to use that db.
>> I have manually deleted database and done syncdb, migrate etc.
>> Here are the output for syncdb, and then I have made mine superuser,
this is the Operational Error.
>> Question: Why is he reporting this template rendering error on line 40?
>> Tank you
>> Best
>> Petar
>> On Tue, Mar 10, 2015 at 6:49 PM, Petar Pilipovic 
wrote:
>>>
>>> Heh, lol, Ok tax Collin I will do that. I was thinking that i need to
delete mine migration from the terminal, but I will try that, tnx
>>>
>>> 10.03.2015. 18.01, "Collin Anderson"  је написао/ла:

 Hi Petar,
 I'm actually not sure why you want to call sqlflush. If you're trying
to clear out the database, you may need to delete the migrations table
manually, but it just might be simpler to delete the either database and
re-create it, rather than the individual tables.
 Collin

 On Friday, March 6, 2015 at 11:24:19 PM UTC-5, Petar Pilipovic wrote:
>
> Hello Collin,
> No the problem is, i have tried to drop mine migrations whit python
manage sqlflush, then I have recreate the db whit
> python manage.py migrate.
> Here this is the all operation whit python manage sqlflush, syncdb,
migrate. I have notice that there was no migration to apply at the end, and
the error is still there.
> Is there something else I can do, or how can I approach this
differently.
> Best
> Petar
> On Fri, Mar 6, 2015 at 11:21 PM, Collin Anderson 
wrote:
>>
>> Hi,
>> The problem is that django_session doesn't exist in your database.
Either it was never created or it was created and then later deleted.
>> Does running manage.py migrate re-create it?
>> Collin
>>
>> On Monday, March 2, 2015 at 11:36:51 PM UTC-5, Petar Pilipovic wrote:
>>>
>>> Hello James, sorry for not uploading mine answer on this mater, I
was busy whit something else this day, ok now back to mine Operational
Error I have got.
>>> I tried to google some solution to this problem had no luck, and I
did what have you told me.
>>> I heave done some
>>> python manage.py sqlflush
>>> and that has gave me this output:
>>> (django17)04:20 ~/mineDjango$ python manage.py sqlflush
BEGIN;DELETE FROM "django_admin_log";DELETE FROM "auth_permission";DELETE
FROM "auth_group";DELETE FROM "auth_group_permissions";DELETE FROM
"django_session";DELETE FROM "auth_user_groups";DELETE FROM
"auth_user_user_permissions";DELETE FROM "account_emailaddress";DELETE FROM
"django_site";DELETE FROM "profiles_profile";DELETE FROM "auth_user";DELETE
FROM "profiles_userstripe";DELETE FROM "account_emailconfirmation";DELETE
FROM "django_content_type";COMMIT;
>>> Then I have done
>>> python manage.py syncdb python manage.py migrate
>>> Output of mine recreating tables are this:
>>> (django17)04:20 ~/mineDjango$ python manage.py syncdbOperations to
perform: Synchronize unmigrated apps: allauth, crispy_forms Apply all
migrations: account, sessions, admin, sites, profiles, contenttypes,
authSynchronizing apps without migrations: Creating tables... Installing
custom SQL... Installing indexes...Running migrations: No migrations to
apply.(django17)04:20 ~/mineDjango$ python manage.py migrateOperations to
perform: Synchronize unmigrated apps: allauth, crispy_forms Apply all
migrations: account, sessions, admin, sites, profiles, contenttypes,
authSynchronizing apps without migrations: Creating tables... Installing
custom SQL... Installing indexes...Running migrations: No migrations to
apply.
>>> Basically I have had no changes in mine attempt to drop and
recreate tables in mine application.
>>> The error is still there.
>>> Error:
>>> Environment:
>>>
>>>
>>>
>>>
>>> Request Method: GET
>>> Request URL: http://copser.pythonanywhere.com/
>>>
>>>
>>> Django Version: 1.7.2
>>> Python Version: 2.7.6
>>> Installed Applications:
>>> ('django.contrib.admin',
>>>  'django.contrib.auth',
>>>  'django.contrib.contenttypes',
>>>  'django.contrib.sessions',
>>>  'django.contrib.messages',
>>>  'django.contrib.staticfiles',
>>>  'profiles',
>>>  

Re: How to track number of visitors on django site

2015-03-10 Thread luis zarate
I know django-statistics ( https://github.com/attuch/django-statistics )
but I have never used

2015-03-10 15:16 GMT-06:00 Andreas Kuhne :

> Hi Vijay,
>
> Thanks for the suggestion, and we are of course using GA (I should have
> mentioned that). The problem is our CEO doesn't like the way GA compiles
> the information and he also feels that it's too slow, he can't get the
> views that he would like.
>
> So we would like to add this information ourselves somehow.
>
> Regards,
>
> Andréas
>
> 2015-03-10 21:40 GMT+01:00 Vijay Khemlani :
>
>> Hmmm... what about the classic Google Analytics?
>>
>> On Tue, Mar 10, 2015 at 5:04 PM, Andreas Kuhne <
>> andreas.ku...@suitopia.com> wrote:
>>
>>> Hi all,
>>>
>>> I would like to be able to track the number of visitors on our website.
>>> We previously had django-tracking installed and a munin node that tracked
>>> the information. Unfortunately we weren't able to continue using it because
>>> it broke our website somehow (I don't remember how).
>>>
>>> Does anyone have any ideas for how to create a similar functionality or
>>> a similar plugin that can be used?
>>>
>>> Regards,
>>>
>>> Andréas
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Django users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to django-users+unsubscr...@googlegroups.com.
>>> To post to this group, send email to django-users@googlegroups.com.
>>> Visit this group at http://groups.google.com/group/django-users.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/CALXYUbnm0zqK9hpH%2BOoSt9tYYeTDu2dGXXhgaE-%2BYiO-9n-LGw%40mail.gmail.com
>>> 
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>  --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to django-users+unsubscr...@googlegroups.com.
>> To post to this group, send email to django-users@googlegroups.com.
>> Visit this group at http://groups.google.com/group/django-users.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CALn3ei10FoMMSTuqO_FdgEGFEEFXDFpiebZ_0hOVahiZs2aAfg%40mail.gmail.com
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CALXYUbnmDac3NTzv8iDFoUx-nfFegPFZDTa5Up4N2hLF%2BpTniQ%40mail.gmail.com
> 
> .
>
> For more options, visit https://groups.google.com/d/optout.
>



-- 
"La utopía sirve para caminar" Fernando Birri

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAG%2B5VyM%3DD_q70FpUNZN2jnMbAC69Wx8Lf4vnFLOubh2qQX8ovg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django 1.7 tutorial part 4, url

2015-03-07 Thread luis zarate
Do you have APPEND_SLASH=False in your settings?

https://docs.djangoproject.com/en/dev/ref/settings/?from=olddocs#append-slash



2015-03-07 10:31 GMT-06:00 luis zarate <luisz...@gmail.com>:

>
>
> 2015-03-06 18:39 GMT-06:00 Collin Anderson <cmawebs...@gmail.com>:
>
> Hi,
>>
>> That seems strange. The error says that there's no question with id=1.
>> Are you sure there's a question with id=1?
>>
>> The ending slash seems important to me. I don't know why it would work
>> without it.
>>
>> Collin
>>
>>
>> On Wednesday, March 4, 2015 at 2:15:32 PM UTC-5, Daniel Altschuler wrote:
>>>
>>> I ran into the following problem with the tutorial.
>>>
>>> When I'm at http://127.0.0.1:8000/polls/1/, I get the expected page:
>>>
>>> What's up? Not much
>>>  The sky
>>>
>>>
>>> However when I try to vote I get the error
>>>
>>> Page not found (404)Request Method:POSTRequest URL:
>>> http://127.0.0.1:8000/polls/1/vote/
>>>
>>> No Question matches the given query.
>>>
>>> You're seeing this error because you have DEBUG = True in your Django
>>> settings file. Change that to False, and Django will display a standard
>>> 404 page.
>>>
>>> After some time I found that something is wrong with the urls. My
>>> polls/urls.py file was:
>>>
>>> -
>>> from django.conf.urls import patterns, url
>>>
>>> from polls import views
>>>
>>> urlpatterns = patterns('',
>>> # ex: /polls/
>>> url(r'^$', views.index, name='index'),
>>> # ex: /polls/5/
>>> url(r'^(?P\d+)/$', views.detail, name='detail'),
>>>
>>> url(r'^(?P\S+)/$', views.search, name='search'),
>>> # ex: /polls/5/results/
>>> url(r'^(?P\d+)/results/$', views.results,
>>> name='results'),
>>> # ex: /polls/5/vote/
>>> url(r'^(?P\d+)/vote/$', views.vote, name='vote'),
>>> )
>>> --
>>>
>>> If I remove the "/" after "vote", then everything works. I had the same
>>> error when attempting to view the results, so I also
>>> removed the "/" after results. My urls.py now looks like
>>>
>>> ...
>>> # ex: /polls/5/results
>>> url(r'^(?P\d+)/results$', views.results,
>>> name='results'),
>>> # ex: /polls/5/vote
>>> url(r'^(?P\d+)/vote$', views.vote, name='vote'),
>>>...
>>>
>>> Can someone explain me what is going on? thanks.
>>>
>>> Note that the file mysite/urls.py is:
>>>
>>> --
>>> from django.conf.urls import patterns, url
>>>
>>> from polls import views
>>>
>>> urlpatterns = patterns('',
>>> # ex: /polls/
>>> url(r'^$', views.index, name='index'),
>>> # ex: /polls/5/
>>> url(r'^(?P\d+)/$', views.detail, name='detail'),
>>>
>>> url(r'^(?P\S+)/$', views.search, name='search'),
>>> # ex: /polls/5/results
>>> url(r'^(?P\d+)/results$', views.results,
>>> name='results'),
>>> # ex: /polls/5/vote
>>> url(r'^(?P\d+)/vote$', views.vote, name='vote'),
>>> )
>>> 
>>>
>>  --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to django-users+unsubscr...@googlegroups.com.
>> To post to this group, send email to django-users@googlegroups.com.
>> Visit this group at http://groups.google.com/group/django-users.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/db705c9f-f8a1-46e6-add8-a637671a603e%40googlegroups.com
>> <https://groups.google.com/d/msgid/django-users/db705c9f-f8a1-46e6-add8-a637671a603e%40googlegroups.com?utm_medium=email_source=footer>
>> .
>>
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> --
> "La utopía sirve para caminar" Fernando Birri
>



-- 
"La utopía sirve para caminar" Fernando Birri

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAG%2B5VyMdQLNS6Ms3%2B7VKa%2BjUpw8yL9Vwa07Z35WP%2BKzNaEm%3DfA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django 1.7 tutorial part 4, url

2015-03-07 Thread luis zarate
2015-03-06 18:39 GMT-06:00 Collin Anderson :

> Hi,
>
> That seems strange. The error says that there's no question with id=1. Are
> you sure there's a question with id=1?
>
> The ending slash seems important to me. I don't know why it would work
> without it.
>
> Collin
>
>
> On Wednesday, March 4, 2015 at 2:15:32 PM UTC-5, Daniel Altschuler wrote:
>>
>> I ran into the following problem with the tutorial.
>>
>> When I'm at http://127.0.0.1:8000/polls/1/, I get the expected page:
>>
>> What's up? Not much
>>  The sky
>>
>>
>> However when I try to vote I get the error
>>
>> Page not found (404)Request Method:POSTRequest URL:
>> http://127.0.0.1:8000/polls/1/vote/
>>
>> No Question matches the given query.
>>
>> You're seeing this error because you have DEBUG = True in your Django
>> settings file. Change that to False, and Django will display a standard
>> 404 page.
>>
>> After some time I found that something is wrong with the urls. My
>> polls/urls.py file was:
>>
>> -
>> from django.conf.urls import patterns, url
>>
>> from polls import views
>>
>> urlpatterns = patterns('',
>> # ex: /polls/
>> url(r'^$', views.index, name='index'),
>> # ex: /polls/5/
>> url(r'^(?P\d+)/$', views.detail, name='detail'),
>>
>> url(r'^(?P\S+)/$', views.search, name='search'),
>> # ex: /polls/5/results/
>> url(r'^(?P\d+)/results/$', views.results,
>> name='results'),
>> # ex: /polls/5/vote/
>> url(r'^(?P\d+)/vote/$', views.vote, name='vote'),
>> )
>> --
>>
>> If I remove the "/" after "vote", then everything works. I had the same
>> error when attempting to view the results, so I also
>> removed the "/" after results. My urls.py now looks like
>>
>> ...
>> # ex: /polls/5/results
>> url(r'^(?P\d+)/results$', views.results,
>> name='results'),
>> # ex: /polls/5/vote
>> url(r'^(?P\d+)/vote$', views.vote, name='vote'),
>>...
>>
>> Can someone explain me what is going on? thanks.
>>
>> Note that the file mysite/urls.py is:
>>
>> --
>> from django.conf.urls import patterns, url
>>
>> from polls import views
>>
>> urlpatterns = patterns('',
>> # ex: /polls/
>> url(r'^$', views.index, name='index'),
>> # ex: /polls/5/
>> url(r'^(?P\d+)/$', views.detail, name='detail'),
>>
>> url(r'^(?P\S+)/$', views.search, name='search'),
>> # ex: /polls/5/results
>> url(r'^(?P\d+)/results$', views.results,
>> name='results'),
>> # ex: /polls/5/vote
>> url(r'^(?P\d+)/vote$', views.vote, name='vote'),
>> )
>> 
>>
>  --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/db705c9f-f8a1-46e6-add8-a637671a603e%40googlegroups.com
> 
> .
>
> For more options, visit https://groups.google.com/d/optout.
>



-- 
"La utopía sirve para caminar" Fernando Birri

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAG%2B5VyOWaZTFBsSR6uirUXu1ZX%3DLhx-jKnHuyLTGSBoYVx-AkQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Embedding a compiler to my web page

2015-03-07 Thread luis zarate
You should want to read about subprocess

https://docs.python.org/3.4/library/subprocess.html

Install your favorite compiler and call it with subprocess as a comand line
program.

2015-03-07 9:01 GMT-06:00 Snehasish Sen :

> How can I embed a c/c++ compiler to my site which can host a programming
> competetion
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/2a2fae63-cb65-41e1-af5c-d67d30c21eb8%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
"La utopía sirve para caminar" Fernando Birri

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAG%2B5VyM2yKJDZXLnndEHn%3DoVn1siTeVOeh5YsNuh5hwan2VFLw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Form In modal

2015-03-04 Thread luis zarate
Fast solution:
In Javascritp you can do this:

element = document.getElementById("myinput");
window.open("http://127.0.0.1:8000/consulta/?consulta="+element.value,
"MsgWindow", "width=200, height=100");


but continue reading


Are you use ajax?
If the answer is not, then see https://github.com/yceruto/django-ajax.

A concept problem is there, modal is a interface view (in the browser) and
your method refresh the page (It is a GET Request).

I don't know what kind of framework you are using, but in general you can
do something like this:



Operadora  Tipo
CLAROMOVEL



$("#mymodal").modal();




for more information see
http://getbootstrap.com/javascript/#modals
http://jqueryui.com/dialog/

PD: You can do better implementation if you are using django ajax



2015-02-26 13:08 GMT-06:00 Emerson Luiz :

> Hi,
>
> I have the following problem:
>
> I need to set up a form, that when the OK button is clicked, it passes a
> parameter and open a modal with the result.
> Today the query works as follows:
>
> http://127.0.0.1:8000/consulta/?consulta=31
>
> The 31 is the parameter.
>
> return:
>
> Operadora  TipoCLAROMOVEL
>
>
>
> Thanks
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/9f8e5cbb-45a0-464d-9047-6ccfdc0a4757%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
"La utopía sirve para caminar" Fernando Birri

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAG%2B5VyMbtAjJH30MYDMe4S1M%2Bdfo7w7gGB8SSc%3DrJBqaZFxaNg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Using proxy kind of Table in Admin Interface

2015-03-04 Thread luis zarate
Maybe you can use get_queryset in the admin class and replace the query
manager

ref:
https://docs.djangoproject.com/en/1.7/ref/contrib/admin/#django.contrib.admin.ModelAdmin.get_queryset

https://docs.djangoproject.com/en/1.7/topics/db/managers/

you can do something like this:

def get_queryset(self, request):
"""
Returns a QuerySet of all model instances that can be edited by the
admin site. This is used by changelist_view.
"""
if request.user.is_superuser:
qs = self.model.superuser_manager.get_queryset()
else:
qs = self.model._default_manager.get_queryset()

ordering = self.get_ordering(request)
if ordering:
qs = qs.order_by(*ordering)
return qs

2015-03-01 17:06 GMT-06:00 Rootz :

> Question.
> How would one go about designing the django table(s) so that I can assign
> each user account/group a different Model Manager using the same table in
> the Django admin interface?
>
> After doing some reading the closest that comes to this is the Proxy Model
> but I tried adding the proxy model manually into the django admin and got
> an error while loading it.
>
> My goal is to create one table that returns a custom QuerySet unique to a
> user group or user account. Adding to this I would like for this to be
> visible in the admin interface. Can you guide me as to how can achieve this.
>
> thank you
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/cd13f5ab-633e-4361-a621-cfc11d5d01a5%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
"La utopía sirve para caminar" Fernando Birri

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAG%2B5VyNCYpSs0quBUVPSiTgUsApP9tD_F0JwnwLxwiuSpyM8nQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.