Re: how to build a CAS

2020-04-02 Thread Dyron Abreus
check this out https://github.com/django-cas-ng/django-cas-ng

On Thu, Apr 2, 2020 at 6:05 AM avinash prajapati 
wrote:

> Can anyone help me to build a centralized authentication server or suggest
> best ways do it.
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/02ace9ef-1465-4baf-9af5-1281c39ccbde%40googlegroups.com
> 
> .
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CA%2B8HVKa-99ZgXW702C9Os4K2u8D1g2igy3KYrT73PtHdDCYUvg%40mail.gmail.com.


Re: Mobile friendly admin

2020-04-02 Thread Tim Graham
What version of Django are you using?

https://github.com/elky/django-flat-responsive is an extension for the 
Django admin that makes the interface mobile-friendly. It's part of Django 
2.0 and later. 

On Wednesday, April 1, 2020 at 4:02:57 AM UTC-4, guettli wrote:
>
> I know there a several third party packages which try to improve the great 
> django admin:
>
> See: https://djangopackages.org/grids/g/admin-interface/
>
> A lot of packages are already outdated. AFAIK no sane and simple default 
> package exists.
>
> I think the only solution to this would be an improvement which is not a 
> third party package.
>
> With other words: An update of the original admin. AFAIK no major change 
> is planed by
> the core developers, or am I missing something?
>
> My goal: mobile friendly admin interface.
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/d3987c89-2f1a-43cf-8314-becf2b456b8d%40googlegroups.com.


Re: Can't find the .sql file when config the MySQL as backend server

2020-04-02 Thread Kasper Laudrup

https://stackoverflow.com/help/how-to-ask

--
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/76137de8-04c4-7967-a157-05442d24cfd3%40stacktrace.dk.


Which Application server is best for django deployment on Windows server 2012R2 flatform

2020-04-02 Thread Surendranath Kuchi
Dear all,

I am new to django and python. I would like to know which Application server is 
best for to deploy and consider as a production environment. Our infrastructure 
is window based. Currently we have Windows server 2012R2.
Kindly let me know free application servers for commercial use.

Thanks in advance.

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/8d48096e-9fa3-44ad-89b2-d907c963daad%40googlegroups.com.


Can't find the .sql file when config the MySQL as backend server

2020-04-02 Thread Anirudh choudhary


-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAL8_rkGVzh_ONQDyhurzGv7J3bhdNqxWhWS-cyUkt6fi71r%2BSg%40mail.gmail.com.


Re: heroku hosting apllication error

2020-04-02 Thread sagar ninave
I just delete all process and redeployed it

On Thu, 2 Apr 2020 at 4:07 PM, o1bigtenor  wrote:

>
>
> On Thu, Apr 2, 2020 at 4:01 AM sagar ninave  wrote:
>
>> thanks for reply
>>
>> but problem is solved now
>>
>> Hmm - - - - to assist anyone else that has run into this problem it
> would
> likely be quite useful if you posted what you did to fix things - - -
> please?
>
> Regards
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAPpdf5-CQactgT%2B51r1XfFgLSizdT9Ah2gKDTkTCdDjbuDOJZw%40mail.gmail.com
> 
> .
>
-- 

sagar ninave
about.me/sagarninave


-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAA6pdZ_r71Xh3vWD2tYrhb-0Z-Z821cHi5m0jWMOOgQGbRQc9A%40mail.gmail.com.


Using a custom AdminSite subclass

2020-04-02 Thread Oliver Kraitschy
Hello everybody,

I'm using a custom AdminSite subclass. But since the update from Django 
2.0.13 to 2.2.12 I'm having problems to get it recognized when creating or 
running migrations.

This is what I have in hal/admin.py:

from django.contrib import admin

class HalAdminSite(admin.AdminSite):
# ...

admin_site = HalAdminSite()
admin_site.register(Profile)
# ...


This is what I have in hal/apps.py:

from django.contrib.admin.apps import AdminConfig

class HalAdminConfig(AdminConfig):
default_site = 'hal.admin.HalAdminSite'


This is what I have in settings.py:

INSTALLED_APPS = [
# 
'hal.apps.HalAdminConfig',
# ...
]


Nevertheless I get the following exceptions when running *makemigrations* or 
*migrate*:


