Re: Django Admin Login will not Redirect following Authentication on Remote Host

2019-07-12 Thread Sidnei Pereira
Hahahaha I'm glad it helped! I will probably add this answer to your 
stackoverflow question. Maybe it will help someone else.

-- 
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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/c8ba5cd8-5404-438a-93e3-6f928f408bf8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: having problem in login rest API

2019-07-08 Thread Sidnei Pereira
If would like to access CustomUser's attributes directly from an student 
instance you should use Multi-table Inheritance 

 
- a concrete model class that inherits from another, so `class 
Student(CustomUser)`. But if you want to keep the relationship using 
explict OneToOne like you did, maybe it's better to query on CustomUser 
instead of Student model, like this:

```
user = CustomUser.objects.filter(
Q(identity_no=identity_no) |
Q(student__student_no=student_no)
).distinct()
``` 

It will bring CustomUser objects (wich have the `check_password` method) 
instead of Student objects

Em segunda-feira, 8 de julho de 2019 01:21:39 UTC-3, laya escreveu:
>
> Yes Check_password attribute is in Django user model and when I write 
> Customuser. Objects.filter() it errors that Student_no is not an attribute 
> for User Django Model.
>
>  
>
> Sent from Mail  for 
> Windows 10
>
>  
>
> *From: *Aldian Fazrihady 
> *Sent: *Sunday, July 7, 2019 9:18 PM
> *To: *django...@googlegroups.com 
> *Subject: *Re: having problem in login rest API
>
>  
>
> It is in user object instead of student object,  right? 
>
> Regards, 
>
> Aldian Fazrihady
> http://aldianfazrihady.com
>
>  
>
> On Mon, 8 Jul 2019, 11:12 laya, > wrote:
>
> Hi,
>
> Please help me in this part, I stuck in some days, 
>
> My project is about a university system which professors and students can 
> sign up and login. I use Custom User Django which inherits User Django 
> Model. It should be mentioned that login is by identity number and 
> Student-no and Professor-no. 
>
> My codes are as follow:
>
> Models.py:
>
> class CustomUser(AbstractUser):
> USER_TYPE_CHOICES = ((1, 'student'),
>  (2, 'professor'),)
> username = models.CharField(max_length=50, unique=True)
> user_type = models.PositiveSmallIntegerField(choices=USER_TYPE_CHOICES, 
> null=True)
> first_name = models.CharField(max_length=50)
> last_name = models.CharField(max_length=100)
> identity_no = models.PositiveIntegerField(default=0)
> email = models.EmailField(max_length=300,
>   validators=[RegexValidator
>   
> (regex="^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.["r"a-zA-Z0-9-.]+$",
>message='please enter the correct 
> format')],
>   )
> date_joined = models.DateTimeField('date joined', default=timezone.now)
> is_active = models.BooleanField(default=True)
> is_admin = models.BooleanField(default=False)
> is_staff = models.BooleanField(default=False)
>
>
> class Student(models.Model):
> user = models.OneToOneField(CustomUser, on_delete=models.CASCADE)
> entry_year = models.PositiveIntegerField()
> student_no = models.PositiveIntegerField()
>
> def get_full_name(self):
> return self.user.first_name +" "+ self.user.last_name
>
> def __unicode__(self):
> return self.user.first_name +" "+ self.user.last_name
>
> def __str__(self):
> return self.user.first_name +" "+  self.user.last_name
>
>  
>
> serializers.py:
>
>  
>
> """STUDENT LOGIN"""
> class StudentLoginSerializer(serializers.ModelSerializer):
> user = CustomUserSerializerForLogin()
>
> class Meta:
> model = Student
> fields = [
> "user",
> "student_no", ]
>
> def validate(self, data):  # validated_data
> user_data = data.pop('user', None)
> identity_no = user_data.get('identity_no')
> print("identity_no", identity_no)
> student_no = data.get("student_no")
> user = Student.objects.filter(
> Q(user__identity_no=identity_no) |
> Q(student_no=student_no)
> ).distinct()
> # user = 
> user.exclude(user__identity_no__isnull=True).exclude(user__identity_no__iexact='')
> if user.exists() and user.count() == 1:
> user_obj = user.first()
> else:
> raise ValidationError("This username or student_no is not 
> existed")
> if user_obj:
> if not user_obj.check_password(student_no):  # Return a boolean 
> of whether the raw_password was correct.
> raise ValidationError("Incorrect Credential please try again")
> return user_obj
>
> Views.py:
>
>
> class StudentLoginView(APIView):
> queryset = Student.objects.all()
> serializer_class = StudentLoginSerializer
> def post(self, request, *args, **kwargs):
> data = request.data
> serializer = StudentLoginSerializer(data=data)
> if serializer.is_valid(raise_exception=True):
> new_data = serializer.data
> return Response(new_data, status= HTTP_200_OK)
> return Response(serializer.errors, status=HTTP_400_BAD_REQUEST)
>
> Error:
>
> The 

Re: Enterprise web application with admin interface

2018-12-18 Thread Sidnei Pereira
It's very flexible indeed. But depending on the requirements of it you 
could end fighting the framework. For instance, the permissions check are 
model based (not instance based neither fields based), the list view has a 
lot of responsibilities and it'is not so easily extensible.

Again it will depend a lot on your requirements. If you have to change much 
of it's usual behavior maybe it's better to build something without using 
Django's admin.

Em segunda-feira, 17 de dezembro de 2018 17:36:31 UTC-2, Mario Daniel 
Carugno escreveu:
>
> Hi everyone !
>
> My question is simple:
>
> *Is possible (or good) to build an enterprise web application using only 
>> the admin interface ?*
>
>
> I've heard that the admin interface is very customizable/extensible, so it 
> sounds like a great idea.
>
> 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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/1c1b67f7-55b0-4c12-8131-16c51f9cb515%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django update one field by DeleteView

2018-12-11 Thread Sidnei Pereira
It's is usally called safe delete or soft delete or even logical delete. 
There are some approach to that on Django with pros and cons, I suggest you 
to research a little bit to see whats is best for you.

Some material on the subject

https://medium.com/@adriennedomingus/soft-deletion-in-django-e4882581c340

Em terça-feira, 11 de dezembro de 2018 10:31:22 UTC-2, Rupam Hazra escreveu:
>
> Hi all,
>
> I have project model.one functionality is when a project delete only* 
> is_deleted* field modified by 1 so that in reality it does not delete 
> from database just the status changed.That means i want to update the 
> is_deleted field without any form.
>
>
>
>
>

-- 
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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/fc4924ca-578a-4233-8ee3-85031b733b36%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django UpdateView and Createview

2018-12-11 Thread Sidnei Pereira
Could you point out what exactly was the problem and how did you solve it? 
A proper feedback is usually useful for those who were helping or those 
with the same issue.

Thanks in advance.

Em terça-feira, 11 de dezembro de 2018 10:27:08 UTC-2, Rupam Hazra escreveu:
>
> Thanks, it is working
>
> On Monday, 10 December 2018 18:19:34 UTC+5:30, Sidnei Pereira wrote:
>>
>> Hi,
>>
>> I don't know if I got it right , but you want to add/update as many 
>> instance of Technologies as you want when creating/updating a Project, 
>> right? Like when you use an inline on Django's admin 
>> <https://docs.djangoproject.com/en/2.1/ref/contrib/admin/#django.contrib.admin.InlineModelAdmin>
>> .
>>
>> For that you could user Django Formsets 
>> <https://docs.djangoproject.com/en/2.1/topics/forms/formsets/>. Here is 
>> simple gist for you to get a feeling of it:
>>
>> https://gist.github.com/neara/6209563
>>
>> An observation about your models, since you want *a Projetct to have 
>> many Technologies* you don't need a junction table. You could just user 
>> a ForeignKey model field on the TechnologyMaster model that refers to 
>> ProjectMaster model. The way you doing it know it's is actually a many to 
>> many relationship. For a better understanding of it in the context of how 
>> Django works with database modeling, see: 
>>
>> https://docs.djangoproject.com/en/2.1/topics/db/models/#relationships
>>
>> https://docs.djangoproject.com/en/2.1/topics/db/examples/
>>
>>
>> Em segunda-feira, 10 de dezembro de 2018 07:34:54 UTC-2, Rupam Hazra 
>> escreveu:
>>>
>>> Hi all,
>>>
>>> I know and understand how update view working but in my case how to 
>>> implement on my case.
>>>
>>> Please suggest.;
>>>
>>> On Sunday, 9 December 2018 23:13:04 UTC+5:30, Okware Aldo wrote:
>>>>
>>>> Ryan's suggestion should give you a starting point. 
>>>>
>>>> On Sun, Dec 9, 2018 at 3:43 PM Deepak Kumar  
>>>> wrote:
>>>>
>>>>> On Sunday, December 9, 2018 at 6:21:55 AM UTC+5:30, Ryan Nowakowski 
>>>>> wrote:
>>>>> > Take a look at 
>>>>> https://docs.djangoproject.com/en/2.1/topics/class-based-views/generic-editing/
>>>>> > 
>>>>> > 
>>>>> > On December 7, 2018 7:09:25 AM CST, Rupam Hazra  
>>>>> wrote:
>>>>> > 
>>>>> > Hi,
>>>>> > 
>>>>> > 
>>>>> > I have working in a TaskManagement Sytem where i have project module 
>>>>> and technology module.
>>>>> > 
>>>>> > 
>>>>> > class ProjectMaster(models.Model):
>>>>> > name=models.CharField(max_length=255,blank=True,null=True)
>>>>> > description=models.CharField(max_length=255,blank=True,null=True)
>>>>> > is_agreement_sent=models.BooleanField(default=False)
>>>>> > is_invoice_create=models.BooleanField(default=False)
>>>>> > is_invoice_sent=models.BooleanField(default=False)
>>>>> > is_paid=models.BooleanField(default=False)
>>>>> > status=models.BooleanField(default=True)
>>>>> > is_deleted=models.BooleanField(default=False)
>>>>> > created_at=models.DateTimeField(auto_now_add=True)
>>>>> > created_by = models.ForeignKey(User, 
>>>>> on_delete=models.CASCADE,related_name='createdUser',blank=True,null=True)
>>>>> > updated_at=models.DateTimeField(auto_now_add=True)
>>>>> > updated_by=models.ForeignKey(User, on_delete=models.CASCADE, 
>>>>> related_name='UpdUser',blank=True,null=True)
>>>>> > #technology_master = models.ForeignKey(TechnologyMaster, 
>>>>> on_delete=models.CASCADE, related_name='technologies', )
>>>>> > 
>>>>> > def __str__(self):
>>>>> > return str(self.name)
>>>>> > class TechnologyMaster(models.Model):
>>>>> > #projectmaster = 
>>>>> models.ForeignKey(ProjectMaster,on_delete=models.CASCADE)
>>>>> > name=models.CharField(max_length=255,blank=True,null=True)
>>>>> > status = models.BooleanField(default=True)
>>>>> > is_deleted = models.BooleanField(default=False)
>>>>> > created_at = models.DateTimeField(auto_now_a

Re: Django UpdateView and Createview

2018-12-10 Thread Sidnei Pereira
Hi,

I don't know if I got it right , but you want to add/update as many 
instance of Technologies as you want when creating/updating a Project, 
right? Like when you use an inline on Django's admin 

.

For that you could user Django Formsets 
. Here is 
simple gist for you to get a feeling of it:

https://gist.github.com/neara/6209563

An observation about your models, since you want *a Projetct to have many 
Technologies* you don't need a junction table. You could just user a 
ForeignKey model field on the TechnologyMaster model that refers to 
ProjectMaster model. The way you doing it know it's is actually a many to 
many relationship. For a better understanding of it in the context of how 
Django works with database modeling, see: 

https://docs.djangoproject.com/en/2.1/topics/db/models/#relationships

https://docs.djangoproject.com/en/2.1/topics/db/examples/


Em segunda-feira, 10 de dezembro de 2018 07:34:54 UTC-2, Rupam Hazra 
escreveu:
>
> Hi all,
>
> I know and understand how update view working but in my case how to 
> implement on my case.
>
> Please suggest.;
>
> On Sunday, 9 December 2018 23:13:04 UTC+5:30, Okware Aldo wrote:
>>
>> Ryan's suggestion should give you a starting point. 
>>
>> On Sun, Dec 9, 2018 at 3:43 PM Deepak Kumar  wrote:
>>
>>> On Sunday, December 9, 2018 at 6:21:55 AM UTC+5:30, Ryan Nowakowski 
>>> wrote:
>>> > Take a look at 
>>> https://docs.djangoproject.com/en/2.1/topics/class-based-views/generic-editing/
>>> > 
>>> > 
>>> > On December 7, 2018 7:09:25 AM CST, Rupam Hazra  
>>> wrote:
>>> > 
>>> > Hi,
>>> > 
>>> > 
>>> > I have working in a TaskManagement Sytem where i have project module 
>>> and technology module.
>>> > 
>>> > 
>>> > class ProjectMaster(models.Model):
>>> > name=models.CharField(max_length=255,blank=True,null=True)
>>> > description=models.CharField(max_length=255,blank=True,null=True)
>>> > is_agreement_sent=models.BooleanField(default=False)
>>> > is_invoice_create=models.BooleanField(default=False)
>>> > is_invoice_sent=models.BooleanField(default=False)
>>> > is_paid=models.BooleanField(default=False)
>>> > status=models.BooleanField(default=True)
>>> > is_deleted=models.BooleanField(default=False)
>>> > created_at=models.DateTimeField(auto_now_add=True)
>>> > created_by = models.ForeignKey(User, 
>>> on_delete=models.CASCADE,related_name='createdUser',blank=True,null=True)
>>> > updated_at=models.DateTimeField(auto_now_add=True)
>>> > updated_by=models.ForeignKey(User, on_delete=models.CASCADE, 
>>> related_name='UpdUser',blank=True,null=True)
>>> > #technology_master = models.ForeignKey(TechnologyMaster, 
>>> on_delete=models.CASCADE, related_name='technologies', )
>>> > 
>>> > def __str__(self):
>>> > return str(self.name)
>>> > class TechnologyMaster(models.Model):
>>> > #projectmaster = 
>>> models.ForeignKey(ProjectMaster,on_delete=models.CASCADE)
>>> > name=models.CharField(max_length=255,blank=True,null=True)
>>> > status = models.BooleanField(default=True)
>>> > is_deleted = models.BooleanField(default=False)
>>> > created_at = models.DateTimeField(auto_now_add=True)
>>> > created_by = models.ForeignKey(User, 
>>> on_delete=models.CASCADE,blank=True, null=True,related_name='created_by')
>>> > updated_at = models.DateTimeField(auto_now_add=True)
>>> > updated_by = models.ForeignKey(User, 
>>> on_delete=models.CASCADE,blank=True, null=True,related_name='updated_by')
>>> > def __str__(self):
>>> > return str(self.id)+'-'+ self.nameHere one functionality is 
>>> one project has multiple technologies so i have made one mapping table 
>>> belowclass ProjectTechnologyMapping(models.Model):
>>> > project_master = models.ForeignKey(ProjectMaster, 
>>> on_delete=models.CASCADE, related_name='projects')
>>> > technology_master = models.ForeignKey(TechnologyMaster, 
>>> on_delete=models.CASCADE, related_name='technologies')
>>> > status = models.BooleanField(default=True)
>>> > is_deleted = models.BooleanField(default=False)
>>> > created_at = models.DateTimeField(auto_now_add=True)
>>> > created_by = models.ForeignKey(User, 
>>> on_delete=models.CASCADE,blank=True,null=True,related_name='pro_tech_created_user')
>>> > updated_at = models.DateTimeField(auto_now_add=True)
>>> > updated_by = models.ForeignKey(User, 
>>> on_delete=models.CASCADE,blank=True,null=True,related_name='pro_tech_updated_user')
>>> > def __str__(self):
>>> > return str(self.id)So, my question is how add and update 
>>> using django createview,updateview (generic view) using templates.
>>>
>>> -- 
>>> 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, 

Re: Authorization not working on production server

2018-12-07 Thread Sidnei Pereira
Did you log in?

Em sexta-feira, 7 de dezembro de 2018 09:21:51 UTC-2, Akash utreja escreveu:
>
> Hi,
> I am building authorization in django framework using python.. The problem 
> is that my code is working fine on local server but when I run the same in 
> production it returns "Anonymous User" 
>
> Am I doing it right?
>
> if request.user.has_perm('auth.access_admin')
> ""whole code""
> else:
>return Response({'error': 'Unauthorized'},
> status=status.HTTP_401_UNAUTHORIZED)
>
> My request.user.has_perm return false because request.user is Anonymous.I 
> also try to return my request.user.username it is also coming 
> blank.Please help me out!
> Thanks
> Akash
>
>

-- 
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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/a9f26837-c05f-4ba8-a81c-745338c0f8fd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: django.core.exceptions.ImproperlyConfigured: Requested setting AUTH_USER_MODEL, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call sett

2018-12-07 Thread Sidnei Pereira
Take a look on this article.

https://automationpanda.com/2017/09/14/django-projects-in-pycharm-community-edition/

Em quinta-feira, 6 de dezembro de 2018 15:18:22 UTC-2, Parker Bernard 
escreveu:
>
> how do i open my django in my pycharm or python
>
>
> On Thu, Dec 6, 2018, 3:40 PM Sidnei Pereira   wrote:
>
>> It seems you are trying to execute de `views.py` module directly. As you 
>> are running Django you should run it's webserver through `manage.py` so 
>> Django you setup everything it is expected and the process starts to listen 
>> to port: So:
>>
>> python manage.py runserver
>>
>> It will run the server by default in the localhost and port 8000. To test 
>> your `view` open the browser and type the correspondent URL (
>> http://localhost:8000/this_view_url/) for that view.
>>
>> Actually I strongly recommend you to go through the "Getting started with 
>> Django" (https://www.djangoproject.com/start/)
>>
>> *P.S.: Looks like you are using PyCham IDE and there you hit play/run 
>> button to start the application but before it needs to be correctly setup. 
>> It may vary from professional to community version, but you Basically have 
>> to add a run configuration (next to the play button on the top right). In 
>> pro version just choose "Django server" on the template's list, usually the 
>> default values are good to go. The community one does not have the "Django 
>> Server" on the list so choose "Python" and type the runserver command as 
>> explained before.
>>
>> Em quarta-feira, 5 de dezembro de 2018 10:28:01 UTC-2, Tushar Khairnar 
>> escreveu:
>>>
>>> C:\Python\python.exe "D:/Python/django reset 
>>> framework/secondtestdjrstapi/users/views.py"
>>> Traceback (most recent call last):
>>>   File "D:/Python/django reset 
>>> framework/secondtestdjrstapi/users/views.py", line 2, in 
>>> from rest_framework.authtoken.models import Token
>>>   File "C:\Python\lib\site-packages\rest_framework\authtoken\models.py", 
>>> line 11, in 
>>> class Token(models.Model):
>>>   File "C:\Python\lib\site-packages\rest_framework\authtoken\models.py", 
>>> line 17, in Token
>>> settings.AUTH_USER_MODEL, related_name='auth_token',
>>>   File "C:\Python\lib\site-packages\django\conf\__init__.py", line 57, 
>>> in __getattr__
>>> self._setup(name)
>>>   File "C:\Python\lib\site-packages\django\conf\__init__.py", line 42, 
>>> in _setup
>>> % (desc, ENVIRONMENT_VARIABLE))
>>> django.core.exceptions.ImproperlyConfigured: Requested setting 
>>> AUTH_USER_MODEL, but settings are not configured. You must either define 
>>> the environment variable DJANGO_SETTINGS_MODULE or call 
>>> settings.configure() before accessing settings.
>>>
>> -- 
>> 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...@googlegroups.com .
>> To post to this group, send email to django...@googlegroups.com 
>> .
>> Visit this group at https://groups.google.com/group/django-users.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/f0597428-5b2b-41a3-93cc-1fd326b1f828%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/django-users/f0597428-5b2b-41a3-93cc-1fd326b1f828%40googlegroups.com?utm_medium=email_source=footer>
>> .
>> 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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/7630b8e9-cc99-492f-b5b0-ce2631a71a59%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: django.core.exceptions.ImproperlyConfigured: Requested setting AUTH_USER_MODEL, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call sett

2018-12-06 Thread Sidnei Pereira
It seems you are trying to execute de `views.py` module directly. As you 
are running Django you should run it's webserver through `manage.py` so 
Django you setup everything it is expected and the process starts to listen 
to port: So:

python manage.py runserver

It will run the server by default in the localhost and port 8000. To test 
your `view` open the browser and type the correspondent URL 
(http://localhost:8000/this_view_url/) for that view.

Actually I strongly recommend you to go through the "Getting started with 
Django" (https://www.djangoproject.com/start/)

*P.S.: Looks like you are using PyCham IDE and there you hit play/run 
button to start the application but before it needs to be correctly setup. 
It may vary from professional to community version, but you Basically have 
to add a run configuration (next to the play button on the top right). In 
pro version just choose "Django server" on the template's list, usually the 
default values are good to go. The community one does not have the "Django 
Server" on the list so choose "Python" and type the runserver command as 
explained before.

Em quarta-feira, 5 de dezembro de 2018 10:28:01 UTC-2, Tushar Khairnar 
escreveu:
>
> C:\Python\python.exe "D:/Python/django reset 
> framework/secondtestdjrstapi/users/views.py"
> Traceback (most recent call last):
>   File "D:/Python/django reset 
> framework/secondtestdjrstapi/users/views.py", line 2, in 
> from rest_framework.authtoken.models import Token
>   File "C:\Python\lib\site-packages\rest_framework\authtoken\models.py", 
> line 11, in 
> class Token(models.Model):
>   File "C:\Python\lib\site-packages\rest_framework\authtoken\models.py", 
> line 17, in Token
> settings.AUTH_USER_MODEL, related_name='auth_token',
>   File "C:\Python\lib\site-packages\django\conf\__init__.py", line 57, in 
> __getattr__
> self._setup(name)
>   File "C:\Python\lib\site-packages\django\conf\__init__.py", line 42, in 
> _setup
> % (desc, ENVIRONMENT_VARIABLE))
> django.core.exceptions.ImproperlyConfigured: Requested setting 
> AUTH_USER_MODEL, but settings are not configured. You must either define 
> the environment variable DJANGO_SETTINGS_MODULE or call 
> settings.configure() before accessing settings.
>

-- 
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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/f0597428-5b2b-41a3-93cc-1fd326b1f828%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.