*AttributeError: module 'hal.admin' has no attribute 'HalAdminSite'
ImportError: Module "hal.admin" does not define a "HalAdminSite" 
attribute/class*Any hints about how I can fix this? That would be really 
appreciated!.


Greetings
Oliver

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/3771ea7d-1144-48ee-9060-933fd6837e5a%40googlegroups.com.


ModuleNotFoundError: No module named 'apidjangowithjwt.emailservice'

2020-04-02 Thread Kumar Sanu
https://stackoverflow.com/questions/60870963/modulenotfounderror-no-module-named-apidjangowithjwt-emailservice

Attached is the folder structure of Project.

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/8fb0541b-6f23-43d3-916b-9ef60456b636%40googlegroups.com.


Re: While clicking on an image need to perform some python code based on the image url

2020-04-02 Thread Kasper Laudrup

https://stackoverflow.com/help/how-to-ask

--
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/557193bf-13ad-2369-8a7c-894d272a39e5%40stacktrace.dk.


While clicking on an image need to perform some python code based on the image url

2020-04-02 Thread sharu kuriakose
-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/6ddf469d-4cfb-4a8a-b128-91d1e7af96c0%40googlegroups.com.


Re: Populate script not working

2020-04-02 Thread jay sharma
Sir hi I am aman , look at following error message:
django.contrib.auth.models.DoesNotExist: User matching query does not
exist.


So on this my suggestion is

What you importing from django.contrib.auth.models
first check that needed query is present at above or not...

On Wed, Apr 1, 2020, 11:54 PM Jeff Waters  wrote:

> I've created a population script to test my website - please see below -
> but I get the following error message:
> django.contrib.auth.models.DoesNotExist: User matching query does not exist.
>
> Given that I've created a hypothetical user, I'm not sure why this is?
>
> Any suggestions would much appreciated.
>
> Thank you.
>
> Jeff
>
> EDIT : I have done both makemigrations and migrate.
>
> import os
> import django
>
> os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'mynowandthen.settings')
> django.setup()
>
> from django.contrib.auth.models import User
> from nowandthen.models import Picture, Comment, UserProfile
>
> def populate():
> banana_user = [{'username': 'Banana','email': 'ban...@cat.com',
> 'password': 'Banana1234'},]
> johann_user = [{'username': 'Banana', 'email': 'ban...@cat.com',
> 'password': 'Banana1234'},]
> wmffre_user = [{'username': 'Wmffre', 'email': 'wmf...@cat.com',
> 'password': 'Wmffre1234'},]
>
>
> maryhill_comments = [{'user': banana_user,
> 'body': 'wowo I love this photo - reminds me of when I used to
> live there!'},
> {'user': johann_user,'body': 'I love Maryhill - its such a pretty
> part of Glasgow lol'},
> {'user': wmffre_user,'body': 'gonnae no dae that lol', 'user_id':
> 3}]
>
> fireworks_comments = [{'user': banana_user,'body': 'amazing fireworks
> - thanks for sharing :)'},
> {'user': johann_user,'body': 'love fireworks, love this, love
> YOU!'},
> {'user': wmffre_user,'body': 'whoop!'}]
>
> cityscape_comments = [{'user': banana_user,'body': 'more pics like
> this one please!!'},
> {'user': johann_user,'body': 'what a sucky picture hahah'},
> {'user': wmffre_user,'body': 'great - love it!'}]
>
> pics = {'Maryhill': {'comments': maryhill_comments,
>  'image':
> 'shared_pics/View-from-kitchen-window-of-Maryhill-tenements.1970.jpg',
>  'title': 'Maryhill Laundry',
>  'description': 'back view',
>  'tag_one': 'Maryhill',
>  'tag_two': 'Laundry',
>  'era': '1970s',
>  'likes': 64},
> 'Fireworks': {'comments': fireworks_comments,
>   'image': 'shared_pics/fireworks.jpg',
>   'title': 'Glasgow Fireworks',
>   'description': 'Fireworks at Glasgow Green',
>   'tag_one': 'Glasgow',
>   'tag_two': 'Fireworks',
>   'era': '2010s',
>   'likes': 32},
> 'Cityscape': {'comments': cityscape_comments,
>   'image': 'shared_pics/glasgow_cityscape_copy.jpg',
>   'title': 'Glasgow Cityscape',
>   'descrpition': 'View over Glasgow',
>   'tag_one': 'Cityscape',
>   'tag_two': 'Glasgow',
>   'era': '1990s',
>   'likes': 16}}
>
> for pic, pic_data in pics.items():
> p = add_picture(pic,
> pic_data['image'],
> pic_data['title'],
> pic_data['description'],
> pic_data['tag_one'],
> pic_data['tag_two'],
> pic_data['era'])
> for c in pic_data['comments']:
> add_comment(c[0], c[1])
>
> for p in Picture.objects.all():
> for c in Comment.objects.filter(picture=p):
> print(f' - {p}: {c}')
>
>
> def add_user(name, email, password):
> u = User.objects.get_or_create(username=name, first_name='Test',
> last_name='User', email=email)[0]
> u.set_password(password)
> up = UserProfile.objects.get_or_create(user=u)[0]
> u.save()
> return up
>
>
> def add_picture(image, title, description, tag_one, tag_two, era, likes=0):
> p = Picture.objects.get_or_create(image=image, title=title)[0]
> p.description = description
> p.tag_one = tag_one
> p.tag_two = tag_two
> p.era = era
> p.like = likes
> p.save()
> return p
>
>
> def add_comment(user, body):
> u = User.objects.get(username=user)
> up = UserProfile.objects.get(user=u)
> c = Comment.objects.get_or_create(user=up, body=body)[0]
> c.save()
> return c
>
>
> if __name__ == '__main__':
> print('Starting Now And Then population script...')
> populate()
>
> --
> 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 view this 

Re: heroku hosting apllication error

2020-04-02 Thread o1bigtenor
On Thu, Apr 2, 2020 at 4:01 AM sagar ninave  wrote:

> thanks for reply
>
> but problem is solved now
>
> Hmm - - - - to assist anyone else that has run into this problem it
would
likely be quite useful if you posted what you did to fix things - - -
please?

Regards

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAPpdf5-CQactgT%2B51r1XfFgLSizdT9Ah2gKDTkTCdDjbuDOJZw%40mail.gmail.com.


how to build a CAS

2020-04-02 Thread avinash prajapati
Can anyone help me to build a centralized authentication server or suggest 
best ways do it.  

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/02ace9ef-1465-4baf-9af5-1281c39ccbde%40googlegroups.com.


Re: Creating test databases in parallel

2020-04-02 Thread Ram Rachum
When you say "shrinking your test databases", what do you mean exactly? I'm
a bit of a newbie on that part of Django.

On Wed, Apr 1, 2020 at 8:13 PM Thomas Lockhart 
wrote:

> If you are trying to optimize the test flow, then you may want to spend
> some time shrinking your test databases to a more manageable size. Or have
> two sets; abbreviated and full, with the larger one to exercise your
> (unknown) edge cases.
>
> hth
>
> - Tom
>
> On Apr 1, 2020, at 2:25 AM, cool-RR  wrote:
>
> Hi guys,
>
> I'm trying to optimize our Django testing workflow.
>
> We have 7 different databases, and Django spends a lot of time on these
> lines:
>
>
> Creating test database for alias 'main_database'...
> Creating test database for alias 'foo_database'...
> Creating test database for alias 'bar_database'...
> Creating test database for alias 'baz_database'...
>
>
> This is especially annoying when you're running just one test, but have to
> wait 1:30 minutes just for these test databases.
>
> *Is there any way to speed this up? *Either by parallelizing it or in any
> other way. A few months ago I tried some naive code that parallelizes these
> actions, but it failed. (Unfortunately I don't have the error message
> saved.)
>
>
> Thanks,
> Ram.
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/6619ce10-6a0e-4fde-8d2c-fb81e6e2bd2c%40googlegroups.com
> 
> .
>
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Django users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/django-users/-djWwBB5xac/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/43DDD6E9-EAA8-4162-BDB3-665F3CCA00E0%40gmail.com
> 
> .
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CANXboVaX%2B737m4G-pXtvhvor00fD-3yknvCc%3DngnThZL0Jz5Bw%40mail.gmail.com.