Re: How to populate fields generated by modelformset_factory with data from database

2020-08-08 Thread Integr@te System
Hi Micheal,

https://docs.djangoproject.com/en/3.0/topics/forms/formsets/


You see in doc with example such as custom queryset, initial data get from
existed instances all base on your design and codebase.


On Sat, Aug 8, 2020, 10:48 PM Michael Klassen  wrote:

> Hi, thank you for your response but I need some more specifics.  My
> queryset includes the questions which the form presents to the user.  How
> do I get their responses included in the queryset?  Do I have to somehow
> join tables to get both questions and responses?  If I follow the
> relationships in the queryset, I see that I can filter and find the
> responses, but how do I get Django to fill the form fields with the
> responses?
>
> Thank you!
>
> On Friday, August 7, 2020 at 10:24:21 AM UTC-4, Integr@te System wrote:
>>
>> Hi Michael,
>>
>> You can read queryset combine with model in modelformset_factory() method
>> to get exact user and/or any fields you need as existed instance or base on
>> cookies or sth like that to identify your user, depend on your use case(ex
>> trigger events or choose one option...). Hope it helpful.
>>
>>
>>
>> On Fri, Aug 7, 2020, 6:46 PM Michael Klassen  wrote:
>>
>>> Hello:
>>>
>>> I am using modelformset_factory to generate my form based on a model.
>>> If the user submits a page, then returns to it later, I would like to
>>> populate the fields with what they previously answered.  I can only find
>>> examples of pre-populated fields with the extra forms; is there a way to do
>>> this with the first form?
>>>
>>> Thank you.
>>>
>>> --michael
>>>
>>> --
>>> 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...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/75f5f32d-64f7-4a90-a34e-8d1717ff2828o%40googlegroups.com
>>> <https://groups.google.com/d/msgid/django-users/75f5f32d-64f7-4a90-a34e-8d1717ff2828o%40googlegroups.com?utm_medium=email_source=footer>
>>> .
>>>
>> --
> 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/ec084248-7c27-468a-90a3-c2bf5bc3fc20o%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/ec084248-7c27-468a-90a3-c2bf5bc3fc20o%40googlegroups.com?utm_medium=email_source=footer>
> .
>

-- 
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/CAP5HUWr1EbtJfeqFhWhWvNfj4Lq8sWKuMLT5qmkKugfd%2B3qO-Q%40mail.gmail.com.


Re: How to populate fields generated by modelformset_factory with data from database

2020-08-07 Thread Integr@te System
Hi Michael,

You can read queryset combine with model in modelformset_factory() method
to get exact user and/or any fields you need as existed instance or base on
cookies or sth like that to identify your user, depend on your use case(ex
trigger events or choose one option...). Hope it helpful.



On Fri, Aug 7, 2020, 6:46 PM Michael Klassen  wrote:

> Hello:
>
> I am using modelformset_factory to generate my form based on a model.  If
> the user submits a page, then returns to it later, I would like to populate
> the fields with what they previously answered.  I can only find examples of
> pre-populated fields with the extra forms; is there a way to do this with
> the first form?
>
> Thank you.
>
> --michael
>
> --
> 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/75f5f32d-64f7-4a90-a34e-8d1717ff2828o%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/CAP5HUWpRt6Ler6_kViH%3DEz8KELMQ2Ss-Fbdeuw%2B-1Yjf0D7CPA%40mail.gmail.com.


Re: file format changer

2020-08-02 Thread Integr@te System
Hi Stephen,

If you do still find out any relative information about your question, take
a look in some python standard packages json/xml... then process it or
tools usql tsql in synapse/ spark/bigquery...
Hope it helpful and please see here without your topic.
Tks.

On Sun, Aug 2, 2020, 2:15 AM Kasper Laudrup  wrote:

> Hi John,
>
> On 01/08/2020 19.34, John McClain wrote:
> > Might make sense to convert images to different formats if you have tons
> of them, so not exactly a bad question!
> >
>
> Indeed, that might make sense. If this was a question on how to create a
> web interface in Django for converting images to different formats, it
> would even have been relevant for this mailing list.
>
> The problem is, that was not the question, so I don't see the point in
> trying to guess what other questions might have been relevant.
>
> > Before crushing the guy maybe you could ask what the use case is!
> >
>
> I did try to ask that. I pointed out that the question as it is now
> doesn't make any sense (it doesn't) and see of there was some way of
> formulating a question that would make sense. It might not sound like
> it, and sorry if that's the case, but I'm actually trying to be helpful.
>
> Kind regards,
>
> Kasper Laudrup
>
> --
> 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/4eea0fbc-f9ee-ea3d-f21c-72ba66117782%40stacktrace.dk
> .
>

-- 
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/CAP5HUWq4Vvt1pbeMtRfCu%3DT7PVgvJqpbOxZR0FkS9dRni_kceQ%40mail.gmail.com.


Re: Data Science and sql problem

2020-07-27 Thread Integr@te System
Hi Friend,

If you want more option, new t-sql with predict statement directly on db.



On Mon, Jul 27, 2020, 4:25 PM AJ Wattoo  wrote:

> as far i understand you want to connect with postgreSQL database on
> jupyter notebook :
> you can do like this
> 1. install -c anaconda psycopg2 and install -c anaconda sqlalchemy
>
> *2. *from sqlalchemy import create_engine and import pandas as pd
>
> 3. engine=create_engine(‘postgres+psycopg2://postgres:@localhost
> :5432/anyname’)
>
> In thes case *postgres *= name of my databse , ** is my password ,
> *localhost*=host, *port *= 5432, *anyname* = database name
>
> 4. con = engine.connect()
>
> 5. df=*pd.read_sql_query(*SQL queries #whatever you want to get from
> database*)*
>
> and then saving that data in csv
> 6. df.to_csv('file_name.csv')
> On Monday, July 27, 2020 at 6:37:44 AM UTC+2 yame...@gmail.com wrote:
>
>> Try sql alchemy, if you need a full access with many functionality. Other
>> than that, u can connect directly to the database through python. The exact
>> implementation will depend on the database type
>>
>> Le dim. 26 juil. 2020 à 18:15, Gurmeet Kaur  a
>> écrit :
>>
>>> you could try using connection and cursor to connect nd then pandas to
>>> read csv using readcsv function
>>>
>>> On Sun, Jul 26, 2020, 11:59 AM Prashant Singh 
>>> wrote:
>>>
 How can i connect database with help of function in jupyter notebook
 and then conver data into csv to build model ?

 --
 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 view this discussion on the web visit
 https://groups.google.com/d/msgid/django-users/dd90d45a-dfbf-47a6-86b2-a4e600d4a9c9n%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...@googlegroups.com.
>>>
>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/CAEbKJVi%3DPfRdjN7AxWiEb-BuUZ_cjwinBpwrbQ9-iTi7e_hyrQ%40mail.gmail.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/97217142-867e-4f5a-9c52-17fa3a6f7ce6n%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/CAP5HUWr19SEW4L8Or4UswhtXgNQtcTwbdRYkrgYHdELh-JL%2BOQ%40mail.gmail.com.


Re: help been on that for 5 days, Joining 4 tables on 2 columns

2020-07-17 Thread Integr@te System
Hi Omar,

You can look at this to consider:
https://hakibenita.com/django-group-by-sql

Hope this helpful.



On Sat, Jul 18, 2020, 12:32 AM Omar aboul makarem <
omaraboulmaka...@gmail.com> wrote:

>
> Hey Guys please help
>
> I have Approval model, and i want to calculate the sum of total prices of
> the procedures based on the company and procedure type in each Approval
> *https://www.ppaste.org/pwhJ6u7Dg*
> 
> now i want to get all the prices and
> .aggregate(Sum('price'))['price__sum']) to get the sum of all prices of the
> approvals i have.
> the raw sql for postgresql and if my app is called main is :
> now how can i change this sql to django ORM, in the documentation i read
> about select_related(), and F(), but i dunno how to use it in this case
>
> --
> 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/038b6c05-0be2-43b2-8082-f24e08858a92o%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/CAP5HUWpZgzfXpA_JAy4O7CtPRHCGQN7iFb7F9Vwx2qLLCo2Utg%40mail.gmail.com.


Re: 'Sandboxed' Template engine/context

2020-07-11 Thread Integr@te System
Hi Michael,

Plz look at https://pypi.org/project/django-template-engines/

And see in Django doc for your use case
as very detail with builtin jinja2 engine and must config backend
enviroment to use
https://docs.djangoproject.com/en/3.0/topics/templates/#django.template.backends.jinja2.Jinja2

Hope these useful.




On Sat, Jul 11, 2020, 12:25 PM Michael Thomas 
wrote:

> Hi,
>
> I'm aware that other template engines could be used, but it would be much
> more preferable to stick with Django's template engine for a variety of
> reasons (eg. using the same tags in the 'sandboxed' environment vs.
> regular).
>
> On Friday, 10 July 2020 14:41:30 UTC+4, Integr@te System wrote:
>>
>> Hi Michael,
>>
>> Some templates as mako, jinja, genshi...
>>
>>
>>
>>
>> On Fri, Jul 10, 2020, 4:23 PM Michael Thomas 
>> wrote:
>>
>>> Hi all,
>>>
>>> Does anyone know of a straightforward way to create an independent
>>> template engine instance with a subset of the tags/filters/etc. defined?
>>>
>>> The use-case is for allowing user-supplied template content, while
>>> preventing said users from being able to use features that could be
>>> dangerous, leak information, etc.. (Eg. {% extends %}, {% load %},
>>> {{my-secret-variable-that-is-loaded-into-global-context}})
>>>
>>> Kind Regards,
>>> Michael
>>>
>>> --
>>> 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...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/e8456f7f-e52f-4bf4-95c6-419d84600687o%40googlegroups.com
>>> <https://groups.google.com/d/msgid/django-users/e8456f7f-e52f-4bf4-95c6-419d84600687o%40googlegroups.com?utm_medium=email_source=footer>
>>> .
>>>
>> --
> 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/e50f24b3-1e6e-4260-b720-5af5912ae511o%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/e50f24b3-1e6e-4260-b720-5af5912ae511o%40googlegroups.com?utm_medium=email_source=footer>
> .
>

-- 
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/CAP5HUWoh8%3DYGiO5fFhM23aKg8r%2BsqytUpSZEhV9ctvQogzqOww%40mail.gmail.com.


Re: 'Sandboxed' Template engine/context

2020-07-10 Thread Integr@te System
Hi Michael,

Some templates as mako, jinja, genshi...




On Fri, Jul 10, 2020, 4:23 PM Michael Thomas 
wrote:

> Hi all,
>
> Does anyone know of a straightforward way to create an independent
> template engine instance with a subset of the tags/filters/etc. defined?
>
> The use-case is for allowing user-supplied template content, while
> preventing said users from being able to use features that could be
> dangerous, leak information, etc.. (Eg. {% extends %}, {% load %},
> {{my-secret-variable-that-is-loaded-into-global-context}})
>
> Kind Regards,
> Michael
>
> --
> 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/e8456f7f-e52f-4bf4-95c6-419d84600687o%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/CAP5HUWopfguN5%3D4K9H6z4LKXL_GSS2iDna8LYc_rkLchQgCjDQ%40mail.gmail.com.


Re: Populate choices from existing values in a model field

2020-06-20 Thread Integr@te System
Hi Patrick,

Plz review for your suitable case:
https://stackoverflow.com/questions/3742734/django-restart-server-or-httpd

Nice.

On Sat, Jun 20, 2020, 1:32 AM Patrick Carra  wrote:

> I am trying to read distinct values from a model field and use the tuple
> list to populate the choices in a Form.  The problem I have is that every
> time a new value is added I must reset the httpd server in order to include
> the new value in the form.  I have researched and tried this a few
> different ways but so far am unable to come up with a better solution. Any
> ideas?
>
> *models.py*
> class Circuitinfotable(models.Model):
> id1 = models.IntegerField(primary_key=True, blank=True,null=False,
> unique=True)
> pathname = models.CharField(max_length=255, blank=True, null=True)
> segmentname = models.CharField(max_length=255, blank=True, null=True)
> region = models.CharField(max_length=255, blank=True, null=True)
>
>
>
>
>
> *forms.py*
> def getList(item_list, keyValue):
> valueList=[]
> for each in item_list:
> valueList.append(each[keyValue])
> return valueList
>
> def listCreator(field, query):
> newList_query = getList(query, field)
> sorted_newList = sorted(getUnique(newList_query))
> sorted_newList.insert(0, ("", ""))
> return sorted_newList
>
>
> class CircuitinfotableForm(ModelForm):
>
>
> class Meta:
> pathlistQuery = Circuitinfotable.objects.all().values('pathname').
> exclude(pathname=None).exclude(pathname='None')
> path_list = listCreator('pathname', pathlistQuery)
>
>
> model = Circuitinfotable
> fields = ['circuitid', 'pathname', 'segmentname', 'region']
> widgets = {'circuitid': forms.TextInput(attrs={'size':40}),
> 'pathname': forms.Select(choices=path_list), 'segmentname': forms.Select(
> choices=segment_list),
>'region':  forms.Select(choices=region_list)}
>
> I shortened this code to only include some of the relevant fields and code
> for brevity.  Here I created two functions to create a list of tuples for
> pathname from the values I retrieve using a query and pass it to the Select
> widget using choices.
>
> --
> 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/b63b6f32-0040-42ee-9021-e45657e9caf7o%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/CAP5HUWoZ9u6tC0%2B7Mxx%3D9Cc1mQPmSD_a%2BqJKvwdwEuhE6bCivQ%40mail.gmail.com.


Re: GSoD 2020

2020-06-20 Thread Integr@te System
Hi Spring,

As you are interested in participating in Season of Docs as a technical
writer, first familiarize yourself with the writer guide at
https://goo.gl/dMVSQ8

and the tech responsibilities at https://goo.gl/BEqo2A

.

Plz take a look:
https://docs.google.com/forms/d/e/1FAIpQLSecVnkiamFJntE1iuguc-UXIQFCKOtKlq4S1o6I1QRjQKv4vQ/viewform


Nice.

On Fri, Jun 19, 2020, 8:07 PM Spring-dot  wrote:

> Please!!! Someone help!!! I know the basics but cannot find project ideas
> for GSoD 2020. Do we have to write our own idea for improving the
> documentation?
>
> On Wednesday, June 17, 2020 at 11:01:09 PM UTC+5:30, Spring-dot wrote:
>>
>> What are the project ideas for contributing to Django for GSoD, 2020?
>> Anyone who can guide me in this? Please Help!!
>> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/31a08f56-e75d-437b-b07f-9e86d2630414o%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/CAP5HUWqyaZzdgcK5QvgZ-rzR_F9514vjgLMYKKhDT7bbGNz34w%40mail.gmail.com.


Re: Question on migrations vs postgres database

2020-06-13 Thread Integr@te System
Hi Ram,

Plz check line #44 in reset_migrations.py
try replace square bracket by percent sign.

Or check temp file before your actions execute commands migration.

Goodluck.

On Sat, Jun 13, 2020, 12:31 PM Ram  wrote:

> Hi,
>
> We clone our project repository from GIT hub and deployed our web
> application in our development server in the past. The application was
> working fine in the past. Now we merged our new features into the same
> repository which has new models in our models.py. When we merged the
> changes into the development server, we tried running these commands
>
> 1. python3 manage.py makemigrations
>> < no changes detected >
>> 2. python3 manage.py migrate
>> < no migrations to apply >
>> 3. python3 manage.py reset_migrations
>> < all the migrations are created fine including new tables >
>>
>
>  But the issue is Postgres database does not show 2 of those new tables
> and we are not able to find any clue in the postgres database logs other
> than these log lines.
>
> 2020-06-13 02:48:34.627 UTC [7463] vxxx@v ERROR:  relation
>> "pages_rim_classifieds_messages" does not exist
>> ..
>> 2020-06-13 04:03:54.943 UTC [10103] vxxx@v ERROR:  relation
>> "pages_rim_classifieds_messages" does not exist at character 35
>> 2020-06-13 04:03:54.943 UTC [10103] vxxx@v STATEMENT:  SELECT
>> COUNT(*) AS "__count" FROM "pages_rim_classifieds_messages" WHERE
>> ("pages_rim_classifieds_messages"."To" IS NULL AND
>> "pages_rim_classifieds_messages"."flag" = 'u')
>> 2020-06-13 04:03:54.965 UTC [10103] vxxx@v ERROR:  relation
>> "pages_rim_classifieds_messages" does not exist at character 475
>> 2020-06-13 04:03:54.965 UTC [10103] vxxx@v STATEMENT:  SELECT
>> "pages_rim_classifieds_messages"."id",
>> "pages_rim_classifieds_messages"."adv_id",
>> "pages_rim_classifieds_messages"."message",
>> "pages_rim_classifieds_messages"."username",
>> "pages_rim_classifieds_messages"."flag",
>> "pages_rim_classifieds_messages"."status",
>> "pages_rim_classifieds_messages"."addedon",
>> "pages_rim_classifieds_messages"."From",
>> "pages_rim_classifieds_messages"."To",
>> "pages_rim_classifieds_messages"."ttle",
>> "pages_rim_classifieds_messages"."delete" FROM
>> "pages_rim_classifieds_messages" WHERE
>> ("pages_rim_classifieds_messages"."To" IS NULL AND
>> "pages_rim_classifieds_messages"."flag" = 'u') LIMIT 21
>>
>>
> I appreciate if someone can give us some clue if we are missing anything?
>
> Best regards,
> ~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/CA%2BOi5F0rWEhv9c%3Dc9q_%3D6qwUAFuLwRHVc1sPBTjtKbtkHpuoBQ%40mail.gmail.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/CAP5HUWqm-XF3mnzxrf8-j7BVt1zjDbx1qsot5%2BkjNrDxXAf7kw%40mail.gmail.com.


Re: Django Philosophy and Queries

2020-06-11 Thread Integr@te System
Hi Yves,

zen!
Nice.

On Thu, Jun 11, 2020, 9:27 PM Yves de Champlain  wrote:

> Hi
>
> I am wondering at some ways one can write a query in Django. Let's say for
> example :
>
> Whatever.objects.filter(fk_object_id=fk_object_id)
> Whatever.objects.filter(fk_object_id=fk_object.id)
> Whatever.objects.filter(fk_object=fk_object)
>
> and I could add to that list fk_object__id and fk_object__id__exact but
> my question is that while these syntaxes are equivalent in termes of
> results, one of them has got to be more efficient. I have read some posts
> about the subject, usually about optimizations, and could also guess that
> using an ID directly makes less behind-the-scene operations. On the other
> side, fk_object=fk_object surely looks more clean and concise to me.
>
> I know I don't master the subtleties of all these syntaxes, but my
> question is why does Django not support only one (the most) efficient way
> of writing queries ?
>
> Thanks for your thoughts about this.
>
> --
> 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/15077d25-1460-4783-9339-7e0ce8d21259o%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/CAP5HUWpFcb9HYy9sgOG%3DpKC0LsSn0J1a_nx51JNHz%3Di5u54f1A%40mail.gmail.com.


Re: Django-Firebase cloudstore ORM

2020-06-10 Thread Integr@te System
Hi Goil,

Did you register your model to site admin contrib.




On Wed, Jun 10, 2020, 6:52 AM sparsh goil  wrote:

> Hey,
> Does anyone know how to perfectly use Firebase with Django?
>
> I am using Django-Firebase-ORM which automatically maps my models to cloud
> firestore database but I am getting error.
> Model.py
> from firebase_orm import models
> # Create your models here.
>
> class Article(models.Model):
> headline = models.TextField()
> type_article = models.TextField(db_column='type')
>
> class Meta:
> db_table = 'medications'
>
> def __str__(self):
> return self.headline
>
> >python3 manage.py makemigrations
>
> Error:
> Traceback (most recent call last):
>   File "manage.py", line 21, in 
> main()
>   File "manage.py", line 17, in main
> execute_from_command_line(sys.argv)
>   File "/home/spaggy/Documents/Summer Internship
> 2020/venv/lib/python3.6/site-packages/django/core/management/__init__.py",
> line 401, in execute_from_command_line
> utility.execute()
>   File "/home/spaggy/Documents/Summer Internship
> 2020/venv/lib/python3.6/site-packages/django/core/management/__init__.py",
> line 377, in execute
> django.setup()
>   File "/home/spaggy/Documents/Summer Internship
> 2020/venv/lib/python3.6/site-packages/django/__init__.py", line 24, in setup
> apps.populate(settings.INSTALLED_APPS)
>   File "/home/spaggy/Documents/Summer Internship
> 2020/venv/lib/python3.6/site-packages/django/apps/registry.py", line 122,
> in populate
> app_config.ready()
>   File "/home/spaggy/Documents/Summer Internship
> 2020/venv/lib/python3.6/site-packages/django/contrib/admin/apps.py", line
> 24, in ready
> self.module.autodiscover()
>   File "/home/spaggy/Documents/Summer Internship
> 2020/venv/lib/python3.6/site-packages/django/contrib/admin/__init__.py",
> line 26, in autodiscover
> autodiscover_modules('admin', register_to=site)
>   File "/home/spaggy/Documents/Summer Internship
> 2020/venv/lib/python3.6/site-packages/django/utils/module_loading.py", line
> 47, in autodiscover_modules
> import_module('%s.%s' % (app_config.name, module_to_search))
>   File "/usr/lib/python3.6/importlib/__init__.py", line 126, in
> import_module
> return _bootstrap._gcd_import(name[level:], package, level)
>   File "", line 994, in _gcd_import
>   File "", line 971, in _find_and_load
>   File "", line 955, in
> _find_and_load_unlocked
>   File "", line 665, in _load_unlocked
>   File "", line 678, in exec_module
>   File "", line 219, in
> _call_with_frames_removed
>   File "/home/spaggy/Documents/Summer Internship
> 2020/AI_legal/AI_legal/case_archives/admin.py", line 4, in 
> admin.site.register(Article)
>   File "/home/spaggy/Documents/Summer Internship
> 2020/venv/lib/python3.6/site-packages/django/contrib/admin/sites.py", line
> 103, in register
> for model in model_or_iterable:
> TypeError: 'ModelBase' object is not iterable
>
>
>
> --
> 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/2208da1b-3469-4a30-ab7e-4fda4016fe8bo%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/CAP5HUWpZ1-R8GTsCj-050VP%2B-cYqxqb7aUhwPA0DPDqmdt_OZQ%40mail.gmail.com.


Re: Please help me out!!!!!

2020-06-03 Thread Integr@te System
Hi freind,

You ever check typo in your code in base.html on for loop at "noti"!?

gl!

On Wed, Jun 3, 2020, 2:20 PM meera gangani  wrote:

> Hello Django-users
>
> href is not working
> here is my views.py file and my urls.py file
>
> Please Help me out!!
>
> Thank you in advance
> -Meera
>
> --
> 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/CANaPPPLbk6JV8tQjxkKUiN-H%3D_JLHjztMQfGLK6oUx9ootEojg%40mail.gmail.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/CAP5HUWq7YG2-b7ZanR%3DzYwkbv4wBw6-5qo%3DsMVBb5r3%2BfB%3DRYg%40mail.gmail.com.


Re: email": [ "Enter a valid email address." ]

2020-03-27 Thread Integr@te System
Hi Freind,

Plz look back the doc in Emailvalidator and decive your use case:

https://docs.djangoproject.com/en/3.0/ref/validators/#django.core.validators.EmailValidator.whitelist

On Fri, Mar 27, 2020, 18:19 Ben Magnelli  wrote:

>  AUTH_USER_MODEL = 'users.User
>
>
> Yep, I have that in settings.py
>
> In serializers.py if I change EmailField to CharField, it does serialize.
> However, then it’s not really checking if it’s a email. And EmailField
> should work.
>
> class User(AbstractBaseUser, PermissionsMixin):
>>>> email = models.CharField(max_length=256, unique=True)
>>>>
>>>> Thank you DjangoUsers
>
> On Mar 27, 2020, at 4:49 AM, Motaz Hejaze  wrote:
>
> 
> I think django doesnt recognize your custom user model ..
>
> Did you your app to installed app and put AUTH_USER_MODEL = 'myapp.MyUser'
>
> in settings.py ?
>
> On Fri, 27 Mar 2020, 3:33 am devyen,  wrote:
>
>> Hi
>>
>> Do know how to whitelist an email domain name? It seems odd that I would
>> have to go though an white list all of the main email domains (gmail,
>> protonmail, live, yahoo etc.)
>>
>> Ive been unable to figure it out on my own
>>
>> Thanks,
>>
>>
>>
>> On Sat, Mar 21, 2020 at 4:45 AM Integr@te System <
>> datacentral...@gmail.com> wrote:
>>
>>> Hi Freind,
>>>
>>> Try to set whitelist for your specific domain testing or refer doc for
>>> your case.
>>>
>>>
>>> On Sat, Mar 21, 2020, 03:47 devyen  wrote:
>>>
>>>> Hi,
>>>>
>>>> I am tying to use the EmailField in my AbstractBaseUser Class see
>>>> below. However the serializer does not recognize any emails as valid (I
>>>> tested with this one, which is clearly valid)
>>>>
>>>> Can you help me?
>>>>
>>>> Thank you so much!
>>>>
>>>>
>>>> models.py
>>>>
>>>> class User(AbstractBaseUser, PermissionsMixin):
>>>> email = models.EmailField(max_length=256, unique=True)
>>>> first_name = models.TextField(verbose_name="First Name", blank=True)
>>>> last_name = models.TextField(verbose_name="Last Name", blank=True)
>>>> user_id = models.TextField(unique=True)
>>>> data = JSONField(default=default_data, name="device_data")
>>>> is_staff = models.BooleanField(default=False)
>>>> is_active = models.BooleanField(default=True)
>>>> date_joined = models.DateTimeField(default=timezone.now)
>>>>
>>>> objects = UserManager()
>>>>
>>>> USERNAME_FIELD = 'email'
>>>>
>>>> def __str__(self):
>>>> return self.email
>>>>
>>>> def get_first_name(self):
>>>> return self.first_name
>>>>
>>>> def get_last_name(self):
>>>> return self.last_name
>>>>
>>>> def get_email(self):
>>>> return self.email
>>>>
>>>> def __unicode__(self):
>>>> return self.email, self.user_id
>>>>
>>>> def get_user_id(self):
>>>> return self.user_id
>>>>
>>>> serializers.py
>>>>
>>>> from rest_framework import serializers
>>>> from .models import User
>>>>
>>>>
>>>> class UserSerializer(serializers.ModelSerializer):
>>>> class Meta:
>>>> model = User
>>>> fields = ['email', 'password']
>>>>
>>>>
>>>> part of views.py
>>>>
>>>> class UserRegistration(APIView):
>>>> def post(self, request):
>>>> serializer = UserSerializer(data=request.data)
>>>> if serializer.is_valid():
>>>> print('valid')
>>>> user_object = []
>>>> email = serializer.validated_data['email']
>>>> password = serializer.validated_data['password']
>>>> if "first_name" in serializer.validated_data:
>>>> first_name = serializer.validated_data['first_name']
>>>> user_object.append(first_name)
>>>> else:
>>>> pass
>>>> if "last_name" in serializer.validated_data:
>>>> last_name = serialize

Re: email": [ "Enter a valid email address." ]

2020-03-21 Thread Integr@te System
Hi Freind,

Try to set whitelist for your specific domain testing or refer doc for your
case.


On Sat, Mar 21, 2020, 03:47 devyen  wrote:

> Hi,
>
> I am tying to use the EmailField in my AbstractBaseUser Class see below.
> However the serializer does not recognize any emails as valid (I tested
> with this one, which is clearly valid)
>
> Can you help me?
>
> Thank you so much!
>
>
> models.py
>
> class User(AbstractBaseUser, PermissionsMixin):
> email = models.EmailField(max_length=256, unique=True)
> first_name = models.TextField(verbose_name="First Name", blank=True)
> last_name = models.TextField(verbose_name="Last Name", blank=True)
> user_id = models.TextField(unique=True)
> data = JSONField(default=default_data, name="device_data")
> is_staff = models.BooleanField(default=False)
> is_active = models.BooleanField(default=True)
> date_joined = models.DateTimeField(default=timezone.now)
>
> objects = UserManager()
>
> USERNAME_FIELD = 'email'
>
> def __str__(self):
> return self.email
>
> def get_first_name(self):
> return self.first_name
>
> def get_last_name(self):
> return self.last_name
>
> def get_email(self):
> return self.email
>
> def __unicode__(self):
> return self.email, self.user_id
>
> def get_user_id(self):
> return self.user_id
>
> serializers.py
>
> from rest_framework import serializers
> from .models import User
>
>
> class UserSerializer(serializers.ModelSerializer):
> class Meta:
> model = User
> fields = ['email', 'password']
>
>
> part of views.py
>
> class UserRegistration(APIView):
> def post(self, request):
> serializer = UserSerializer(data=request.data)
> if serializer.is_valid():
> print('valid')
> user_object = []
> email = serializer.validated_data['email']
> password = serializer.validated_data['password']
> if "first_name" in serializer.validated_data:
> first_name = serializer.validated_data['first_name']
> user_object.append(first_name)
> else:
> pass
> if "last_name" in serializer.validated_data:
> last_name = serializer.validated_data['last_name']
> user_object.append(last_name)
> else:
> pass
>
> # serializer.save()
> return Response(user_object, status=status.HTTP_201_CREATED)
> return Response(serializer.errors, status=status.HTTP_400_BAD_REQUEST)
>
>
> I send this:
>
> http -f POST http://127.0.0.1:8000/reg email='k...@k.com', password='pw'
>
> to receive this error:
>
> {
>
> "email": [
>
> "Enter a valid email address."
>
> ]
>
> }
>
> --
> 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/bc92176b-7eb2-4e2a-a8a0-215eef7392c7%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/CAP5HUWrxXTmMovbmz2KCUG6%3DRMy10fNW6A-hkQdkbNWqZxYGNw%40mail.gmail.com.


Re: User Athentication Issue

2020-03-18 Thread Integr@te System
Hi Irfan,

Plz try to consider cookies with connection session on this user for which
other happen.

On Wed, Mar 18, 2020, 15:56 Irfan Khan  wrote:

> hi every one,
>
> as  implemented the user authentication i have tested it working fine. but
> one issue
> is when ever we logged into the portal then if we again clicks on back
> option in browser it going back to login page.how to prevent it.
>
> thanks in advance.
>
> With Regards,
> *Irfan khan*
>
>
>
> --
> 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/CALKGVioaLT8gCpH2iwniyefibqMG0QDWkShNVb_jdjfjSQ1U-Q%40mail.gmail.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/CAP5HUWpzRf%2BLagaGezeCAY2km9HGGSR4AHFui3NZYkm%3DUyPBBw%40mail.gmail.com.


Re: cant import views

2020-03-18 Thread Integr@te System
Dear Freind,

Plz check where your root project?
Or review base on code base vs. info you ps. at the end.

On Wed, Mar 18, 2020, 12:53 Jatin Agrawal  wrote:

> can you please share your project directory structure.
>
> On Tuesday, March 17, 2020 at 11:33:10 PM UTC+5:30, דביר חומרי wrote:
>>
>> i was following the toturial and i could'nt find why this error is accure.
>> polls/urls.py'
>>
>> from django.urls import path
>>
>> from . import views
>>
>> urlpatterns = [
>> path('', views.index, name='index'),
>> ]
>>
>>
>> and got this error:
>>
>> Traceback (most recent call last):
>>   File "c:\Users\..polls\urls.py", line 20, in 
>> from . import views
>> ImportError: cannot import name 'views'
>>
>> p.s. views.py is in the same directory as urls.py
>>
>> ¶ \
>>
>> --
> 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/a53d067e-3cf2-41b3-b075-d4c9748a8f7d%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/CAP5HUWpwJZHdCKiR9K0-Gy2nHwtfsQ0DS%3D9yMJLwYpkREqkAMQ%40mail.gmail.com.


Re: Django and AWS backend MENTOR NEEDED

2020-03-14 Thread Integr@te System
Hi Tibrewal,

You can use eb, it host your code on it platform and choose many service
around that host you need. You only take care your app code. Just review
aws eb doc again.



On Sat, Mar 14, 2020, 22:37 Harsh Tibrewal  wrote:

> Do you know AWS Elastic Beanstalk with Django
> I have doubts in it
>
> On Sat, Mar 14, 2020 at 5:37 PM Ousseynou Diop 
> wrote:
>
>> Hello how i can help you ?
>> You can reach out to me here @xarala221 https://ousseynoudiop.com
>> 
>> Le vendredi 13 mars 2020 20:48:59 UTC, Harsh Tibrewal a écrit :
>>>
>>> Hi, I have been trying to learn django and AWS for backend of my mobile
>>> applications. However, all my learnig is currently based on open source
>>> youtube and and other forums. There are errors that I get stuck with and
>>> need help to resolve them. Please someone be my mentor and guide. This will
>>> help me learn it faster and I will be happy to work for you on your
>>> projects etc.
>>>
>> --
>> 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/004e81db-1ff5-4e31-aeb5-3f22de91a88c%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/CALXtbmsSd40cjCwuj%2B4injn91u-iwAytwajuuDv%2B1OkxvEzmpQ%40mail.gmail.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/CAP5HUWqU3J79sUzJZK8Xaid%2BWG-d2UhO%3DwJh_WY%3DiKYEx96WEQ%40mail.gmail.com.


Re: Integrating Django Rest Framework with Microsoft Office 365

2020-03-03 Thread Integr@te System
Hi Nosa,

Plz check this doc to set up service-to-service call and thanks to expert's
doc above to perform your task.

https://docs.microsoft.com/en-us/office/office-365-management-api/get-started-with-office-365-management-apis

Hope it useful.


On Sun, Mar 1, 2020, 19:56 Nosa Omorodion 
wrote:

> I am currently trying to consume the Microsoft Office365 API and Expose it
> via DRF to my frontend.
>
> I want to be able to:
>
>1.
>
>Give Role/Permissions to authenticated Users based off of Django
>already existing roles and Permission
>2.
>
>Expose the APIs to my Angular frontend for authentication.
>
> How do i save authenticated users to the Database and give them the
> requisite permission so they authenticate having the given permission the
> next time they login?
>
> --
> 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/e9d9250a-d065-493b-ba58-6117db13a50c%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/CAP5HUWqDrkGOoDB0%3DQZwAP086AV%3DdsT-xdz3y0oORbFuZaeGHg%40mail.gmail.com.


Re: DjangoProject related queries: what is name(means unknown random number) after HTTP status code.

2020-03-02 Thread Integr@te System
Hi Lahu,

Check Django doc for your idea
https://github.com/django/django/blob/stable/2.2.x/django/utils/log.py


Nice.

On Mon, Mar 2, 2020, 19:37 Lahu Chavan  wrote:

> when we run command on teminal python manage.py runserver after will get
> local server IP address click on immediately, one hand will open a
> webbrowser page of django project and another hand on terminal continue
> processing in format  [Date]  "HTTP method"  HTTP status code | unknown
> random number.
>
>
>
> *my question is what is name(means *unknown random number)*  after HTTP
> status code.*
>
>
>
> *Please share answer as soon as possible*
>
>
>
> System check identified no issues (0 silenced).
> February 28, 2020 - 06:31:46
> Django version 3.0.3, using settings 'pydjblog.settings'
> Starting development server at http://127.0.0.1:8000/
> Quit the server with CTRL-BREAK.
> [28/Feb/2020 06:31:52] "GET / HTTP/1.1" 200 3295
> [28/Feb/2020 06:31:52] "GET /static/css/custom.css HTTP/1.1" 304 0
> [28/Feb/2020 06:31:52] "GET /static/popper.min.js HTTP/1.1" 404 1665
> [28/Feb/2020 06:31:52] "GET /static/bootstrap.min.js HTTP/1.1" 404 1674
>
>
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/bbdc4dec-e77d-46ba-ad5a-1c500e1539f4%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/CAP5HUWpDUXYxgh8S7TaGjydUj6FDOKm8Dc37Qyq92nAYt3i6Hg%40mail.gmail.com.


Re: Issue in the API while merging the two data frames

2020-03-01 Thread Integr@te System
Hi Devend,

Would we consider the problem like math to solve, base on specific case to
choose appropriate/mixing ways!? Look like:
... Break it down
... Take general parts -> solve it
and/or transform discrete part -> solve it
(assume special values like None, null, 0, var ... any if suitable)

e.g json <-> dict <-> list <-> csv

Or this is Django doc for quick reference if useful for you.


Welcome.


On Sat, Feb 29, 2020, 06:04 Devendra reddy 
wrote:

> Hi to all,
>
> I have two data frames in the python django API.one dataframe we are
> getting from the query and one data frame we are getting the XL file.how I
> want map this dataframes.in this equipment name and tag name are
> common.while merging one tag is missing or it is going to be updated with
> another tag in that dataframe repetition is happening.while giving
> conditions like how = right or left or inner or outer the tag is missing
> and this tag is going to update by the another tag and this tag is coming
> as twice. How can I solve this?
> Please suggest me solution.
>
> Thanks and 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/CABB0Uf3Zjwgz0ornPwnBe52LKwRHni0gTY8sJh9Lbgo2yghyZQ%40mail.gmail.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/CAP5HUWqoy7eYnetHn1Jo8Ldm19MK4_OjHWeyUuCjLFzgm5U%3DOQ%40mail.gmail.com.


Re: Serializing forms and formsets to pass to Celery task

2020-02-29 Thread Integr@te System
Hi Bernd,

You could take a look at serializers section on Note part, for more
information, and may be your own answer.

http://docs.celeryproject.org/en/master/userguide/calling.html#calling-serializers





On Sat, Feb 29, 2020, 23:56 Naveen Arora  wrote:

> Yes that would work well. You can always find a completely different way
> of achieving what you are trying to achieve.
>
> On Saturday, 29 February 2020 18:52:24 UTC+5:30, Jason wrote:
>>
>> As said before, you really can't do that too well with celery.  Its a
>> good practice to keep the message body between django -> broker -> worker
>> to be as small as possible because we don't know what your configuration
>> for the broker is.  In addition, you should never, ever, put sensitive
>> information in a message, just the identifier of a thing and let
>> celery/django pull from a data store when the task starts.
>>
>> what I would do is save the form data to some intermediate data store,
>> and pass in the identifier to the celery task for retrieval.  That ensures
>> your data integrity and security is high.
>>
> --
> 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/3f1b4374-ca68-4fcd-a33a-555bc72cbae8%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/CAP5HUWoh-tyPwwZviSpzu85G_eawSRkhnuDp5AzgkbW5zeogxg%40mail.gmail.com.


Re: About Django performance

2020-02-28 Thread Integr@te System
Hi Freinds,

Plz try some search example:
https://python-socketio.readthedocs.io/en/latest/intro.html

But first let us look at:
https://www.djangoproject.com/conduct/
Thank.

On Fri, Feb 28, 2020, 19:53 Motaz Hejaze  wrote:

> What is the type of data ??
>
> What is the expected amount to be transfered by second ?
>
> Its not only django , its the server type and the database type ..
>
> On Fri, 28 Feb 2020, 1:36 pm Gil Obradors,  wrote:
>
>> Hi !
>> I 'm curious too!
>>
>> How much data?
>>
>> With CPU and RAM, may be the problem will be in Wifi Channel, instead of
>> at the server.
>>
>> You will explain us ;)
>>
>> Thank you!
>>
>> Missatge de 이바울  del dia dv., 28 de febr. 2020 a les
>> 11:33:
>>
>>> I'm trying to build a server.
>>>
>>> Data transmitted from the wireless communication device enters the
>>> database via this server.
>>>
>>> We will use Message Queue to avoid losing data (VernaMQ).
>>>
>>> I'm curious to see if Django is a suitable server for sending and
>>> receiving data from multiple wireless devices, and if there is a problem,
>>> is there an alternative to using Django?
>>>
>>> --
>>> 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/581a2e10-95fd-47c9-a680-3eeaf7a8eb1e%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/CAK-JoTQn6H9dU%2B52bVqmjuidxPStAzUSJNSrcbv%2B4r3xxCTCjw%40mail.gmail.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/CAHV4E-c09P0S-yp-5Ad10rcHK7bFKuNnaRPF9iM9NiE9HWrU6w%40mail.gmail.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/CAP5HUWomPC7VEC6M7esmQQV7tH_Y8-rx8Pzapee%2B4PBLU%2BqtVQ%40mail.gmail.com.


Re: How to trigger system check while running development server?

2020-02-27 Thread Integr@te System
Hi Fr,

If you have not yet found out module/method for you, so let try git action
as on your dev phase with git repo.

On Thu, Feb 27, 2020, 21:32 One Above All 
wrote:

> I am updating a settings in my test which should raise exception on
> illegal entries, but merely updating settings does not make django perform
> system checks. Is there any method which I can call to trigger those
> checks?
>
> --
> 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/7e9b4e35-0b4a-4c2b-864a-8631ff83ac8b%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/CAP5HUWobOzYhCsN%3DSnSy9wonExWdBxubRXGwueCgPJvHb1dcJQ%40mail.gmail.com.


Re: 'ssl_disabled' is an invalid keyword argument for connect()

2020-02-25 Thread Integr@te System
Hi Steve,

Plz review again to take a right parameter.
Welcome.


On Wed, Feb 26, 2020, 05:54 Stephen Loughin  wrote:

> The django doc
> s say I
> can pass OPTIONS for the db connection here:
>
> DATABASES = {
>
> 'default': {
> 'ENGINE': 'django.db.backends.mysql',
> 'OPTIONS': {
> 'ssl_disabled': 'True',
> },
> 'NAME': 'somedatabase',
> 'USER': 'someuser',
> 'PASSWORD': 'somepassword',
> 'HOST': '10.0.0.1',
> 'PORT': '3306',
> }
>
> Yet when I try python manage.py runserver I get this:
>
> TypeError: 'ssl_disabled' is an invalid keyword argument for connect()
>
> I have also tried 'ssl_disabled': True,  # that is an actual boolean
> rather than string...
> Same result.  Running django 3 and python 3.7.4
>
> Thanks,
> -- Steve
> sloug...@gmail.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/CAHM1-MAfUCJtZG5%2B5bOMO_bzYr6E8J%2BO28YNxXPZD4MZNyj5eg%40mail.gmail.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/CAP5HUWqDbyHiQ170z147CmTsq3-1UTx2Z7hpLntui7BFV7MSuA%40mail.gmail.com.


Re: reg: Error:-django.db.utils.OperationalError: (1170, "BLOB/TEXT column 'Description' used in key specification without a key length")

2020-02-24 Thread Integr@te System
Hi Freind,

For simplify and minimize your dev time, review first in your err, code
base.
Thank your sharing and dont forget zen.


On Mon, Feb 24, 2020, 21:43 'Amitesh Sahay' via Django users <
django-users@googlegroups.com> wrote:

> Hi,
>
> I am creating a model, which is taking a description as text field. when I
> migrate I see the below error:
>
> django.db.utils.OperationalError: (1170, "BLOB/TEXT column 'Description'
> used in key specification without a key length")
>
> ON further research I came to know that its some limitation with MySQL. I
> am using MYSQL for my dev. Below is the link that describes the issue.
>
> MySQL error: key specification without a key length
> 
>
> MySQL error: key specification without a key length
>
> I have a table with a primary key that is a varchar(255). Some cases have
> arisen where 255 characters isn't enou...
>
> 
>
> *So what am I suppose to use if not TextField? I have tried CharField,
> that doesn't work either. Below is the model details:*
>
>
>
>
>
>
>
>
>
> *class OnlineShop(models.Model): Product_name =
> models.CharField(max_length=100, unique=True) Price = models.IntegerField()
> Slug = models.SlugField(max_length=250, unique=True) Description =
> models.TextField() Curr_Time = models.DateTimeField(auto_now_add=True) def
> __str__(self): return '{}'.format(self.Product_name)*
>
>
> Regards,
> Amitesh Sahay
> *91-750 797 8619*
>
> --
> 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/1073924601.858407.1582555396348%40mail.yahoo.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/CAP5HUWpJ2DTZUpacOdoisnT3_uSPebQ5D03H9i%2BN-PtehATrTg%40mail.gmail.com.


Re: Selecting all and posting

2020-02-24 Thread Integr@te System
Hi Isaac,

Plz review and attempt sth like this sample:

as we have with any type of fields you like for user input :

sth.html


 Click On 


const checkbox = document.querySelector('input[type=checkbox]');
const button = document.querySelector('button');
checkbox.onchange = () => {
if (checkbox.checked) {
button.onclick = () => {  alert('Alert sth of user input. ');
};
}
};


If you asign any id of each input tag or type, you can map to db, that base
on your declare and define.



On Mon, Feb 24, 2020, 10:31 maninder singh Kumar 
wrote:

> There is a doubt about the model
>
>
> [image: --]
>
> Maninder Kumar
> [image: http://]about.me/maninder.s.kumar
> 
>
>
>
>
> On Mon, Feb 24, 2020 at 4:37 AM Rishabh Gupta 
> wrote:
>
>> I can help give me checkout . You need to use of javascript .You can
>> take id from input field and place in value
>>
>> On Sun, Feb 23, 2020 at 9:12 PM Isaac Ndutumo 
>> wrote:
>> >
>> > Am working on a hospital system where the billing model requires users
>> to select varies items from the bill list and post them by creating a
>> receipt or an invoice. Am new in JavaScript programming combined with
>> Django.
>> >
>> > Any help on below tasks will be highly appreciated
>> >
>> > Select all or few and post either as a receipt or invoice.
>> > Show total of selected items dynamically
>> >
>> >
>> >   Find attached capture for bill view.
>> >
>> > --
>> > 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/1b59fa26-910c-4fb6-81c4-a7b38291abf7%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/CACpDem3efVDbusZHhJGWvLh_F1epgK4nEO2hNxe5%2BdnO5ObJDw%40mail.gmail.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/CABOHK3R71Jjz6TyB566ExsuA7bNk0FBEcYLf0vMoFuNV8TZwag%40mail.gmail.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/CAP5HUWp7Vjt2mfAwWg%3DGMNMvUcPb_KtVtYaeOCcKrYwfapsgQA%40mail.gmail.com.


Re: Django Migration gives an error with OneToOneField

2020-02-23 Thread Integr@te System
Hi,

Would u consider any relative details with result!?

Or try some cmd to more status:
https://docs.djangoproject.com/en/2.2/topics/migrations/

On Mon, Feb 24, 2020, 00:43 maninder singh Kumar 
wrote:

> I am working on an application with two databases and two different
> dbRouters.  On migrating a model with a OneToOneField I get the following
> error :
>
> django.db.utils.OperationalError: (1824, "Failed to open the referenced
> table 'auth_user'")
>
>
> The auth dbRouter is for the [auth, sessions, contenttypes, admin] apps
> while the Redford dbRouter is for the main app.
>
> Below is the code for the routers :
>
>
> *auth dbRouter*
>
>
> class AuthRouter:
> """
> A router to control all database operations on models in the
> auth and contenttypes applications.
> """
> route_app_labels = ('auth', 'contenttypes', 'sessions', 'admin')
>
> def db_for_read(self, model, **hints):
> """
> Attempts to read auth and contenttypes models go to auth_db.
> """
> if model._meta.app_label in self.route_app_labels:
> return "default"
> return False
>
> def db_for_write(self, model, **hints):
> """
> Attempts to write auth and contenttypes models go to auth_db.
> """
> if model._meta.app_label in self.route_app_labels:
> return "default"
> return False
>
> def allow_relation(self, obj1, obj2, **hints):
> """
> Allow relations if a model in the auth or contenttypes apps is
> involved.
> """
>
> if (obj1._meta.app_label in self.route_app_labels or
> obj2._meta.app_label == 'julia' or 'redford'
> ):
> return True
> return None
>
> def allow_migrate(self, db, app_label, model_name=None, **hints):
> """
> Make sure the auth and contenttypes apps only appear in the
> 'auth_db' database.
> """
>
>
> if db == 'default':
> # Migrate Django core app models if current database is home
> if app_label in ('auth','admin','sessions','contenttypes'):
> return True
>
> else:
> return False
>
> # Non Django core app models should not be migrated if
> database is home
> # Other database should not migrate Django core app models
>
>
> elif app_label in ['auth','admin','sessions','contenttypes']:
> return False
> # Otherwise no opinion, defer to other routers or default database
> return None
>
>
>
> *Redford dbRouter*
>
>
> class RedfordRouter(object):
>
> route_app_labels = ('auth', 'contenttypes', 'sessions', 'admin')
>
> def db_for_read(self, model, **hints):
> if model._meta.app_label == 'redford':
>   return 'redford_db'
> return False
>
> def db_for_write(self, model, **hints):
> if model._meta.app_label == 'redford':
>   return 'redford_db'
> return False
>
> def allow_relation(self, obj1, obj2, **hints):
> if obj1._meta.app_label == 'redford' or obj2._meta.app_label ==
> 'auth':
> return True
> return None
>
> def allow_migrate(self, db, app_label, model_name=None, **hints):
>
> if db == 'default' or app_label in self.route_app_labels:
> print(db, app_label)
> return None
> elif db == 'redford_db':
> if app_label == 'redford':
> return True
> return False
> return None
>
>
> The code for the models is as below :
>
>
> class Employer(models.Model):
>  emp_Name = models.OneToOneField(User, on_delete=models.CASCADE,
>  null=True)
>  emp_Company = models.CharField(max_length=100)
>  emp_Address = models.CharField(max_length=500)
>  emp_Tel = models.CharField(max_length=100)
>  emp_JobTitle = models.CharField(max_length=200, null=True)
>  emp_JobDesc = models.CharField(max_length=600, null=False)
>
>  def __str__(self):
>  return self.emp_Name
>
>
> Hope we can work it out
>
>
> regards
>
>
> [image: --]
>
> Maninder Kumar
> [image: http://]about.me/maninder.s.kumar
> 
>
>
>
> --
> 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/CABOHK3QsWztSogPx_RzbYcZ46WyK0cHV8JxXBuRSbr2epeQKhg%40mail.gmail.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 

Re: Django - CreateView not saving form with nested formset

2020-02-23 Thread Integr@te System
Hi Shazia,

Plz search somewhere like this if u see for helpful:
https://github.com/philgyford/django-nested-inline-formsets-example



On Sun, Feb 23, 2020, 14:01 Shazia Nusrat  wrote:

> Hi,
>
> Can someone help to answer the question in link?
> Also I've been trying to get CreateView working with 5 inline formsets but
> couldn't make it work.
>
> Will really appreciate your help if someone can help me with working
> example.
>
> Question:
> https://stackoverflow.com/questions/60354976/django-createview-not-saving-form-with-nested-formset
>
> Regards,
>
> Shazia
>
> --
> 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/CAD83tOx%3D0DBWuGQT4c-zp0gK7PGm5JG2KQnKgCjOWD7q7NoscQ%40mail.gmail.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/CAP5HUWroUmURgQPiLGDC8XRA34vdVEiZQfxC_BbZPBBaxE7k3A%40mail.gmail.com.


Re: Django mysql db issue

2020-02-22 Thread Integr@te System
Hi Maturure,


Plz look at limitation of char field and option in dj doc:
https://docs.djangoproject.com/en/dev/ref/databases/#character-fields



On Sat, Feb 22, 2020, 14:52 Perceval Maturure  wrote:

> Dear all
>
> Is there anyone experiencing the below with python3.7 Django 2.2
>
> django.db.utils.OperationalError: (1074, "Column length too big for column
> 'url' (max = 16383); use BLOB or TEXT instead")
>
> --
> 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/5F0F1C12-C0D9-4B3E-8659-2048103658D2%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/CAP5HUWq0zB3dtr1WdhyrNj1CiXKOgM1SCSPkF6wwD7yh%2BMNkWw%40mail.gmail.com.


Re: Django Channels inifnate group expair time or any alternative solution

2020-02-18 Thread Integr@te System
Hi Naveen,

Plz look at autobahn lib for all your purpose:
https://crossbar.io/autobahn/



On Tue, Feb 18, 2020, 12:16 pot-potato  wrote:

> Dear Django-Team,
>
> I trying to create an IoT application with Django Channels, this is my plan
>
>- I have is a python program that can fetch data from several hardware
>devices(PLC, Smart Sensors, etc..) and publish data into the Redis channel
>(this program is running 24/7 and 365 days).
>- Now I want to forward this data into UI framework (Vue js) using
>Django (latest) + Channels (latest). Once the UI framework received this
>data I will render using charts and other animations. (this program should
>running 24/7 and 365 days )
>- So far I have understood that Django can't directly listen to Redis
>PubSub Channel and send data through WebSockets to all connected clients. (
>Reference link
>
> 
> )
>- So I want to run one more program which can run along with Django
>Server and listens to Redis channels and sends data to Django-Channels
>Group (As you know once channels group receives data it will broadcast to
>all connected client on the same group)
>- But I am facing a few issues,
>   - I have read that the channels group will expire after 24 hours.
>   How to handle this situation?
>   - I am not sure how stable is my methodology. Is it a better way to
>   do for an application that should run for a lifelong time?
>   - Somehow if I managed above two points, how to pack this entire
>   application and distribute it?
>
> So far I have done, once the Django server is running, I am starting an
> application and posting data into WebSocket endpoint then it's broadcasting
> the same data to all connected clients.
>
> But it's not sable and throwing an exception after 2-3 hours. I have
> attached Publisher and Subscriber code below for your ref.
>
> *If I stabilize this application I want to make this application
> open-source so Django can be used for IoT application as well*
>
> [image: Base.png]
>
> import redis
> import time
> import traceback
> from datetime import datetime
> import random
> import json
>
> def Publish():
>try:
>r = redis.StrictRedis(host='127.0.0.1', port=6379)#
> Connect to local Redis instance
>p = r.pubsub()
>while True:
>for i in range(10):
>topicname = 'ch' + str(i)
>randnum = random.randint(1,100)
> mydict = {'Temperature': randnum}
>data = json.dumps(mydict)
>r.publish(topicname, data)
>  # PUBLISH Data on topic
>print(f"{datetime.now()} Published Data {data} on Topic {
> topicname}")
>time.sleep(1)
>
> except Exception as e:
>print("!! EXCEPTION !")
>print(str(e))
>print(traceback.format_exc())
> if __name__ == "__main__":
>Publish()
>
>
> import time
> import traceback
> from datetime import datetime
> import redis
> import json
> import websocket
> ws = websocket.WebSocket()
> ws.connect("ws://127.0.0.1:8000/ws/dashboard/")
>
> def Subscribe():
>try:
>r = redis.StrictRedis(host='127.0.0.1', port=6379,decode_responses=
> True)  # Connect to local Redis instance
>topicname = ['ch0','ch1','ch2','ch3','ch4']
>p = r.pubsub()
>
>p.subscribe(topicname)
>p.get_message()
> print(f"Subscriber Started For Topic {topicname}...")
>for message in p.listen():
>  # Checks for message
>data = message['data']
>#print(data)
>if type(data) == str:
>j_data = json.loads(data)
>#print(data)
>ws.send(data)
>print(f"{datetime.now()} Data is : {j_data}")
>
>except Exception as e:
>print("!! EXCEPTION !")
>print(str(e))
>print(traceback.format_exc())
>
> if __name__ == "__main__":
>Subscribe()
>
> --
> 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/286c8240-1271-4382-b78d-67e510b1fa94%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 

Re: [Django] Error occured while saving a form created through model formset factory

2020-02-15 Thread Integr@te System
Hi,

Plz check about:
 HttpResponseRedirect('/gspapp/ModelGSPRequestList')

On Sat, Feb 15, 2020, 13:15 Dilipkumar Noone  wrote:

> Hi Maninder,
>
> This error seems because i used choice field which actually use names as
> values but django expects the id.
>
> As Django automatically creates a ModelChoicefield for a Foreign Key which
> use the correct values,i modified the code as below in forms.py.
>
> I have a requirement to populate only unique values for registered_model
> from the values returned from ModelRegister .
>
> I modified the code as below and now i am able to get the unique values .
>
>
> 
> def unique_values():
> return
> [("","---")]+list(ModelRegister.objects.values_list('model_name','model_name').order_by('model_name').distinct())
>
> registered_model = forms.ChoiceField(required=False,choices=unique_values)
>
> 
>
> registered_model = 
> forms.ModelChoiceField(queryset=ModelRegister.objects.values_list('model_name',flat=True).order_by('model_name').distinct())
>
>
> 
>
> Error is resolved now.
>
>
>
>But once i fill all the values in formset and submit the form.
>
>Not able to redirect to List View. Even if i click on submit button it
>stays on the same page.Anything needs to be taken care during POST request
>to save the created model formsets in the database.in the
>-
>
>
>-
>
>*def create_model_gsp_request_form(request,id=None):
>print("Inside create_model_gsp_request_form")
>template_name = "ModelGSPRequest.html"
>heading_message = "ModelGSPRequest"
>
>if id:
>action = 'edit'
>model = get_object_or_404(ModelGSPRequest, pk=id)
>else:
>action = 'submit'
>model = ModelGSPRequest()
>
>message = ""
>
>if request.method == 'GET':
>print("Get request in create_model_gsp_request_form")
># we don't want to display the already saved model instances
>#formset = 
> ModelGSPRequestFormSet(queryset=ModelGSPRequest.objects.none(),instance=model)
>formset = ModelGSPRequestFormSet()
>#registered_model_details = serializers.serialize("json", 
> ModelRegister.objects.all())
>#print("registered_model_details:", registered_model_details)
>elif request.method == 'POST':
>print("post request in create_model_gsp_request_form")
>formset = ModelGSPRequestFormSet(request.POST,request.FILES)
>if formset.is_valid():
>for form in formset:
># only save if name is present
>#if form.cleaned_data.get('name'):
>
>new_form = form.save(commit=False)
>new_form.model_gsp_requester = request.user.username
>new_form.save()
>formset.save_m2m()
>#return redirect('ModelGSPRequestList')
>return HttpResponseRedirect('/gspapp/ModelGSPRequestList')
>return render(request, template_name, {
>'formset': formset,
>'heading': heading_message,
>#'registered_model_data': registered_model_details,
>'action':action
>})*
>
>-
>
>
>
>
> Regards,
> N.Dilip Kumar.
>
>
> On Monday, February 10, 2020 at 12:11:42 AM UTC+5:30, Dilipkumar Noone
> wrote:
>>
>>  I am a Django learner.
>>
>> 1.I have a requirement to create the multiple forms in a single page for
>> a model.
>> 2.So i created the formset using modelformset_factory.
>> 3.I have 2 models.
>> a)ModelRegister b)ModelGSPRequest. 4.ModelGSPRequest has a field named
>> registered_model which is a foreignKey to ModelRegister. 5.But after i
>> input all the fields for a modelformset and click on submit to save. I am
>> facing below error with the foreign key field.
>>
> --
> 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/9d67053f-c0e1-4f68-b875-7886b62ea5fd%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 

Re: Migrated code is not working in Django

2020-02-08 Thread Integr@te System
Hi Ram,

plz show error code.

On Sun, Feb 9, 2020, 01:03 Ram  wrote:

> Hi,
>
> I just noticed that the migrations table in Postgres is not updated though
> we reset all the previous migrations. Do I need to run any step in the
> database side whenever integrate new code drop? Unfortunately, we are not
> using the GIT method yet to bring over the new code.
>
> Best regards,
> ~Ram
>
> On Sat, Feb 8, 2020 at 10:22 AM Ram  wrote:
>
>> Hello DC,
>>
>> Thank you for your email. We have added code for user's registration
>> where users use
>>
>> 1. sign up form and submit the form
>> 2. upon submission users get a message about the next steps for
>> activating their registration
>>
>> Issue # 1 The issue here is users are not getting any activation email
>> Issue # 2 confirmation message is also incorrect. " *Your Registration
>> is successful! Please contact Admin for Emails validation Link* " I
>> searched for this message in all files and did not find it.
>>
>> Here are the code snippets
>>
>> # signup page
>>> #
>>> def signup_view(request):
>>>if request.method == 'POST':
>>>form = CustomerForm(request.POST)
>>>if form.is_valid():
>>>cust_item = form.cleaned_data
>>>print(cust_item)
>>>saveform = rim_customer(email=cust_item['email'],
>>>reemail=cust_item['reemail'],
>>>password=cust_item['password'],
>>>repassword=cust_item['repassword'],
>>> firstname=cust_item['firstname'],
>>>state=cust_item['state'],
>>>Zip=cust_item['Zip'],
>>>cust_status='0',
>>>mailing=cust_item['mailing'],
>>>referred_by=cust_item['referred_by'])
>>>saveform.save()
>>>
>>># Added the code for sending mail when a customer registered
>>> here EmailMessage is used from Django
>>>activate = ">> + "> Click Here"
>>>sendMailStaus =  EmailMessage('Registration Confirmation',
>>>  "Thank you for
>>> registering with us!. You Activation is pending. Please " + activate +
>>> "",
>>>  settings.EMAIL_HOST_USER,
>>>  [cust_item['email']])
>>>sendMailStaus.content_subtype="html"
>>>sendMailStaus.send()
>>>
>>>form = CustomerForm()
>>>return render(request, 'signup.html',{'form':form, 'success':
>>> 'mail succesfully send'})
>>>else:
>>>messages.error(request, form)
>>># return render(request,"form.html", {'error':error})
>>>else:
>>>form = CustomerForm()
>>>return render(request, "signup.html", {'form': form})
>>>
>>
>>
>>  # SiginUp_With_Transaction
>>> def Popup_signup_view(request):
>>> if request.method == 'POST':
>>> form = CustomerForm(request.POST)
>>> if form.is_valid():
>>> cust_item = form.cleaned_data
>>> saveform = rim_customer(email=cust_item['email'],
>>> reemail=cust_item['reemail'],
>>> password=cust_item['password'],
>>> repassword=cust_item['repassword'],
>>>
>>> firstname=cust_item['firstname'], state=cust_item['state'],
>>> Zip=cust_item['Zip'],
>>> mailing=cust_item['mailing'], cust_status='0',
>>>
>>> referred_by=cust_item['referred_by'])
>>> saveform.save()
>>> email = cust_item['email']
>>> # noinspection PyUnresolvedReferences
>>> sentMailStatus = sendEmail(email, request, saveform.id)
>>> form = CustomerForm()
>>> productid = request.POST['id']
>>> result = transation_Cast(productid, email)
>>>
>>> if sentMailStatus == True:
>>> return HttpResponseRedirect(result)
>>> else:
>>> return HttpResponseRedirect(result)
>>> else:
>>> messages.error(request, form)
>>> # return render(request,"form.html",{'error':error})
>>> else:
>>> form = CustomerForm()
>>> return render(request, "signup.html", {'form': form})
>>>
>>
>> Mail server settings in settings.py
>>
>> EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'  # added by
>>> me
>>> EMAIL_HOST = 'smtp.gmail.com'
>>> #EMAIL_PORT = 465
>>> EMAIL_USE_TLS = True
>>> #EMAIL_USE_SSL = True
>>> EMAIL_PORT = 587
>>> EMAIL_HOST_USER = 'ad...@domain.com'
>>> EMAIL_HOST_PASSWORD = 'domain@123456'
>>>
>>
>> Best regards,
>> ~Ram
>>
>>
>> On Fri, Feb 7, 2020 at 10:28 PM DC  wrote:
>>
>>> Hi ram,
>>>
>>> What’s is not working ? Like static files?

Re: Django - Extending models with multi role users and multiple requirement types

2020-02-03 Thread Integr@te System
Hi,

Plz look at docs for more info:

https://docs.djangoproject.com/en/2.2/intro/overview/


On Tue, Feb 4, 2020, 09:59 Mike Dewhirst  wrote:

> On 4/02/2020 10:41 am, Zameer Ahmed wrote:
> > Hi,
> > I've also posted this question on StackoverFlow and haven't got any
> > response surprisingly. Here is the link
> > <
> https://stackoverflow.com/questions/60048405/django-extending-models-with-multi-role-users-and-multiple-requirement-types
> >.
> >
> > I am new to Django only 1 week and I am stuck with scenario I need
> > help with.
> > This is kind of core concept and I apologize in advance for my lack of
> > knowledge.
> > I've extended the base user model like below with multiple roles. Now
> > each role has distinct requirements for their profiles.
> > I need help to understand that how to extend Students or Staff
> > further. There are two scenario I need to extend them.
> >
> > 1. Both can have similar extended models like addresses below.
> > 2. Both can have different extended models like Students have
> > CurrentCourse and Staff does not. Staff has Salary model and Students
> > does not.
> >
> > class User(AbstractUser):
> > is_student = models.BooleanField(default=True)
> >  is_staff = models.BooleanField(default=True)
>
> is_staff already exists in AbstractUser for purposes of controlling
> whether the user may login to the Admin site. If you really need the
> concept it may be a good idea to think of a different name for your
> field to avoid possible confusion later.
>
> > class Student(models.Model):
> >  user = models.OneToOneField(User, on_delete=models.CASCADE, null=True)
> >  dob = models.CharField(max_length=30, blank=True)
> >  location = models.CharField(max_length=30, blank=True)
>
> Having such a relationship makes  User.is_student  redundant. I wouldn't
> have is_student at all. Likewise is_staff.
>
> > class CurrentCourse(models.Model):
> >  student = models.OneToOneField(Student, on_delete=model.CASCADE)# Can
> > I extend it like this or do i need some other approach?
>
> Not sure what you mean by CurrentCourse. If there are many students and
> many courses you probably want a ManyToManyField between (I presume)
> Course and User. The name CurrentCourse indicates to me that a student
> can be doing only one course (of many) at a time. Without knowing your
> intentions it is difficult to say much more.
>
>
> >  
> >
> > class Staff(models.Model):
> >  ROLES = (('Teacher', 'Teacher'), ('Professor', 'Professor'),
> > ('Administration', 'Administration'))
>
> You have omitted 'Tutor' and that might merge student and staff.
> However, you have the option to connect both Student and Staff to User
> so you retain flexibility to let students also join the staff.
>
> >user = models.OneToOneField(User, on_delete=models.CASCADE, null=True)
> >  role = models.CharField(max_length=100, choices=ROLES)
> >  website = models.CharField(max_length=100, blank=True)
> >
> > # Both types of Users can have multiple addresses and both Students
> > and Staff needs addressess, not sure how to extend this with ForeignKey.
>
> Just think about the real world. Do people share addresses? Do people
> have multiple addresses?  Are students and staff both Users?
>
> Students and staff are both users so on the Address model you might want
> a ManyToManyField pointing to User.
>
> I quite like ManyToManyField because the through table which is
> automatically created can be adjusted to contain additional information
> which describes the relationship. For example, a student might have a
> local residential and a separate postal address as well as a more
> distant parental address. The enhanced through table would be useful for
> differentiating between them.
>
> If a User can have only one address then you need a ForeignKey on User
> which points to an address.
>
> >
> > class Address(models.Model):
> >  street = models.CharField(max_length=200)
> >  city = models.CharField(max_length=50)
> >  country = models.CharField(max_length=50)
> >
> > class Salary(models.Model):
> >  staff = models.OneToOneField(Staff, on_delete=models.CASCADE)
> >  current_salary = models.DecimalField(max_digits=10, decimal_places=2)
> > Finally please let me know how can I apply validators on each model
> > for instance I did sub-classed 'User' to all models instead of Student
> > or Staff. How to apply a validator on OneToOneField like below:
> >
> >  class Salary(models.Model):
> >staff = models.OneToOneField(User, on_delete=models.CASCADE,
> > validators=[some-validator])
> >
> >
> > Thank you in advance for your kind help for this.
> >
> > Best Regards,
> >
> > Zaheer
> > --
> > 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
> >
> 

Re: Test -Error :AssertionError: 404 != 200

2020-02-02 Thread Integr@te System
Hi man,

How about pk you expect to test by declare in test.py with '/post/264, so
!= 200 in result!?


On Sun, Feb 2, 2020, 22:05 Body Abdo  wrote:

> Dear all
>
> I can't do the test -error is
> self.assertEqual(response.status_code, 200)
> AssertionError: 404 != 200
> My code is
> views.py
>
> class DetailPageView(DetailView):
> model = Series
> 
> template_name='/var/www/project/tapelss/movies/archive/templates/archive/detail.html'
>
>
> urls.py
>
> app_name = 'archive'
> urlpatterns =[
> path('',views.indexing, name ='indexing'),
> path('post//', DetailPageView.as_view(), name='post_detail'),
> path('post',HomePageView.as_view(), name ='home'),
> path('page',views.page, name= 'page'),
>
>
> tests.py
>
> def test_post_detail_view(self):
> response = self.client.get('/post/264/')
> no_response = self.client.get('/post/100/')
> self.assertEqual(response.status_code, 200)
> self.assertEqual(no_response.status_code, 404)
> self.assertContains(response,'Nice body content')
> self.assertTemplateUsed(response, 'detail.html')
>
>
>
>
>
> --
> 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/284f9aed-8da2-4697-936c-a86a380f00a5%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/CAP5HUWqTPBf%3DYpHWBZOVdXWmyTfY2KwhWiy7V%3DqREY_nYuRdpw%40mail.gmail.com.


Re: Access to choice-value-constants from templates when using IntegerChoices

2020-01-29 Thread Integr@te System
Hi Dick,

Consider declaring model field by:
https://docs.djangoproject.com/en/3.0/ref/models/fields/#field-choices-named-groups

and template settings




On Thu, Jan 30, 2020, 02:13 Bernhard Dick  wrote:

> Hi,
>
> I'm having trouble with the template-side when I'm converting my code to
> make use of the in version 3 introduced IntegerChoices-Class and I'd like
> to get some tips on doing it right.
>
> My version 2 Code looks like this:
>
> class StateModel(models.Model):
> STATE_DRAFT = 0
> STATE_PUBLISHED = 1
>
> STATE_CHOICES = [
> (STATE_DRAFT, 'draft'),
> (STATE_PUBLISHED, 'published'),
> ]
> state = models.PositiveIntegerField(choices=STATE_CHOICES,
> default=STATE_DRAFT)
>
> In the template for a ListView I want to show an edit button next to all
> instances that are not yet published or where the current user has
> administrative permissions. Currently that can by done via
> {% if instance.state == instance.STATE_DRAFT or
> perms.appname.manage_entries %} edit {% endif %}.
>
> Now with the use of the IntegerChoices my model looks cleaner:
> class StateModel(models.Model):
> class State(models.IntegerChoices):
> DRAFT = 0, 'draft'
> PUBLISHED = 1, 'published'
> state = models.PositiveIntegerField(choices=State, default=State.DRAFT)
>
> But then I'm not able to access the constant values for the states from my
> templates. Is there a preffered way to circumvent this? One idea would to
> simply add some methods like:
> def isDraft(self):
> return self.state == State.DRAFT
> but that seems a bit boilerplate to me. I think the ideal solution would
> be to have something like a method named isAllowedToEdit in the model,
> which runs all my checks (and could be used elsewhere in the python-side of
> the project). But here I have the problem that I can't pass the permission
> information when calling from the template.
>
>   Regards
> Bernhard
>
> --
> 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/d68305ec-b5cf-4ffe-b4a8-71bed3e690ec%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/CAP5HUWpG2VO7zh9M2O4wTFY32FJ1JFvOakHFLZ%2B7cpNuikqa%3Dg%40mail.gmail.com.


Re: How to express `foo = (bar < quox)` as a constraint

2020-01-27 Thread Integr@te System
Hi All,

Let try sth like sample:
a = True if b <= c else False



On Tue, Jan 28, 2020, 03:24 Simon Charette  wrote:

> I see, I think you'll need to wrap the inner Q in an ExpressionWrapper[0]
>
> That would be
>
> CheckConstraint(check=Q(is_on_sale=ExpressionWrapper(Q(price__lt=F('full_price')),
> output_field=models.BooleanField(
>
> That involves a lot of boilerplate though and it ought to work without all
> of it so I'd submit an optimization ticket
> to allow direct usage of Q objects for boolean field lookup right hand
> sides
>
> Cheers,
> Simon
>
>
> https://docs.djangoproject.com/en/3.0/ref/models/expressions/#django.db.models.ExpressionWrapper
>
> Le lundi 27 janvier 2020 14:32:24 UTC-5, Peter Law a écrit :
>>
>> Hi Simon,
>>
>> Thanks for your response.
>>
>> I did try that, however unfortunately I get an error when running the
>> migration:
>>
>> django.core.exceptions.ValidationError: ["'(AND:
>> )' value must
>> be either True or False."]
>>
>> I'm using Django 2.2 LTS though testing this in 3.0 unfortunately errors
>> in the same way.
>>
>> I think the issue with this spelling is that a `models.Q` isn't expecting
>> to be passed another `models.Q` as a value. I think ideally it would want
>> an expression there, which a `models.F` is closest to, however using a
>> `models.F` relation there also doesn't work (see my response to Stephen's
>> suggestion).
>>
>> Thanks,
>> Peter
>>
>> On Monday, 27 January 2020 18:23:28 UTC, Simon Charette wrote:
>>>
>>> Did you try
>>>
>>> class Item(Model):
>>> price = DecimalField()
>>> full_price = DecimalField()
>>> is_on_sale = BooleanField()
>>>
>>> class Meta:
>>> constraints = [
>>>
>>> CheckConstraint(check=Q(is_on_sale=Q(price__lt=F('full_price'
>>> ]
>>>
>>> I haven't tried it myself but I would expect it to work on Django 3.0.
>>>
>>> Cheers,
>>> Simon
>>>
>>> Le lundi 27 janvier 2020 12:47:37 UTC-5, Peter Law a écrit :

 Hi,

 Thanks for adding support for check constraints in Django 2.2, it's
 great to be able to move constraints into the model definitions.

 I've been trying to work out how to express a constraint which
 validates that the value of one field expresses a relation between two
 other fields, but can't find a nice way to do so.

 I've read through the docs and also found
 https://groups.google.com/d/topic/django-users/6Olh5V1b7Us/discussion,
 but haven't found a concise spelling.

 I've got a model like:

 ```
 class Item(Model):
 price = DecimalField()
 full_price = DecimalField()
 is_on_sale = BooleanField()
 ```

 I'd like to be able to express neatly that the `is_on_sale` boolean be
 true only when `price < full_price`.
 In Postgres I can express this as:

 ```
 ALTER TABLE item
 ADD CONSTRAINT is_on_sale_check
 CHECK (is_on_sale = (price < full_price))
 ```

 However in Django I can't find a way to express this directly.

 I did find a long spelling which essentially checks the True case and
 the False case explicitly and then ORs them together, however it's
 several lines of `models.Q` combinations and not at all clear about
 what the code is trying to achieve.

 Is there a concise way to do this sort of constraint? If not, would it
 be possible for Django to add support for it?

 Thanks,
 Peter

>>> --
> 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/5d9488a8-7e6d-4a96-b009-fd94feb9df86%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/CAP5HUWosH07MsPYC8h%2Bh-3h7uSF%2Bdr2DYaBWQYAby3cQy%3D5QEA%40mail.gmail.com.


Re: Using Daphne without altering nginx config on Google App Engine

2020-01-20 Thread Integr@te System
Hi Rahul,

That right you had a few answer on your previous question, more deeper
perhap you must config reverse proxy connection (tcp sock (ur question)
compatible http)
these are for your custom

https://www.nginx.com/blog/websocket-nginx/?__cf_chl_captcha_tk__=9fc641baf627a1f387f365526786c1929d6228e9-1579534051-0-AQ6HE6aPclHIoe1eXIG58qJDoS8rfLMq6XCSerTbE7DgckT5DZPBe7z03bg-q68-sV0yhL8widMBgAGw8G4rQVAAQZyXbwnOgoiGXirdV1z92FffD_gr342PfSrXFbl-UsEW0vOYeRkvInYe45iSeqG-Ywsp6oxzoE00XcZnQhdRwhZ_nPuT1yoRfmvEA30TB--CWjLH_PN3-Do3Hkj4YSCDoCDulx3TzIfj3oB-n7oGJR86KqcnViZhcZn1r6gAx94Bx0UHzrNV7QStAtWkPex1J5Gp3capZUdwA4qdRPVHQGiiHSaniVjT_PRRiIq6bKVWiEy1nMYt0A0RIs4Aej2LTNy-GrcBsHKXeMuYpE2Z-gocONTNQITbekY5vkK7I10HVaPR-eovREjv8zq-xlg

https://cloud.google.com/appengine/docs/flexible/python/using-websockets-and-session-affinity

>From flex env gcp provided:
https://cloud.google.com/appengine/docs/flexible/

On Mon, Jan 20, 2020, 21:42 Rahul Arora  wrote:

> Thanks but this is not a valid or useful comparison since GAE is a PaaS
> service whereas Nginx is a proxy server. In fact GAE itself uses Nginx
> which is why I'm getting the error from Nginx despite not configuring it
> myself.
>
> Rahul.
>
> On Monday, January 20, 2020 at 3:14:35 PM UTC+8, Integr@te System wrote:
>>
>> Hi Rahu,
>>
>> Plz scrutinize  more info to differ, combine and select right one for
>> your case.
>>
>> https://stackshare.io/stackups/google-app-engine-vs-nginx
>>
>>
>> On Mon, Jan 20, 2020, 12:08 Rahul Arora  wrote:
>>
>>> Thanks for your reply. Is there really no way of using daphne without
>>> altering nginx/supervisord config like we use gunicorn?
>>>
>>> If not, I have some questions based on my efforts so far, please. I will
>>> be grateful for your attention to these. Apologies if they're silly
>>> questions since I'm a beginner:
>>> 1. If I reconfigure nginx and supervisord, how should I make sure the
>>> conf files get picked up by GAE? Should I add something to the app.yaml
>>> file to point to the nginx-app.conf file in the root folder? Should I also
>>> change my runtime declaration to custom, or leave it as python? I find that
>>> whenever I add an nginx-app.conf file in the root folder the build times
>>> out and I get an Error[4] from gcloud app deploy. Otherwise the build
>>> completes fully.
>>> 2. If I am starting a Unix socket for Daphne in the supervisord config
>>> file, what happens to the entrypoint delaration in the ap.yaml file? Do I
>>> delete that?
>>> 3. How do I know what path I should use in the command: "daphne -u /run/
>>> daphne/daphne%(process_num)d.sock". Also, what is process_num?
>>> 4. The new conf files (for nginx and supervisord in the documentation
>>> shared by you) refer to localhost:8000 - should I change this? What is the
>>> TCP socket used by nginx backend?
>>> 5. How can I do things like updating supervisor, "sudo service nginx
>>> reload" etc on the GAE PaaS platform since I'm not operating the instance
>>> directly? Or is this not necessary since I'm creating a whole new build
>>> each time?
>>>
>>> Sorry for the barrage and thanks in advance,
>>> Rahul.
>>>
>>> On Sunday, January 19, 2020 at 1:41:09 PM UTC+8, Integr@te System wrote:
>>>>
>>>> Hi Rahu,
>>>>
>>>> Check chennel_layers setting as a sample in this doc for more helpful
>>>>
>>>> https://channels.readthedocs.io/en/latest/deploying.html
>>>>
>>>>
>>>>
>>>> On Sat, Jan 18, 2020, 21:10 Rahul Arora  wrote:
>>>>
>>>>> Hi all,
>>>>>
>>>>> I'm trying to switch from gunicorn to Daphne for my Django app on GAE
>>>>> Flex, since I need to use Django Channels. Previously the site worked fine
>>>>> with gunicorn as entrypoint (in the app.yaml file). I just replaced it 
>>>>> with
>>>>> daphne so my yamlfile looks like this:
>>>>>
>>>>> runtime: python
>>>>> env: flex
>>>>>
>>>>> runtime_config:
>>>>>   python_version: 3
>>>>>
>>>>> entrypoint: daphne -b 0.0.0.0 -p 8001 my_project_name.asgi:application
>>>>>
>>>>>
>>>>> I've already made a .asgi file next to my .wsgi file and declared an
>>>>> application there.
>>>>>
>>>>> In requirements.txt I've ensured the daphne(2.4.1) and asgiref(3.2.3)
>>>>> packages are the latest 

Re: Using Daphne without altering nginx config on Google App Engine

2020-01-19 Thread Integr@te System
Hi Rahu,

Plz scrutinize  more info to differ, combine and select right one for your
case.

https://stackshare.io/stackups/google-app-engine-vs-nginx


On Mon, Jan 20, 2020, 12:08 Rahul Arora  wrote:

> Thanks for your reply. Is there really no way of using daphne without
> altering nginx/supervisord config like we use gunicorn?
>
> If not, I have some questions based on my efforts so far, please. I will
> be grateful for your attention to these. Apologies if they're silly
> questions since I'm a beginner:
> 1. If I reconfigure nginx and supervisord, how should I make sure the conf
> files get picked up by GAE? Should I add something to the app.yaml file to
> point to the nginx-app.conf file in the root folder? Should I also change
> my runtime declaration to custom, or leave it as python? I find that
> whenever I add an nginx-app.conf file in the root folder the build times
> out and I get an Error[4] from gcloud app deploy. Otherwise the build
> completes fully.
> 2. If I am starting a Unix socket for Daphne in the supervisord config
> file, what happens to the entrypoint delaration in the ap.yaml file? Do I
> delete that?
> 3. How do I know what path I should use in the command: "daphne -u /run/
> daphne/daphne%(process_num)d.sock". Also, what is process_num?
> 4. The new conf files (for nginx and supervisord in the documentation
> shared by you) refer to localhost:8000 - should I change this? What is the
> TCP socket used by nginx backend?
> 5. How can I do things like updating supervisor, "sudo service nginx
> reload" etc on the GAE PaaS platform since I'm not operating the instance
> directly? Or is this not necessary since I'm creating a whole new build
> each time?
>
> Sorry for the barrage and thanks in advance,
> Rahul.
>
> On Sunday, January 19, 2020 at 1:41:09 PM UTC+8, Integr@te System wrote:
>>
>> Hi Rahu,
>>
>> Check chennel_layers setting as a sample in this doc for more helpful
>>
>> https://channels.readthedocs.io/en/latest/deploying.html
>>
>>
>>
>> On Sat, Jan 18, 2020, 21:10 Rahul Arora  wrote:
>>
>>> Hi all,
>>>
>>> I'm trying to switch from gunicorn to Daphne for my Django app on GAE
>>> Flex, since I need to use Django Channels. Previously the site worked fine
>>> with gunicorn as entrypoint (in the app.yaml file). I just replaced it with
>>> daphne so my yamlfile looks like this:
>>>
>>> runtime: python
>>> env: flex
>>>
>>> runtime_config:
>>>   python_version: 3
>>>
>>> entrypoint: daphne -b 0.0.0.0 -p 8001 my_project_name.asgi:application
>>>
>>>
>>> I've already made a .asgi file next to my .wsgi file and declared an
>>> application there.
>>>
>>> In requirements.txt I've ensured the daphne(2.4.1) and asgiref(3.2.3)
>>> packages are the latest versions.
>>>
>>> Finally when I do 'gcloud app deploy', deployment appears to happen
>>> smoothly and in the build logs I can see daphne starting:
>>>
>>>
>>> Step #1: Step 9/9 : CMD exec daphne -b 0.0.0.0 -p 8001 
>>> my_project_name.asgi:applicationStep #1:  ---> Running in c6f3762a5ce2
>>>
>>>
>>> But when I go to the site, I'm seeing a 502 Bad Gateway error on the
>>> site, with "nginx" in the next line.
>>>
>>>
>>> Is there a way to deploy Daphne without going into nginx configurations 
>>> etc? I'm using an app engine only because I wanted to avoid doing 
>>> micro-level tweaks on a cloud machine.
>>>
>>> Thanks,
>>> Rahul.
>>>
>>> --
>>> 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...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/dfb79af0-663c-4581-8fab-f06d2281d875%40googlegroups.com
>>> <https://groups.google.com/d/msgid/django-users/dfb79af0-663c-4581-8fab-f06d2281d875%40googlegroups.com?utm_medium=email_source=footer>
>>> .
>>>
>> --
> 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/663c1f9c-9bdc-4da1-95d6-269c13c6c86b%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/663c1f9c-9bdc-4da1-95d6-269c13c6c86b%40googlegroups.com?utm_medium=email_source=footer>
> .
>

-- 
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/CAP5HUWqzyqwcX98BX%2Bx%2BnOZ3kknonL742FsdHmjLD3hCrL3-3Q%40mail.gmail.com.


Re: Using Daphne without altering nginx config on Google App Engine

2020-01-18 Thread Integr@te System
Hi Rahu,

Check chennel_layers setting as a sample in this doc for more helpful

https://channels.readthedocs.io/en/latest/deploying.html



On Sat, Jan 18, 2020, 21:10 Rahul Arora  wrote:

> Hi all,
>
> I'm trying to switch from gunicorn to Daphne for my Django app on GAE
> Flex, since I need to use Django Channels. Previously the site worked fine
> with gunicorn as entrypoint (in the app.yaml file). I just replaced it with
> daphne so my yamlfile looks like this:
>
> runtime: python
> env: flex
>
> runtime_config:
>   python_version: 3
>
> entrypoint: daphne -b 0.0.0.0 -p 8001 my_project_name.asgi:application
>
>
> I've already made a .asgi file next to my .wsgi file and declared an
> application there.
>
> In requirements.txt I've ensured the daphne(2.4.1) and asgiref(3.2.3)
> packages are the latest versions.
>
> Finally when I do 'gcloud app deploy', deployment appears to happen
> smoothly and in the build logs I can see daphne starting:
>
>
> Step #1: Step 9/9 : CMD exec daphne -b 0.0.0.0 -p 8001 
> my_project_name.asgi:applicationStep #1:  ---> Running in c6f3762a5ce2
>
>
> But when I go to the site, I'm seeing a 502 Bad Gateway error on the site,
> with "nginx" in the next line.
>
>
> Is there a way to deploy Daphne without going into nginx configurations etc? 
> I'm using an app engine only because I wanted to avoid doing micro-level 
> tweaks on a cloud machine.
>
> Thanks,
> Rahul.
>
> --
> 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/dfb79af0-663c-4581-8fab-f06d2281d875%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/CAP5HUWqZ-gSe-R2QtarKK8zV%3DydMmFSuk7CyYsu0RhWayeEB8g%40mail.gmail.com.


Re: Django mailing [Errno 97] Address family not supported by protocol

2020-01-15 Thread Integr@te System
Hi Rakibul,

Plz check again your protocol in sending mail, not in http request.
Nice.


On Wed, Jan 15, 2020, 17:32 PM Rakibul Hasan 
wrote:

> My Error:
> OSError at /send_email/
>
> [Errno 97] Address family not supported by protocol
>
> Request Method: GET
> Request URL:
> https://www.nimikh.com/send_email/?csrfmiddlewaretoken=vynGxVc4pHoAYcIEu3K4h6RYRbAJ4JwbXiFSG8rUFzg8N19rXtZpkuniq91NKalv=Rakib=rakibpathan07%40gmail.com=vdfhhf
> Django Version: 2.2.7
> Exception Type: OSError
> Exception Value:
>
> [Errno 97] Address family not supported by protocol
>
> Exception Location: /opt/alt/python36/lib64/python3.6/socket.py in
> __init__, line 144
> Python Executable: /home/mdosw63339bt/virtualenv/mysite/3.6/bin/python3.6
> Python Version: 3.6.8
> Python Path:
>
> ['/home/mdosw63339bt/mysite',
>  '/opt/passenger-5.3.7-8.el6.cloudlinux/src/helper-scripts',
>  '/home/mdosw63339bt/virtualenv/mysite/3.6/lib64/python36.zip',
>  '/home/mdosw63339bt/virtualenv/mysite/3.6/lib64/python3.6',
>  '/home/mdosw63339bt/virtualenv/mysite/3.6/lib64/python3.6/lib-dynload',
>  '/opt/alt/python36/lib64/python3.6',
>  '/opt/alt/python36/lib/python3.6',
>  '/home/mdosw63339bt/virtualenv/mysite/3.6/lib/python3.6/site-packages']
>
>
> Wed, 15 Jan 2020 06:56:56 +
>
>
>
>
>
>
> EMAIL_USE_TLS = True
> EMAIL_HOST = 'smtp.gmail.com'
> EMAIL_HOST_USER = 'mym...@gmail.com'
> EMAIL_HOST_PASSWORD = 'Password'
> EMAIL_PORT = 587
>
> --
> 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/597edf4c-175c-4ebd-9017-933cfd54af7e%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/CAP5HUWpZ2WFD7KXrpAuN52_4U%3DcXs2%3D1s%2B5VaQgT7YK%3DM4APUA%40mail.gmail.com.


Re: How to load an instance in class based views using form_valid

2020-01-12 Thread Integr@te System
Hi Sam,

How about your app namespace definition and url you defined, bc of using
reverse().

Plz take a look in link for more info:
https://docs.djangoproject.com/en/3.0/topics/http/urls/#topics-http-reversing-url-namespaces




On Mon, Jan 13, 2020, 03:35 Sam Hefer  wrote:

> 0
>
> I'm trying to build a form that automatically fills some fields in a class
> based create view that lets logged in users create a Job. However, I can't
> seem to find the correct way of doing this for fields that aren't the user
> (eg. request.user).
>
> So the create view is trying to get a company_name from the logged in
> user, company_name field belongs to a model called Company. Each Company
> has an owner with a foreign key to the User model. All the reuest I've
> tried so far have led to a 'WSGIRequest' error.
>
> So far I've tried to request: company_name user.company_name
> company.company_name company user
>
> I don't understand how these requests work, I have seen examples for
> getting the logged in users name and I'm not familiar how to do this
> otherwise.
>
> Please can someone help me understand how this works and how I should be
> doing this?
>
> I'm using Django 2.2 with python 3.6
>
>
> Auth Models:
>
>
> class User(AbstractBaseUser, PermissionsMixin):
> first_name = models.CharField(max_length=50)
> last_name = models.CharField(max_length=50)
> phone_number = models.CharField(max_length=15)
> email = models.EmailField(max_length=250, unique=True)
> is_staff = models.BooleanField(default=False)
> is_superuser = models.BooleanField(default=False)
> is_active = models.BooleanField(default=True)
> last_login = models.DateTimeField(null=True, blank=True)
> date_joined = models.DateTimeField(auto_now_add=True)
> objects = UserManager()
>
> USERNAME_FIELD = 'email'
> EMAIL_FIELD = 'email'
>
> def __str__(self):
> return self.first_name
>
> def get_absolute_url(self):
> return "/users/%i/" % self.pk
>
> class Company(models.Model):
> owner = models.ForeignKey(User, on_delete=models.CASCADE)
> company_name = models.CharField(max_length=100, unique=True)
> company_address = models.CharField(max_length=100, unique=True)
> company_website = models.URLField(blank=True, null=True)
> company_verified = models.BooleanField(default=False)
>
> def __str__(self):
> return self.company_name
>
>
> View:
>
>
> class JobCreateView(LoginRequiredMixin, CreateView):
> model = Job
> form_class = JobForm
> template_name = 'jobs/job_create.html'
>
> def form_valid(self, form):
> form.instance.company_name = self.request.user.company
> form.instance.job_reference = self.request.job.pk
> return super(JobCreateView, self).form_valid(form)
>
> def get_success_url(self):
> return reverse('jobs:job_details', kwargs={'pk': self.object.pk})
>
>
>
>
>
>
>
> Other Model:
>
>
>
> class Job(models.Model):
> JOB_TYPE = (
> ('1', 'Service'),
> ('2', 'Repair'),
> ('3', 'Quotation'),
> ('4', 'Consultation'),
> ('5', 'Report'),
> ('6', 'Design'),)
>
> ACCOUNT_TYPE = (
> ('1', 'Existing Customer'),
> ('2', 'Charge to Account'),
> ('3', 'New Customer'),
> ('4', 'Pre-Paid/C.O.D'),
> ('5', 'Issued and Acc App'),)
>
> company_name = models.ForeignKey(Company, related_name='jobs', 
> verbose_name="Company Name", on_delete=models.CASCADE)
> job_reference = models.CharField(max_length=50, blank=False)
> contact_person = models.CharField(max_length=50)
> contact_number = models.IntegerField()
> contact_person_email = models.EmailField(max_length=100, blank=True, 
> null=True)
> site_address = models.CharField(max_length=100)
> job_type = models.CharField(choices=JOB_TYPE, max_length=50, default='1')
> account_type = models.CharField(choices=ACCOUNT_TYPE, max_length=50, 
> default='1')
> job_details = models.CharField(max_length=1000)
> created = models.DateTimeField(default=now, blank=True)
> def __str__(self):
> return str(self.company_name)
> def get_absolute_url(self):
> return reverse('jobs:detail', kwargs={'pk': self.pk})
>
> --
> 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/a0d6959d-380f-4bb6-8d46-a6a385142975%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 

Re: How to Extract values of diffrent from foreign key in django models

2020-01-11 Thread Integr@te System
Hi Manas,

What about User model!? (Because of ForeignKey you declared)

This is where Friend.object.get() come from Friend model of current user.




On Sun, Jan 12, 2020, 11:50 manas srivastava 
wrote:

>
>
>
> I have made a model to make friends using Django model. Now I am unable to
> get the friend id through the model. The model is as follows
>
> class Friend(models.Model):
>
> users = models.ManyToManyField(User) #following users
>
> current_user = models.ForeignKey(User, related_name='owner', 
> null=True,on_delete=models.CASCADE)  #followers
>
> @classmethod
>
> def make_friend(cls, current_user, new_friend):
>
> friend, created = cls.objects.get_or_create(
>
> current_user = current_user
>
> )
>
> friend.users.add(new_friend)
>
>
>
> @classmethod
>
> def lose_friend(cls, current_user, new_friend):
>
> friend, created = cls.objects.get_or_create( style="border-bottom-color: currentColor; border-bottom-style: none; 
> border-bottom-width: 0px; border-image-outset: 0; border-image-repeat: 
> stretch; border-image-slice: 100%; border-image-source: none; 
> border-image-width: 1; border-left-color: currentColor; border-left-style: 
> none; border-left-width: 0px; border-right-color: currentColor; 
> border-right-style: none; border-right-width: 0px; border-top-color: 
> currentColor; border-top-style: none; border-top-width: 0px; box-sizing: 
> inherit; color: rgb(48, 51, 54); font-family: inherit; font
>
>

-- 
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/CAP5HUWrJ-RYKnX0WS9saEEKJ%3DBU1VpedQn19h9X%3D4AWURQ66dQ%40mail.gmail.com.


Re: "This field is required." error in REST

2020-01-11 Thread Integr@te System
Hi Garg,

Which your expected results in your code!?

Where the points you see errors!?

Plz review again and provide us more details.
Nice.







On Sat, Jan 11, 2020, 18:19 Yash Garg  wrote:

> I have created a User registration rest api app
>
> views.py-
> class UserRegister(APIView):
>
> throttle_classes = [UserRateThrottle]
> def post(self, request, format='json'):
> serializer = UserRegisterSerializer(data=request.data)
> if serializer.is_valid():
> user = serializer.save()
> if user:
> return Response(serializer.data, status=status.HTTP_201_CREATED)
> return Response(serializer.errors, status=status.HTTP_400_BAD_REQUEST)
>
> serializers.py
>
> class UserRegisterSerializer(serializers.ModelSerializer):
>
> class Meta:
> model = UserRegister
> fields = ('first_name', 'last_name', 'email', 'password')
>
> def save(self):
>   user = UserRegister(first_name = self.validated_data['first_name'],
>   last_name = self.validated_data['last_name'],
>   email =  self.validated_data['email'],
>   password = self.validated_data['password'],
> )
>   user.save()
>   return user
>
> when i POST the values from postman it gives
> {
> "first_name": [
> "This field is required."
> ],
> "last_name": [
> "This field is required."
> ],
> "email": [
> "This field is required."
> ],
> "password": [
> "This field is required."
> ]
> }
> please suggest how can i resolve this.
>
> --
> 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/129e1948-8472-454f-a89d-c9c596c00766%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/CAP5HUWpzSY67thJpPvDfDc%3DrO83M52zLv64SX%3D5Oz--xTdia8g%40mail.gmail.com.


Re: react.js not rendering anything in django project

2020-01-11 Thread Integr@te System
Hi,

Plz look at an answer that an expert point out your typo, case sensitive
usual mistakes.
Thanks.

On Sat, Jan 11, 2020, 21:55 engineer sahab  wrote:

> check here full code and all details:
> https://stackoverflow.com/questions/59694929/react-js-not-rendering-in-django-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/291b210e-903f-48c4-a0ab-bb77728398dd%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/CAP5HUWpUxWMoNn8twmwg0m0vxSPgGKQV9kdqMkkR9OevM2ubJA%40mail.gmail.com.


Re: Csrf_exempt

2020-01-09 Thread Integr@te System
Hi Sounen,

Inspect this link for which type and setting you like to work with.
https://www.django-rest-framework.org/api-guide/authentication/#sessionauthentication

Nice.




On Thu, Jan 9, 2020, 22:25 Soumen Khatua  wrote:

>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> *class LoginView(APIView):# permission_classes = (AllowAny,)def
> post(self, request, format=None):data = request.dataemail =
> data.get('email',None)password = data.get('password',None)
> phone_number = data.get('phone_number')if email is not None:
> if '@' in email:try:user_obj =
> User.objects.filter(email__iexact = email)if
> user_obj.exists() and user_obj.first().check_password(password):
> # user = UserLoginSerializer(user_obj)
> user = authenticate(email = email, password = password)
> login(request, user)return
> Response({"details":"login successfully"},status = status.HTTP_200_OK)
>   return Response({"details":"Please signup first"},status =
> status.HTTP_404_NOT_FOUND)except User.DoesNotExist:
> return Response(status = status.HTTP_404_NOT_FOUND,deatils =
> "user not found")elif phone_number is not None:try:
> user_obj = User.objects.filter(phone_number__iexact =
> phone_number)if user_obj.exists() and
> user_obj.first().check_password(password):email =
> user_obj[0].emailuser = authenticate(email = email,
> password = password)login(request,user)
> return Response({"details":"login successfully"},status =
> status.HTTP_200_OK)except User.DoesNotExist:
> return Response({"deatils": "user not found"},status =
> status.HTTP_404_NOT_FOUND)*
>
>
> *On Thu, Jan 9, 2020 at 8:42 PM Suraj Thapa FC  > wrote:*
>
>> *Code...? *
>>
>>
>> *On Thu, 9 Jan 2020, 8:40 pm Soumen Khatua, > > wrote:*
>>
>>>
>>> *Hi Folks,*
>>>
>>> *In django rest framework,I extend the LoginApiView(APIView) but when
>>> I'm passing username and password in browser it logn successfully but in
>>> post man I'm getting :*
>>>
>>>
>>>
>>> *{"detail": "CSRF Failed: CSRF token missing or incorrect."}*
>>>
>>> *Do I need to use csrf_exempt inside APIView(post) request?*
>>>
>>> *If yes, then why it is working some times?*
>>>
>>> *Thank you in advance*
>>>
>>> *Regards,*
>>> *Soumen*
>>>
>>>
>>>
>>>
>>>
>>> * -- 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/CAPUw6WZC3C9WVFwGskF8uYs3pqM0fQLe9MKsqgr4FvNzxzELmw%40mail.gmail.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/CAPjsHcEfamWnYiQbK914Y0SV2whkOXFthb3ZvOjBv2aw1-GL6A%40mail.gmail.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/CAPUw6WZt0_TRLF-ZaFrqJvbcejuqaD_DVD4Z1%2B%3DpZhAwPzT1fA%40mail.gmail.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/CAP5HUWrKP32KSfo8AM01zW0PWbgK51Fd%2B-uBaC1BKvauoDGKNA%40mail.gmail.com.


Re: Necessary to learn React/ Angular with backend Django

2020-01-07 Thread Integr@te System
Hi Shetty,

You also consider your project serve local users, so unnecessary implement
high interactive pages from internet clients.

>From online docs, you can learn any technique via small best practices and
apply to your case with basic javascript knowledges or look at python libs,
and then expand features as business change.

Dont forget systems behide when business move beyond, at least data.
Nice.



On Wed, Jan 8, 2020, 01:38 Karan Mittal  wrote:

> Hello friend,
> In my opinion if it is working with current implementation you need not
> add any react or angular.
> Learning perspective they are good but implementation of the same in your
> already working project may raise new errors.
> That's my opinion, feel free to incorporate them once you have learned and
> get the response to do so by your users.
> Regards,
> Karan Mittal
>
> On Tue, 7 Jan, 2020, 11:17 PM Balaji Shetty, 
> wrote:
>
>> Hi
>>
>> Currently i deployed application on pythonanywhere. It is online office
>> file management system with around 100 users under 10 different department
>> in hierarchical manner.
>>
>> User and department may increase in future.
>>
>> Entire application is developed in Django back end.
>>
>> Used bootstrap for custom report generation.
>>
>> question arises in My mind is
>>
>> Is it Necessary to learn and implement in React/ Angular for front end.
>>
>>
>> Because I am comfortable with current implementation.
>>
>>
>> May I know what are gains i may get or what are the disadvantage i may
>> suffer in future.
>>
>> Kindly guide me to avoid future inconvenience.
>>
>>
>> --
>> Mr Shetty Balaji
>> Asst. Prof.
>> IT Department
>> SGGS I
>> Nanded. My. India
>>
>> --
>> 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/CAECSbOuN%2BBsvoGZ4nBA5D9batL9UAYQ4crZGWmaMxYMJQ5X1sQ%40mail.gmail.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/CAO24gqwBgRkr8LYhpHXS2A0o2i4Lcx1WdL%3DqnAuQPtOmtmnXvw%40mail.gmail.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/CAP5HUWpd7-Y7cV%3DG6UR1h_sPibr9gFmzBTQ0EDcTT7v0cDTWMg%40mail.gmail.com.


Re: JSONDecodeError

2020-01-06 Thread Integr@te System
or another way django httpxforwardedfor module.
Nice.

On Mon, Jan 6, 2020, 22:56 Integr@te System 
wrote:

> Hi,
>
> Maybe your module requests not present sufficient and check requests api
> module to use.
>
>
> On Mon, Jan 6, 2020, 20:20 Yash Garg  wrote:
>
>> JSONDecodeError
>> Exception Value:
>>
>> Expecting value: line 1 column 1 (char 0)
>>
>>
>> why i'm getting this error?
>>
>> views.py-
>>
>> ip_address = request.META.get('HTTP_X_FORWARDED_FOR', '')
>> response = requests.get('http://freegeoip.net/json/%s' % ip_address)
>> geodata = json.loads(response)
>> print(geodata['ip'])
>> print(geodata['country_name'])
>> print(geodata['latitude'])
>> print(geodata['longitude'])
>>
>> --
>> 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/34b7736d-f946-451b-b83b-de72d3329da0%40googlegroups.com
>> <https://groups.google.com/d/msgid/django-users/34b7736d-f946-451b-b83b-de72d3329da0%40googlegroups.com?utm_medium=email_source=footer>
>> .
>>
>

-- 
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/CAP5HUWpv-RfgPCkRspNAdzm4Qxpy2Za3hpjjmO2qADEQK0opvg%40mail.gmail.com.


Re: JSONDecodeError

2020-01-06 Thread Integr@te System
Hi,

Maybe your module requests not present sufficient and check requests api
module to use.


On Mon, Jan 6, 2020, 20:20 Yash Garg  wrote:

> JSONDecodeError
> Exception Value:
>
> Expecting value: line 1 column 1 (char 0)
>
>
> why i'm getting this error?
>
> views.py-
>
> ip_address = request.META.get('HTTP_X_FORWARDED_FOR', '')
> response = requests.get('http://freegeoip.net/json/%s' % ip_address)
> geodata = json.loads(response)
> print(geodata['ip'])
> print(geodata['country_name'])
> print(geodata['latitude'])
> print(geodata['longitude'])
>
> --
> 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/34b7736d-f946-451b-b83b-de72d3329da0%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/CAP5HUWrPwnwpST5gR0%2BEw496N%3Df6hfCJzFbawAXXT5zRRdLkzg%40mail.gmail.com.


Re: email api

2020-01-05 Thread Integr@te System
Hi Suabiut,

Try this:
https://pypi.org/project/django-mailgun/



On Mon, Jan 6, 2020, 13:28 sum abiut  wrote:

> Is there any other email API out there that I can use to send email in
> django other than sengrid?
>
>
> --
> 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/CAPCf-y7O3LWHCfjxyiPZPaLYyPeJTrVaj3%3D_xDpLrOR0U9D5LA%40mail.gmail.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/CAP5HUWpy0p_Tnf03kegB2G66vG9d2ZkpRykk4QwyupY0J-q1Ww%40mail.gmail.com.


Re: SyntaxError SECRET_KEY

2020-01-05 Thread Integr@te System
Hi Dash,

Let a look at this config:

*settings_secret.py*

# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = '..key'

*settings.py*

from settings_secret import *

and *.gitignore*

# Secret Settings
settings_secret.py


Careful for path to file directory.
Nice.



On Mon, Jan 6, 2020, 04:13 Mohamed A  wrote:

> Be careful your secret key contains a #
>
> Which comment everything after
>
> Le dim. 5 jan. 2020 à 22:06, 'Dash LaLonde' via Django users <
> django-users@googlegroups.com> a écrit :
>
>> Well I can't go any further, I keep getting SyntaxError SECRET_KEY, the
>> only thing I changed was I added another os.path.dirname to the
>> settings because that is where it exists. I also set the domain and ip
>> address, neither of which should create the error. While this is a new
>> endeavor to learn something new, I can't waste time on this, when the
>> only answer I can find the SyntaxError is due to incorrect spacing between
>> command and setting.
>> Can only move it one spot in either direction and neither work, so if
>> anyone has a better solution let me know, I would like to be able to
>> learn Django. this is how my settings look
>>
>>  # SECURITY WARNING: keep the secret key used in production secret!
>> SECRET_KEY = '(%_cwwe@d#gg&+$myg9c%f961^y(kfd*-q=81k28y%#q&*6%o*'
>>
>> this is my error message
>>
>> SECRET_KEY = '(%_cwwe@d#gg&+$myg9c%f961^y(kfd*-q=81k28y%#q&*6%o*'
>>  ^
>> SyntaxError: invalid syntax
>> 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 view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/0c5400fb-f27a-4530-8610-9efad5ad8b1f%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/CAJenkLCFT8zC3%3DfQktt3tBfQGWMP2H41%2BM2Woqr1kJtEgm_6ow%40mail.gmail.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/CAP5HUWq%3DHMJz9QoCDWtGxmDK%3D_OmMZ0_E5GRv5XHpSMD5YnhMw%40mail.gmail.com.


Re: Full Stack Developer (Python/Django) position requirement for US GC/Citizen/Can Citizen

2020-01-05 Thread Integr@te System
Hi All,
So excited! My work if any informative.
Welcome!


On Sun, Jan 5, 2020, 08:27 Alfredo Sumague 
wrote:

> I'm interested,
>
> Thanks,
> Alfredo Sumague
>
> On Fri, Jan 3, 2020 at 9:35 AM Yash Garg  wrote:
>
>> For a large multi billion dollar Publishing house in New York, client
>> needs a Full Stack Django Developer with 3+ years of solid Python/Django
>> experience
>>
>> Scope:
>>
>>- Code refinement/linting/unit testing
>>- Django application development
>>- Data ingestion, data transforms
>>- API development
>>- ETL scripting
>>- Quality Assurance and User Testing (limited; as applicable)
>>
>> Skills:
>>
>>- Cloud Platform experience (Google Cloud Platform preferred, but not
>>required)
>>- Experience implementing CI/CD in an agile workflow; release
>>management experience
>>- Python  (required)
>>- Requests, Django, Pylint, Pytest, automated documentation (Sphinx)
>>   - SQL
>>- JavaScript, CSS
>>- JS front-end frameworks (Angular, React, etc. )
>>- Jira
>>- Jenkins
>>- Git/Github
>>- Some data science/analytics preferred (Pandas, Numpy, etc.)
>>
>> This position is based out of New York. Only US Citizens. Green Card or
>> Canadian Citizens (eligible for TN Visa need apply)
>>
>> **
>> We also have additional  Indian openings with same skillset to be based
>> out of Ahmedabad office provided they can join immediately.
>>
>> --
>> 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/ca23cf71-2afa-490a-b9bc-366f335cf53d%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/CAGF6mrTUUf%2BXWOfZkwGRO%2BwfH4Xa3rgH9FMzHwZ3a_Tt20BoZg%40mail.gmail.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/CAP5HUWr7F5fqG4L3g-7HXggVHV4q7Q%2BmrrvgLHNX7SYL_N8PRA%40mail.gmail.com.


Re: How to create form to show user input and return results from DB

2020-01-04 Thread Integr@te System
Hi friend,

# dont separate bc of the same type of field on one object. ( or find more
zipcode service provider for more options)

# with get/post method you shoud refer more docs, it just view/create
action.

# consider review source, a lot comment in your code base and few err
commands.
Think of zen.



On Sat, Jan 4, 2020, 06:11 nmaxbe...@gmail.com  wrote:

> Hi,
>
> I am creating a website that lists my states congressional districts based
> on the US census (i.e. 2000, 2010 and ultimately to update when the 2020
> survey is completed).  The entire exercise is to track how the
> representation could possibly change based on the US census.
>
> So far, I have a mock-up for two user inputs: one for 2000 and one for
> 2010 entering their zip codes on the homepage. The user is prompted to
> input their zip code (for each census year) in order to see their
> representative for 2000 and 2010 (basically pulling from a db to show the
> results) and the results show on the results page (new tab).
>
> My confusion:
>
>1. Should I combine the DB's to "respond" to the users input or keep
>DB's (2000, 2010) separate?
>2. I understand how to create models and I understand how to create
>views, but I am confused on creating the form (specifically "GET" vs 
> "POST".
>3. Is POST what the user inputs? If so, how do I "search through the
>existing DB"?
>4. I have reviewed the form docs within Django but still am lost.
>Please help.
>
> As you suspected, I am new to Django but want to "get over this hump".  I
> feel I am reaching too far and the answer is in front of my face.  My
> github is: https://github.com/NinaMaxberry/Cornerstone-Project. Once you
> visit, you will see, I've tried a lot of options.
>
> Any help would be greatly appreciated.
>
>
> --
> 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/5f1995c7-6e6c-4147-b53b-10373c7b4b31%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/CAP5HUWpdzGaBg4UEcOUfirLq%2BBYUYiDfe-W5rZ1_3JVZHauPgw%40mail.gmail.com.


Re: Tweak admin widget - FilteredSelectMultiple

2020-01-04 Thread Integr@te System
Hi Mike,

As we look at selected_choice result from iterating v over value (line
428), option_value base on choice(line 438).
so we can limit input parameter of value variable from this def().

Hope if heplful.



On Sat, Jan 4, 2020, 11:00 Mike Dewhirst  wrote:

> In the Admin where user group membership is shown and groups can be
> selected from choices derived from auth_groups, I want to control the
> available choices.
>
> It seems the place to do so might be in admin/widgets.py in the
> AutocompleteMixin.optgroups() method a few lines in where it says ...
>
>  choices = (
>  (obj.pk, self.choices.field.label_from_instance(obj))
>  for obj in
> self.choices.queryset.using(self.db).filter(pk__in=selected_choices)
>  )
>
> Could a very kind person explain to me how I can hijack this and remove
> a couple of groups from the resulting choices?
>
> My use case is that I want members of the 'admin' group to be able to
> assign any group membershipto any other userexcept for a couple of
> groups which are too permissive. The excepted groups can only be
> assigned by a Superuser.
>
> Many thanks for any hints
>
> Cheers
>
> Mike
>
>
> --
> 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/52923a2a-cc6c-e335-f5fe-6ec6ab004013%40dewhirst.com.au
> .
>

-- 
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/CAP5HUWoZ14gH%3D8V1ARk-pnAKNWuVaqG%3D4%3DGSbwO_-0LrP7DFnw%40mail.gmail.com.


Re: Getting os win87 parameter not found in multi processing how to solve please me

2020-01-02 Thread Integr@te System
Hi,

Looking for parameter you want to

https://docs.python.org/3.8/library/multiprocessing.html

https://github.com/praekelt/django-template-multiprocessing/blob/develop/README.rst#installation


On Thu, Jan 2, 2020, 23:54 Devendra reddy 
wrote:

> --
> 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/CABB0Uf3HNwrUJwuQ_zZFZC_b2UwUqcFCb60VR0AR%3DGMn3MPSsw%40mail.gmail.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/CAP5HUWqovyXmwSPCO-YFrMMeK-XCHUd%2BcECgYS%3DZRFthQNGo5A%40mail.gmail.com.


Re: How to ensure genuine emails despite valid email format?

2019-12-31 Thread Integr@te System
Hi Roshan,

Follow to previous mails above, check further mail according to:
# Comply to mail's policies (entire system).

# Alongside network (ISP, provider, local(NPS, ad, ldap, mail app,
computer)...end to end.

# Or you can imagine your gmail, check google policies for spam/not
spam(this is provider).

# Don't forget setting you or coworker config before, relative marketing.

So all your question check config at each layer.

On Tue, Dec 31, 2019, 03:07 David Mayne  wrote:

> a) - you can use a service like http://www.bulkemailchecker.com/ - there
> are a number of them that have an api you can verify the email address on
> form input.
> b - d) you can use https://mxtoolbox.com/ api to find blacklisted IP's
> and domains.
>
> Another option is to add a verification step - send the user a
> verification email for them to reply to.
>
> David
>
> On Sun, Dec 29, 2019 at 9:16 AM Roshan Shah 
> wrote:
>
>> There is a problem when a person enters valid email format but it is
>> either
>>
>> a) An invalid email which bounces
>> b) A valid email but using one of disposable email which means it is a
>> fake profile
>> c) Emails from domains that are marked as spam
>> d) Emails from IP addresses that are marked as spam
>> How do we ensure that before we accept emails, both the above cases are
>> put in pending status with appropriate message and reason code to put them
>> in pending?
>>
>> --
>> --
>>
>> Roshan Shah / Sr. IT Consultant
>> techieros...@gmail.com / (519) 496-8860
>>
>> This e-mail message may contain confidential or legally privileged
>> information and is intended only for the use of the intended recipient(s).
>> Any unauthorized disclosure, dissemination, distribution, copying or the
>> taking of any action in reliance on the information herein is prohibited.
>> E-mails are not secure and cannot be guaranteed to be error free as they
>> can be intercepted, amended, or contain viruses. Anyone who communicates
>> with me by e-mail is deemed to have accepted these risks.
>>
>> --
>> 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/CALX19NipTrrd8sgXcrDO07nHBj-A9FtobGgdmfy4r%3Duhbp7g1A%40mail.gmail.com
>> 
>> .
>>
>
>
> --
> David
>
> --
> 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/CAMAjjsyoBRvGxoe%3D317dLsT39Sv4RUX3MbR9ZeHLJc9QrzzRKQ%40mail.gmail.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/CAP5HUWr5fj%2BOX3kfO1R3dvhU8OyJdro50YL%2B_EUBR-6dzH6x5w%40mail.gmail.com.


Re: Django ValueError at: Cannot assign "": "Pair.male_mutation" must be a "Mutation" instance."

2019-12-31 Thread Integr@te System
Hi Issuer,

As error warning, we don't see any male_mutation in Mutation model when
Pair.male_mutation reference to. As well Species model located.






On Mon, Dec 30, 2019, 19:31 Muhammad Tariq  wrote:

> I am new to Django facing this error while saving data into DB:
>
> "ValueError at /breedingRecApp/pairing
> Cannot assign "":
> "Pair.male_mutation" must be a "Mutation" instance."
>
> I've 4 foreign keys in Pair model each with specific reason/purposes. when
> I save data then error come.
> in the same error page Form Valid is TRUE and Data What I want is also
> exactly the same. I don't know why data is not saving in DB.
>
> Note: When I insert the same data from Admin interface it get save without
> any error it also get updated and delete as well from admin interface.
>
> following are models:
>
> models.py
> class Mutation(models.Model):
>
> species = models.ForeignKey(Species, on_delete=models.CASCADE)
> name = models.CharField(max_length=120, blank=False, null=False)
> description = models.TextField(max_length=300, blank=False, null=False)
>
> class Meta:
> verbose_name_plural = "Mutations"
> ordering = ('name',)
>
> def __str__(self):
> return self.name
>
> def get_absolute_url_delete(self):
>
> return reverse("breedingRecApp:delete_mutation",
> kwargs={"mutation_id": self.pk})
>
> class SpeciesDetail(models.Model):
>
> GENDER_CHOICES = (
> ('M', 'Male'),
> ('F', 'Female'),
> )
> species = models.ForeignKey(Species, on_delete=models.CASCADE)
> mutation = models.ForeignKey(Mutation, on_delete=models.CASCADE)
> fatherName = models.CharField(max_length=120)
> motherName = models.CharField(max_length=120)
> birdBandNo = models.IntegerField()
> cageNo = models.IntegerField()
> picture = models.ImageField(upload_to='pics')
> gender = models.CharField(max_length=1, choices=GENDER_CHOICES)
> health = models.CharField(max_length=120)
> breedingHistory = models.TextField(max_length=300)
> age = models.IntegerField()
> dateAcquired = models.DateTimeField(auto_now_add=False, auto_now=True)
>
> class Meta:
> verbose_name_plural = "Species Detail"
> ordering = ('species', )
>
> def __str__(self):
>  return str(self.mutation)
>
>
>
> class Pair(models.Model):
> species = models.ForeignKey(Species, on_delete=models.CASCADE)
> male_mutation = models.ForeignKey(Mutation, on_delete=models.CASCADE,
> related_name='male_mutation')
> male = models.ForeignKey(SpeciesDetail, on_delete=models.CASCADE,
> related_name='male')
> female_mutation = models.ForeignKey(Mutation,
> on_delete=models.CASCADE, related_name='female_mutation')
> female = models.ForeignKey(SpeciesDetail, on_delete=models.CASCADE,
> related_name='female')
> boxNo = models.IntegerField()
> cageNo = models.IntegerField()
> dateTimeStamp = models.DateTimeField(auto_now_add=True, auto_now=False)
> description = models.TextField(max_length=300)
>
>
> class Meta:
> verbose_name_plural = "Pairs"
>
> def __str__(self):
> return str(self.male) + ',' + str(self.female)
>
> views.py
>
> def pairing(request):
> if request.method == "POST":
> form = Pair_ModelForm(request.POST or None)
> if form.is_valid():
> try:
> form.save()
> return redirect('breedingRecApp:pairs')
> except:
> pass
> else:
> form = Pair_ModelForm()
> context = {'title': 'Pairing',
>'active': 'active',
>'model': Pair,
>'form': form,
>}
> return render(request, 'breedingRecApp/pairing.html', context)
>
>
> def load_mutations(request):
> species_id = request.GET.get('species')
> specific_mutations =
> Mutation.objects.filter(species_id=species_id).order_by('name')
> return render(request,
> 'breedingRecApp/mutations_dropdown_list_options.html', {'mutations':
> specific_mutations})
>
> def load_males(request):
>
> mutation_id = request.GET.get('mutation')
> print(mutation_id)
> males =
> SpeciesDetail.objects.filter(mutation_id=mutation_id).filter(gender='M').order_by('id')
> print('Male Detail', males)
> return render(request,
> 'breedingRecApp/males_dropdown_list_options.html', {'males': males})
>
> def load_females(request):
>
> mutation_id = request.GET.get('mutation')
> print(mutation_id)
> females =
> SpeciesDetail.objects.filter(mutation_id=mutation_id).filter(gender='F').order_by('id')
> print(females)
> return render(request,
> 'breedingRecApp/females_dropdown_list_options.html', {'females': females})
>
> --
> 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 

Re: access control module

2019-12-29 Thread Integr@te System
Hi,

Think of seperating on permissions, each of them query out specific details
in views.py.

Hope it helpful.

On Mon, Dec 30, 2019, 00:52 oliseh obiajuru 
wrote:

> i am looking to create a custom access control for the front end of my
> django web site, where by if you are categories as a certain user (lets say
> editor) you should have a different navigation menu items from those of a
> (writer). please i need help.
>
> --
> 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/e1ac3d39-70b6-45e0-bf3c-8ac6c3268468%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/CAP5HUWr22KeJG%3DpToYDtxzCLxfrkfkk1fXcLF9_SyuAEJ%2BwM3A%40mail.gmail.com.


Re: Best config and extension for visual studio code

2019-12-29 Thread Integr@te System
Hi The best men,

Go to the best ide you fit, look for the packages you like. Choose the best
time with the best solution for the best customer. Eventually the most
value you get.

Not all in one. Not best all time.

On Sat, Dec 28, 2019, 23:32 Mahmoud Abbas  wrote:

> Hello
> U just need install packages that u want
>
> On Sat, Dec 28, 2019, 19:28 Alaydyn Gholechragh  wrote:
>
>> Hi
>> I want to use visual studio code for programming python and Django and
>> react for this purpose i want to know what is best config for vscode :
>> extension,themes,settings,fonts,linter, etc
>>
>> Thanks for your help
>>
>> --
>> 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/5490e89a-06aa-46c3-b495-7f54be63e6f5%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/CAEy2Vka4PgSvsSVha7zLNpuO-uau9-e9hA5L6-f3xnE9AOqSLQ%40mail.gmail.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/CAP5HUWrTB5HPXxMPpbMOutHwY45BK2vQZy%2BEkmS7x_u2hT_84A%40mail.gmail.com.


Re: How to read Objects from ManyToMany Relation class in django

2019-12-29 Thread Integr@te System
Hi,

Check url.py with typo error at closed parenthesic.

On Sun, Dec 29, 2019, 20:35 manas srivastava 
wrote:

>
>
>
> I have made a class called friend where i want to connect users as
> followers. Here From this class i am unable to read the users those are
> following another user. For Eg if 'a' user fllows 'b' user. Then i want to
> get the names of user that followed b from the user id of b and display
> them as followers of a. This class is also not storing the userid of the
> following user and followed user. I am new to many to many relation field.
> Kindly help.
>
> Code in Models.py
>
> class Friend(models.Model):
>
> users = models.ManyToManyField(User)
>
> current_user = models.ForeignKey(User, related_name='follower', 
> null=True,on_delete=models.CASCADE)
>
> @classmethod
>
> def make_friend(cls, current_user, new_friend):
>
> friend, created = cls.objects.get_or_create(
>
> current_user = current_user
>
> )
>
> friend.users.add(new_friend)
>
> Its function in views.py is
>
> def change_friends(request, operation, pk):
>
> friend = User.objects.get(pk=pk)
>
> ifhttps://groups.google.com/d/msgid/django-users/CAP5HUWo%3D6Ca5Zc_QQ1snbXx0CyP6VaR2MdBnQNLgcT8hqmXMEQ%40mail.gmail.com.


Re: Creating Django models dynamically

2019-12-29 Thread Integr@te System
Hi,

Look at Django CMS features as it is in your purpose.


On Sun, Dec 29, 2019, 20:35 Meet Vasani  wrote:

> Is there any way to create model for the database using form input from
> the end user ?
>
> Scenario: There is authority for the particular company. Authority wants
> to create HTML form schema according to company which he's affiliated with.
> There are many Authorities with diffrent companies they're affiliated with.
>
> Any solution is highly Appreciated.
>
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/7b403af4-9ab4-412b-92e9-0a91e239ed0d%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/CAP5HUWpUwFP-j7gJTMf0kL28fmbVyG8H4N63j%2BhFv3x%2B7w31dA%40mail.gmail.com.


Re: Strange issue with django

2019-12-28 Thread Integr@te System
Hi Andreas,

# First at all we couldn't help anymore without specified problem as your
necessary show no more clear details.

# Tools(for profiling each running functions, many metrics need), advices
from some other to help you see out of box and show them out to our
supports.

# Plan to upgrade, include procedure, backward version recover from
unexpected result. Libraries, dependency and so on.

Example: DRF drop python2, paging, Q object, _url... many so on.
So I wonder your hidden work or just want to survey on community for using
these software packages.
Thank for sharing.


On Sat, Dec 28, 2019, 02:33 Andréas Kühne 
wrote:

> Ok - let's take this one piece at a time.
>
> 1. As far as we have been able to tell is that we have nested serializers
> for certain aspects of the application - those went from loading in 3-4 s
> to over 40 s in different places. It's hard to exactly show, however the
> number of database requests skyrocketed as well. But our theory is
> currently that the related models (foreign keys) are loaded strangely.
> 2. We aren't exactly sure WHERE the bottlenecks are happening - that is
> also why the question is wide and generic.
> 3. We don't have any profiling tools running in production, however the
> figures we do have are on development.
> 4. We upgraded from the latest version of 2.2 to 3.0 in django and
> upgraded one minor version of DRF at the same time.
>
> The main issue is that we got performance issues - major performance
> issues - while upgrading. This shouldn't be possible - not in the way that
> it happened. What worries us is if this happens again and we don't see this
> BEFORE a production release. That was the main problem we had.
>
> We have now done a lot of workarounds in place where the code was slow -
> but we would still like to understand where the problems occur so that we
> don't get this surprise again.
>
> My question was more generic - because we wanted to see if anyone else had
> experienced the same problems when upgrading.
>
> The strangest thing now is that even if we downgrade the database (reverse
> migrations), downgrade the code and so on - the requests are still slow -
> where they haven't been previously.
>
> Regards,
>
> Andréas
>
>
> Den fre 27 dec. 2019 kl 10:33 skrev 'Amitesh Sahay' via Django users <
> django-users@googlegroups.com>:
>
>> Also let us know the procedure that you adopted to upgrade to the new
>> version?
>>
>> Regards,
>> Amitesh
>>
>>
>> On Thursday, 26 December, 2019, 10:19:31 pm IST, Jason <
>> jjohns98...@gmail.com> wrote:
>>
>>
>> Also, you haven't stated where the bottlenecks are happening.  Is it app
>> code, internal in django, your stack, database, networking?  There's alot
>> of variables in play for diagnosing a major slowdown, and you've provided
>> no information about profiling/monitoring
>>
>> --
>> 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/37b9526a-756f-4ac7-835a-af49f0dada02%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/2119895222.3536368.1577439175073%40mail.yahoo.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/CAK4qSCeUAhcoqGFesXTHvWyNGfE1-HEHASwPB8Lq-PPDhh_6%3Dw%40mail.gmail.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/CAP5HUWomX%2BVN6hbrnEuW29GtaWZg_gXYdNnLAacQOoHLgM_C4A%40mail.gmail.com.


Re: Overriding Prefetched objects in Serialization

2019-12-27 Thread Integr@te System
Hi Barddes,

Bc of you alter model, so let try to command migration, makemigration.




On Fri, Dec 27, 2019, 00:46 Cesar Bueno  wrote:

> Hi!
>
> I'm having trouble overriding some prefetched data, I hope someone can
> help me here. I'll try to explain my issue with the examples provided from
> the Docs (
> https://docs.djangoproject.com/en/dev/ref/models/querysets/#prefetch-related).
> The base models from the examples below were taken from there.
>
> So... Let's suppose I'm running a Pizzeria, and I have the following
> models:
>
> class Topping(models.Model):
> name = models.CharField(max_length=30)
>
> class Pizza(models.Model):
> name = models.CharField(max_length=50)
> toppings = models.ManyToManyField(Topping)
>
>
> My goal is to fetch my Pizzas, serialize them, and store it into an
> ElasticSearch cluster.
>
> If I want to fetch all my Pizzas from DB, I run the following:
>
> pizzas = Pizza.objects.all()
>
>
> But also with the Pizza object, I want to (pre)fetch all toppings. In that
> case, I should run:
>
> Pizza.objects.all().prefetch_related('toppings')
>
> This works great, but I might want to add some filters to the toppings
> fetched for any reason (They are out of stock, for example). I can do this
> by adding the field in_stock to my model Topping:
>
> class Topping(models.Model):
> name = models.CharField(max_length=30)
> in_stock = models.BooleanField()
>
>
> With this Topping model, I can use the Prefetch object:
>
> pizzas = Pizza.objects.all().prefetch_related(
> Prefetch('toppings', queryset=Topping.objects.
> filter(in_stock=True)
> )
>
> Until now everything works as expected (even the serialization). But my
> problem begins when I try to do the same stock control with the Pizza
> object. Just like I did with Topping, I will also add the in_stock field to
> the Pizza Model. The new Pizza Model then is:
>
> class Pizza(models.Model):
> name = models.CharField(max_length=50)
> toppings = models.ManyToManyField(Topping)
> in_stock = models.BooleanField()
>
>
> If my Pizza is out of stock, I don't need to know which toppings are
> available and which are not. After the query execution I expected a list of
> all Pizzas and, if the pizza is available, the list of Toppings available
> for each pizza. I wasn't able to make this behavior using the Prefetch
> object. As a workaround, I tried the following:
>
> pizzas = Pizza.objects.all().prefetch_related(
> Prefetch('toppings', queryset=Topping.objects.
> filter(in_stock=True)
> )
>
> for pizza in pizzas:
>if not pizza.in_stock:
>   pizza.toppings = []
>
> Running the following, Python/Django raised an error saying that I should
> use this instead:
>
> pizza.toppings.set([])
>
> But even when I the code above (that runs without raising an error), every
> time I serialize my pizza object, the full toppings list gets serialized
> instead of the empty array previously setted.
> I am using an HyperlinkedModelSerializer to serialize my data.
>
> Can anyone help me? How can I serialize the empty array instead of the
> list retrieved from the db?
>
> Thanks in advance
>
> Cesar
>
>
>
> --
> 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/ec53999f-2a9f-469f-8c1e-36db8916d541%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/CAP5HUWo1v6uj5Fze05ULiig6MHcLMju2KC-4NZ%2Ba9tF%2BCkJdSg%40mail.gmail.com.


Re: Strange issue with django

2019-12-26 Thread Integr@te System
Hi Andreas,

some tools to check performance in Perf tip on mail above, to inspect
deeper.


On Thu, Dec 26, 2019, 21:21 Andréas Kühne 
wrote:

> Yeah - we have gone through the release notes - and performance wise the
> environment is the same but we got an extreme performance dip - we have
> been trying to check where we have taken performance hits - but it seems to
> be random and also in places where we didn't have any issues previously
>
> We have checked the places where we are taking hits - but my main thing is
> I would like to find out WHY this has happened - because it just happened
> spontaneously
>
> Regards,
>
> Andréas
>
>
> Den tors 26 dec. 2019 kl 15:09 skrev Integr@te System <
> datacentral...@gmail.com>:
>
>> Hi Andreas,
>>
>> Let try:
>> # Perf tip
>>
>> https://gawron.sdsu.edu/compling/course_core/python_intro/intro_lecture_files/fastpython.html
>>
>> # Release note Django 3.0, DRF vs. best version
>>
>> Hope this helpful.
>>
>>
>> On Thu, Dec 26, 2019, 20:46 Andréas Kühne 
>> wrote:
>>
>>> Hi all,
>>>
>>> We have a django backend for our application - running with DRF. This
>>> has been working perfectly since November last year. Now we have upgraded
>>> to django 3.0 and also DRF to the latest version. We also added some DB
>>> indexes. After this upgrade we now have certain endpoints that went up to
>>> 25 s loading time (from about 5 s). We have reverted most of these changes
>>> and gone through our code but still can't find where this issue is.
>>>
>>> We even reverted back to django 2.2 and the previous version of DRF
>>> which gave us reasonable speed, but it still doesn't work correctly.
>>>
>>> Does anyone have any ideas what the issue might be?
>>>
>>> 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 view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/CAK4qSCe1Nr3c41OOG2zKz3yt2z0pEE4G-629wWsRkLeHjqaNRQ%40mail.gmail.com
>>> <https://groups.google.com/d/msgid/django-users/CAK4qSCe1Nr3c41OOG2zKz3yt2z0pEE4G-629wWsRkLeHjqaNRQ%40mail.gmail.com?utm_medium=email_source=footer>
>>> .
>>>
>> --
>> 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/CAP5HUWp2gXjRCKeqB5i3EZeSdp-tJUkHpkiUQUEJETCWp05ErQ%40mail.gmail.com
>> <https://groups.google.com/d/msgid/django-users/CAP5HUWp2gXjRCKeqB5i3EZeSdp-tJUkHpkiUQUEJETCWp05ErQ%40mail.gmail.com?utm_medium=email_source=footer>
>> .
>>
> --
> 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/CAK4qSCdbL1h1b1dqhoLQh%3DTQ127XU0cx2Kp7KbCNKJzz_nVwYA%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAK4qSCdbL1h1b1dqhoLQh%3DTQ127XU0cx2Kp7KbCNKJzz_nVwYA%40mail.gmail.com?utm_medium=email_source=footer>
> .
>

-- 
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/CAP5HUWodcoS%2B1gq2cGDErL2Re0f8aUVUF9HY671HU6w6LBHwEg%40mail.gmail.com.


Re: Strange issue with django

2019-12-26 Thread Integr@te System
Hi Andreas,

Let try:
# Perf tip
https://gawron.sdsu.edu/compling/course_core/python_intro/intro_lecture_files/fastpython.html

# Release note Django 3.0, DRF vs. best version

Hope this helpful.


On Thu, Dec 26, 2019, 20:46 Andréas Kühne 
wrote:

> Hi all,
>
> We have a django backend for our application - running with DRF. This has
> been working perfectly since November last year. Now we have upgraded to
> django 3.0 and also DRF to the latest version. We also added some DB
> indexes. After this upgrade we now have certain endpoints that went up to
> 25 s loading time (from about 5 s). We have reverted most of these changes
> and gone through our code but still can't find where this issue is.
>
> We even reverted back to django 2.2 and the previous version of DRF which
> gave us reasonable speed, but it still doesn't work correctly.
>
> Does anyone have any ideas what the issue might be?
>
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAK4qSCe1Nr3c41OOG2zKz3yt2z0pEE4G-629wWsRkLeHjqaNRQ%40mail.gmail.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/CAP5HUWp2gXjRCKeqB5i3EZeSdp-tJUkHpkiUQUEJETCWp05ErQ%40mail.gmail.com.


Re: MultiValueDictKeyError at /add 'radio2'

2019-12-26 Thread Integr@te System
Hi Issuer,

Plz let facility in the ways that more details(err log, photos, code
snippets...) or minimize risk for supporting of community. Sometime untrust
link or malware, malformware) could harm or prevent the help of community,
or at least slow to resolve your problem.

Thanks.

On Wed, Dec 25, 2019, 20:38 shree hari  wrote:

> error: https://del.dog/engigywarf.txt
> code: https://del.dog/cringanuwa.txt
>
> can someone help with me this ?
>
> --
> 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/38aa273e-9d81-4dc1-a5ad-2ef9691997e8%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/CAP5HUWp4doeZrO3%3Dk3ehSteRzFm%2BQ7XTsytPYU%2BNYu%3DE4a6hQw%40mail.gmail.com.


Re: How to access static files in views.py

2019-12-25 Thread Integr@te System
Hi,

Make sure these requirements:
https://docs.djangoproject.com/en/3.0/howto/static-files/

On Wed, Dec 25, 2019, 19:32 Guy NANA  wrote:

> I want to access static files in views.py but it doesn't work when I use
> {% load static %} and {% static relative_path %} in the same way like in a
> template.
>
> --
> 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/8b8d6254-f0f4-4e2f-8b4d-1c4bde5dc050%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/CAP5HUWqq-m%3D%2BoGMNoczCCabhbmieTbZEw9WQt-xxhU-JOxAW1Q%40mail.gmail.com.


Re: Feeding a stored procedure (MySQL) into Django_Tables2 table

2019-12-24 Thread Integr@te System
Hi Issuer,

Dump data field from model to json obj.
And combines them as a dictionary.




On Wed, Dec 25, 2019, 11:19 sum abiut  wrote:

> Can you show us your models.
>
> On Wed, 25 Dec 2019, 08:03 Gregory Vaks,  wrote:
>
>> Hello all,
>>
>> I am using Django-Tables2 for front-end in my app as it nicely fits my
>> requirement for displaying information.
>>
>> My issue is that I need to display information from multiple models
>> (MySQL tables) in one screen/template.  There is a stored procedure that
>> gets all the information that I need and I tested out calling it which
>> works fine but there is no documentation on how to feed this data into a
>> table.
>>
>> The Django-Tables2 seems to use a table struct which gets data from
>> fields that can be specified based off the model you declare while in my
>> case I am not using just one model so this method will not work for me.  I
>> have tried different methods and searching for better documentation or if
>> anyone had this issue before but found nothing...
>>
>> Can someone please advise if there is an easy way for me to do this or an
>> alternate route I may need to take?
>>
>> --
>> 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/ab8b0bfc-7d47-4b6c-9047-17fd1e008db5%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/CAPCf-y5%3DSc5HTrEQ1r9H_Y1P_d7Z5YLLOmPwiRcgEV_EJnaGLw%40mail.gmail.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/CAP5HUWpkierKyVO8Rf-pv2vx9S2gsEYedRQDkvoOYzD9GpWeZQ%40mail.gmail.com.


Re: Regarding API Creation

2019-12-24 Thread Integr@te System
Hi friend,

My bend:
Tackle perf gather container for functional api.
Choose arch as less or immutate model.
Of course to do drf cbv in this case.

Thank for sharing.

On Tue, Dec 24, 2019, 03:28 Anonymous Anon  wrote:

> It really depends  Architecture vs Performance  This is what I
> usually do. For most of my API implementations, i write function based API
> - specially it's a part of a large project where there are multiple
> endpoints. I have experienced performance issues using DRF class based
> views at multiple occation.
>
> However, if I am using factory design pattern for my model architecture, I
> usually choose class based views. That's when I find it extremely useful to
> use DRF CBV as you can use reusable serializers.
>
> On Mon., Dec. 23, 2019, 9:41 a.m. Pravin Yadav, 
> wrote:
>
>> Hello Everyone,
>>
>> I'm new beginner in API. Can anyone share which is the best way to create
>> the API in DRF.
>>
>> 1:- Class-Based Views
>> 2:- Function based API
>> 3:- ViewSets & Routers
>>
>>
>> Kindly suggest which way is best ..
>>
>>
>>
>> Thanks & Regards,
>> Pravin Kumar Yadav
>> 8743064255
>>
>> --
>> 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/CAEr6%3DdxZskzhkNvfN5qWJGcTCf-BbNsa-47xnWwxfjz%3DO6MM_w%40mail.gmail.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/CAAmw3B14dMnYqfO8qZaZQ4HOfNO1Nu9aqAwu%3DFvT7AyaWqvNbg%40mail.gmail.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/CAP5HUWpX4uiN1DMhSPvgqY4kXucDhDhg3Xbrh%2BJR7J7szZbn4Q%40mail.gmail.com.


Re: Google Summer of code 2020

2019-12-24 Thread Integr@te System
Hi,

Just ask Google for this event.

Happy code.


On Tue, Dec 24, 2019, 11:32 Karan Mittal  wrote:

> Actually I had the same query regarding GSoC. Please help
>
> Regards,
> Karan Mittal
> 3rd yr Student in Btech CSE,
> Acropolis Institute of Technology and Research, Indore
>
> On Mon, 23 Dec, 2019, 6:31 PM Manas Kabre,  wrote:
>
>> Hello,
>> I was looking for someone who i could contact to get details on what
>> steps i should take soo that i would be eligible to get this org fro gsoc
>> 2020. Anyone who is applying for being th mentor, you r help would be
>> appreciated.
>>
>> I am a student from IIIT Hyderabad, India. Currently in my 4th semester
>> of college.
>>
>> Thanking you,
>> Manas Kabre
>>
>> --
>> 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/eeec60bd-36fb-461e-b1b4-b08c8755e978%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/CAO24gqwR9T%3Dy7tU73j8JVx3cus2XzTHUkhviWRzwcbrBknJCMQ%40mail.gmail.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/CAP5HUWoQb7kcgk_kAsZevMyr05%2B9Ff94bLvRm0Bi61dfTi4Oaw%40mail.gmail.com.


Re: Regarding API Creation

2019-12-23 Thread Integr@te System
Hi friend,

https://medium.com/profil-software-blog/10-things-you-need-to-know-to-effectively-use-django-rest-framework-7db7728910e0

On Mon, Dec 23, 2019, 22:41 Pravin Yadav  wrote:

> Hello Everyone,
>
> I'm new beginner in API. Can anyone share which is the best way to create
> the API in DRF.
>
> 1:- Class-Based Views
> 2:- Function based API
> 3:- ViewSets & Routers
>
>
> Kindly suggest which way is best ..
>
>
>
> Thanks & Regards,
> Pravin Kumar Yadav
> 8743064255
>
> --
> 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/CAEr6%3DdxZskzhkNvfN5qWJGcTCf-BbNsa-47xnWwxfjz%3DO6MM_w%40mail.gmail.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/CAP5HUWpCe_UeQqnsEfyj3UbH37QrH3grArPC95EcKEnM-q3StA%40mail.gmail.com.


Re: A Business Solutions and ERP framework released.

2019-12-23 Thread Integr@te System
Hi Ngallen,

Does crystal report has API!?
https://github.com/alocshrestha/Crystal_API
Try out if your work done with win32com module

Or can you export to html in cr tool and use it as template in django or
display look like iFrame in page!?

Plz see these option as my idea, I hage not try for my self yet.

Happy cook.



On Mon, Dec 23, 2019, 01:20 Ngallen Ramadhan  wrote:

> Thanks a lot Ramez for this effort.
>
> Normally I deal with Accounting solutions too. I was in a big puzzle to
> find out how can I use crystal reports with Django?
>
> Always I use crystal report to generate different reports when I switched
> to Django this was one of my challenges.
>
> Hopefully this will be end of it.
>
>
>
>
>
> *From:* django-users@googlegroups.com  *On
> Behalf Of *Ramez Ashraf
> *Sent:* Sunday, 22 December 2019 20:14
> *To:* Django users 
> *Subject:* Re: A Business Solutions and ERP framework released.
>
>
>
> > how long time did you take to finish this project ?
>
> Not short time my friend Mohamed Khaled.
>
> A longer version of the answer:
>
> I always worked in the field of ERP/accounting solution.
> The framework was built after i switched to using Python and Django and It
> was triggered by my work to supply an ERP solution to a big client of
> mine... that transaction didn't come through, but this project was born out
> of it.
> Mainly it got loaded with ERP different modules (sales / purchases /
> payment / General ledger etc...) and it's not till very recently that i
> decided to open source the core.
>
> After that decision was made, i went on and removed all "my assumptions"
> from it, simplified the api, (it's amazing what you can get rid of in your
> code/api as soon as you start writing documentation for other people to use
> it), substitute paid libraries with open source ones, write a tutorial /
> documentation , and  here we are. :)
>
> Still have a long way to go...
>
> My hopes are that this long way ahead will be much more enjoyable with the
> community engagement..
>
> That's all :)
>
>
> On Sunday, December 22, 2019 at 5:19:14 PM UTC+2, Ramez Ashraf wrote:
>
> Hello fellow Django developers,
>
> A framework to create diverse business solutions, equipped with a
> reporting engine and a responsive dashboard.
> https://github.com/ra-systems/ra
>
>
> On the docs, you'll find a walk-through tutorial where you'll create a
> simple sales monitor app with various reports and Charts.
>
> The project is till in Alpha, and your support and feedback are really
> important and appreciated.
>
> Thank you wonderful Django community :)
>
> --
> 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/5dcf206a-4ee0-4b95-b71b-adab5bf3cf73%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/006601d5b8f4%247ea32610%247be97230%24%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/CAP5HUWq8R0vb%2BL7WCVnfdQFTbpD8s3gwXPF%2B96gavb44HYAruw%40mail.gmail.com.


Re: A Business Solutions and ERP framework released.

2019-12-22 Thread Integr@te System
Happy code.

On Sun, Dec 22, 2019, 22:23 mohamed khaled 
wrote:

> how long time did you take to finish this project ?
>
> On Dec 22 2019, at 5:19 pm, Ramez Ashraf  wrote:
>
> Hello fellow Django developers,
>
> A framework to create diverse business solutions, equipped with a
> reporting engine and a responsive dashboard.
> https://github.com/ra-systems/ra
>
> On the docs, you'll find a walk-through tutorial where you'll create a
> simple sales monitor app with various reports and Charts.
>
> The project is till in Alpha, and your support and feedback are really
> important and appreciated.
>
> Thank you wonderful Django community :)
>
>
> --
> 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/24483074-bf60-4f5f-a01e-fb7a9e66c0a0%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/1FAE938F-0DA7-47DB-A4A0-ACD576E54AEA%40getmailspring.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/CAP5HUWrED-D%2B1dT_LUQjBk9bJePKWxMq5Eht2K8jejWP%3Dg1YNg%40mail.gmail.com.


Re: Django path, Learn Django, Django document

2019-12-21 Thread Integr@te System
Hi Friend,

And as if you seeking for learning quickly search around for web basic
html, css, js each other, example w3school.com... bc of they r combined web
app together.

When you held overview firmly with each part play its role, you can easily
understand how Django codes to be put in html(syntax), python control
behide (reference docs of expert propose previously), many great components
necessary as well.

Happy code.

On Sat, Dec 21, 2019, 23:12 ramadhan ngallen  wrote:

> Hello
> You can use this link
>
> https://www.djangoproject.com
> On 21 Dec 2019, 19:04 +0300, Root Video Dạo , wrote:
>
> Hello everyone!
> I make this thread to find some advice to learn the Django framework.
> I've learned about basic Python and want to learn about Web app using
> Python but I couldn't find the path for this.
> Someone can show me the PATH, DOCUMENT to learn Django.
> Many thank!
>
> --
> 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/5705e890-582d-46e4-8b6e-69d5d69b5259%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/4b55d4fa-8e76-4e51-afa1-87a813f72f1e%40Spark
> 
> .
>

-- 
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/CAP5HUWow1tcUSoKv7KnCsxi4e%3DXYOGvAdGd79MOJ8FX1czs-Kg%40mail.gmail.com.


Re: manage.py not able to run any commands

2019-12-17 Thread Integr@te System
Hi Phil,

Consider other command look like django-admin.
https://docs.djangoproject.com/en/3.0/ref/django-admin/

On Tue, Dec 17, 2019, 18:35 Phil Yang  wrote:

> Hi,
> All of a sudden, when I tried to run manage.py runserver, it didn't
> produce any output, and it didn't do anything. In fact, the manage.py
> script seems to not be able to run other commands, such as startapp or
> createsuperuser.
>
> I've already used the command many times prior, and it has always worked
> perfectly.
>
> Yes, Python is installed (I can run other scripts), but manage.py seems to
> have an issue.
>
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/c4b172e2-15a9-4fbf-96b6-e137086f614e%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/CAP5HUWo5bHvrPBXQfHmd4R2MkSg1wecNtuExzSAZCU74d2%3DqLA%40mail.gmail.com.


Re: [URGENT] HOW TO DISPLAY IN HTML A PANDAS PLOTTING IN A DJANGO APPLICATION

2019-12-16 Thread Integr@te System
Hi Gana,

Try implement Django Panda module,
# Create DataFrameManager instance in model
# Query data and then export to Panda dataframe by to_dataframe() method,
# After that convert to JSON data via to_json() method
# Final render on context in any template of html file

On Mon, Dec 16, 2019, 20:55 Guy NANA  wrote:

> Thanks for your answers
>
> --
> 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/fe86faf3-829f-4854-907f-fd22966886f0%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/CAP5HUWo0jziaU7iXgdhsrpEQcEdDLzOxJNEaEwjV1%2B6vj8zmnA%40mail.gmail.com.


Re: gunicorn.errors.HaltServer:

2019-12-16 Thread Integr@te System
Hi,

You run on gunicorn cli


On Mon, Dec 16, 2019, 05:28 Ram  wrote:

> Hi Integr,
>
> Thank you for the answer but I don't see '--preload' option for the same
> command. Am I missing anything?
>
>>
>> $ sudo systemctl --preload gunicorn.service
>>> systemctl: unrecognized option '--preload'
>>>
>> $ sudo systemctl status gunicorn.service --preload
>> systemctl: unrecognized option '--preload'
>> $ sudo systemctl --help | grep preload
>>
>
> ~Ram
>
>
>
> On Sun, Dec 15, 2019 at 10:32 AM Integr@te System <
> datacentral...@gmail.com> wrote:
>
>> Hi Issuer,
>>
>> Try to run command: --preload to whatsup with worker processes and app
>> and server.
>>
>> On Sun, Dec 15, 2019, 13:32 Ram  wrote:
>>
>>> Hi,
>>>
>>> I followed this document
>>> <https://www.digitalocean.com/community/tutorials/how-to-set-up-django-with-postgres-nginx-and-gunicorn-on-ubuntu-18-04>
>>> and I’m hitting this error. Could you let me know what I’m missing? I tried
>>> several things the whole day and nothing has worked? Please let me know if
>>> you have any solution on this error?
>>>
>>> >>> $ sudo systemctl status gunicorn.socket
>>> >>> Failed to dump process list, ignoring: No such file or directory
>>> >>> ● gunicorn.socket - gunicorn socket
>>> >>>Loaded: loaded (/etc/systemd/system/gunicorn.socket; enabled;
>>> vendor preset: enabled)
>>> >>>Active: active (listening) since Sun 2019-12-15 05:15:27 UTC; 17s
>>> ago
>>> >>>Listen: /home/xx/myproject/myapp/myapp.sock (Stream)
>>> >>>CGroup: /system.slice/gunicorn.socket
>>> >>>
>>> >>> Dec 15 05:15:27 ubuntu-s-01 systemd[1]: Listening on gunicorn socket.
>>> >>>
>>> >>>
>>> >>> $ sudo systemctl status gunicorn.service
>>> >>> ● gunicorn.service - gunicorn daemon
>>> >>>Loaded: loaded (/etc/systemd/system/gunicorn.service; enabled;
>>> vendor preset: enabled)
>>> >>>Active: failed (Result: exit-code) since Sun 2019-12-15 04:22:54
>>> UTC; 53min ago
>>> >>>  Main PID: 15788 (code=exited, status=1/FAILURE)
>>> >>>
>>> >>> Dec 15 04:22:54 ubuntu-s-01 gunicorn[15788]: self.stop()
>>> >>> Dec 15 04:22:54 ubuntu-s-01 gunicorn[15788]:   File
>>> "/home/xx/myproject/xxenv/lib/python3.6/site-packages/gunicorn/arbi
>>> >>> Dec 15 04:22:54 ubuntu-s-01 gunicorn[15788]: time.sleep(0.1)
>>> >>> Dec 15 04:22:54 ubuntu-s-01 gunicorn[15788]:   File
>>> "/home/xx/myproject/xxkenv/lib/python3.6/site-packages/gunicorn/arbi
>>> >>> Dec 15 04:22:54 ubuntu-s-01 gunicorn[15788]: self.reap_workers()
>>> >>> Dec 15 04:22:54 ubuntu-s-01 gunicorn[15788]:   File
>>> "/home/xx/myproject/xxenv/lib/python3.6/site-packages/gunicorn/arbi
>>> >>> Dec 15 04:22:54 ubuntu-s-01 gunicorn[15788]: raise
>>> HaltServer(reason, self.WORKER_BOOT_ERROR)
>>> >>> Dec 15 04:22:54 ubuntu-s-01 gunicorn[15788]:
>>> gunicorn.errors.HaltServer: 
>>> >>> Dec 15 04:22:54 ubuntu-s-01 systemd[1]: gunicorn.service: Main
>>> process exited, code=exited, status=1/FAILURE
>>> >>> Dec 15 04:22:54 ubuntu-s-01 systemd[1]: gunicorn.service: Failed
>>> with result 'exit-code'.
>>>
>>> --
>>> 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%2BOi5F1FL%3D3eBo7KAu%3DsmSV%2BuCUnUHk7q32TdkkeVGMznUtp7Q%40mail.gmail.com
>>> <https://groups.google.com/d/msgid/django-users/CA%2BOi5F1FL%3D3eBo7KAu%3DsmSV%2BuCUnUHk7q32TdkkeVGMznUtp7Q%40mail.gmail.com?utm_medium=email_source=footer>
>>> .
>>>
>> --
>> 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/CAP5HUWrcFKT1y_Z0tkQ2qp5Gf-RJ9TPKu33Kmud

Re: gunicorn.errors.HaltServer:

2019-12-15 Thread Integr@te System
Hi Issuer,

Try to run command: --preload to whatsup with worker processes and app and
server.

On Sun, Dec 15, 2019, 13:32 Ram  wrote:

> Hi,
>
> I followed this document
> 
> and I’m hitting this error. Could you let me know what I’m missing? I tried
> several things the whole day and nothing has worked? Please let me know if
> you have any solution on this error?
>
> >>> $ sudo systemctl status gunicorn.socket
> >>> Failed to dump process list, ignoring: No such file or directory
> >>> ● gunicorn.socket - gunicorn socket
> >>>Loaded: loaded (/etc/systemd/system/gunicorn.socket; enabled;
> vendor preset: enabled)
> >>>Active: active (listening) since Sun 2019-12-15 05:15:27 UTC; 17s
> ago
> >>>Listen: /home/xx/myproject/myapp/myapp.sock (Stream)
> >>>CGroup: /system.slice/gunicorn.socket
> >>>
> >>> Dec 15 05:15:27 ubuntu-s-01 systemd[1]: Listening on gunicorn socket.
> >>>
> >>>
> >>> $ sudo systemctl status gunicorn.service
> >>> ● gunicorn.service - gunicorn daemon
> >>>Loaded: loaded (/etc/systemd/system/gunicorn.service; enabled;
> vendor preset: enabled)
> >>>Active: failed (Result: exit-code) since Sun 2019-12-15 04:22:54
> UTC; 53min ago
> >>>  Main PID: 15788 (code=exited, status=1/FAILURE)
> >>>
> >>> Dec 15 04:22:54 ubuntu-s-01 gunicorn[15788]: self.stop()
> >>> Dec 15 04:22:54 ubuntu-s-01 gunicorn[15788]:   File
> "/home/xx/myproject/xxenv/lib/python3.6/site-packages/gunicorn/arbi
> >>> Dec 15 04:22:54 ubuntu-s-01 gunicorn[15788]: time.sleep(0.1)
> >>> Dec 15 04:22:54 ubuntu-s-01 gunicorn[15788]:   File
> "/home/xx/myproject/xxkenv/lib/python3.6/site-packages/gunicorn/arbi
> >>> Dec 15 04:22:54 ubuntu-s-01 gunicorn[15788]: self.reap_workers()
> >>> Dec 15 04:22:54 ubuntu-s-01 gunicorn[15788]:   File
> "/home/xx/myproject/xxenv/lib/python3.6/site-packages/gunicorn/arbi
> >>> Dec 15 04:22:54 ubuntu-s-01 gunicorn[15788]: raise
> HaltServer(reason, self.WORKER_BOOT_ERROR)
> >>> Dec 15 04:22:54 ubuntu-s-01 gunicorn[15788]:
> gunicorn.errors.HaltServer: 
> >>> Dec 15 04:22:54 ubuntu-s-01 systemd[1]: gunicorn.service: Main process
> exited, code=exited, status=1/FAILURE
> >>> Dec 15 04:22:54 ubuntu-s-01 systemd[1]: gunicorn.service: Failed with
> result 'exit-code'.
>
> --
> 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%2BOi5F1FL%3D3eBo7KAu%3DsmSV%2BuCUnUHk7q32TdkkeVGMznUtp7Q%40mail.gmail.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/CAP5HUWrcFKT1y_Z0tkQ2qp5Gf-RJ9TPKu33Kmudka1sAu3rymw%40mail.gmail.com.


Re: ckeditor toolbar is not showing in html new post page.. why home.html (for adding a new post) is not showing the rendered django form for add new post?

2019-12-13 Thread Integr@te System
Hi Issuer,

Plz check docs again for resolve your matter.
Try either set csrf token cookies or use ensure_csrf_cookie()
https://docs.djangoproject.com/en/3.0/ref/csrf/#django.views.decorators.csrf.ensure_csrf_cookie

On Fri, Dec 13, 2019, 05:10 হজমুলা খান  wrote:

> thanx for your advice and i removed  {% csrf_token %} and still same.
> problem is not solved. add post form is not showing.
>
>
>
> On Thursday, December 12, 2019 at 3:24:48 PM UTC, Integr@te System wrote:
>>
>> Hi,
>>
>> Django view dont render csrf tag within template form, you should check
>> doc in warning part
>> https://docs.djangoproject.com/en/3.0/ref/csrf/
>>
>> And look at the additional way to resolve your problem.
>>
>> On Thu, Dec 12, 2019, 16:45 হজমুলা খান  wrote:
>>
>>> i am integrating some apps to make a bigger project but the problem is
>>> when i try insert ckeditor in html login page it is not showing. for this
>>> reason i tried to make separate app is to see whats going on here. i am
>>> showing you the code in detail.
>>> editing/settings.py:
>>>
>>>
>>> ..
>>> INSTALLED_APPS = [
>>> 'django.contrib.admin',
>>> 'django.contrib.auth',
>>> 'django.contrib.contenttypes',
>>> 'django.contrib.sessions',
>>> 'django.contrib.messages',
>>> 'django.contrib.staticfiles',
>>> 'editor',
>>> 'ckeditor_uploader',
>>> 'ckeditor',
>>> ]
>>> TEMPLATES = [
>>> {
>>>
>>> 'DIRS': [os.path.join(BASE_DIR,'templates')],
>>> .
>>> STATIC_URL = 'editor/static/'
>>> STATIC_ROOT='editor/static/'
>>> CKEDITOR_UPLOAD_PATH='editor/static/media/'
>>>
>>> editing/urls.py:
>>>
>>> from django.contrib import admin
>>> from django.urls import path, include
>>> from django.conf import settings
>>> from django.conf.urls.static import static
>>>
>>> urlpatterns = [
>>> path('admin/', admin.site.urls),
>>> path('',include('editor.urls')),
>>> path('ckeditor/',include('ckeditor_uploader.urls')),
>>> ] + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
>>>
>>> in this case, my static folder is in editor/static when i execute python
>>> manage.py collectstatic and ckeditor folder is in editor/static directory
>>> also.
>>>
>>> editor/models.py:
>>>
>>> from django.db import models
>>> from ckeditor_uploader.fields import RichTextUploadingField
>>>
>>> # Create your models here.
>>>
>>> class Post(models.Model):
>>> title=models.CharField(max_length=255)
>>> body=models.CharField(max_length=2000)
>>> description=RichTextUploadingField()
>>>
>>> def __str__(self):
>>> return self.title
>>>
>>> editor/admin.py:
>>>
>>> from django.contrib import admin
>>> from .models import Post
>>>
>>> admin.site.register(Post)
>>>
>>> when i execute python manage.py makemigrations and python manage.py
>>> migrate, ckeditor can be seen in locahost:8000/admin's new post section
>>> perfectly. then i tried to make templates.
>>>
>>> base.html:
>>> {% load static %}
>>> 
>>> 
>>> Django blog
>>> https://fonts.googleapis.com/css?family=Source+Sans+Pro:400;
>>> rel="stylesheet">
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> Django blog
>>> 
>>> 
>>> {% block content %}
>>> {% endblock content %}
>>> 
>>> 
>>> 
>>>
>>> home.html:
>>> {% extends 'base.html' %}
>>> {% block content %}
>>> New post
>>> 
>>>
>>> {% csrf_token %}
>>> {{ form.media|safe }}
>>> {{ form.as_p }}
>>> 
>>> 
>>> {% endblock content %}
>>>
>>> and then i have created a html file editor/urls.py:
>>> from django.urls import path
>>>
>>> from .views import HomePageView
>>>
>>> urlpatterns=[
>>> path('',HomePageView.as_view(), name='home'),
>>> ]
>>>
>>> and here is the editor/views.py also:
>>> from django.views.generic import TemplateView
>>> from .models import Post
>>>
>>>
>>> class HomePageView(TemplateVi

Re: ckeditor toolbar is not showing in html new post page.. why home.html (for adding a new post) is not showing the rendered django form for add new post?

2019-12-12 Thread Integr@te System
Hi,

Django view dont render csrf tag within template form, you should check doc
in warning part
https://docs.djangoproject.com/en/3.0/ref/csrf/

And look at the additional way to resolve your problem.

On Thu, Dec 12, 2019, 16:45 হজমুলা খান  wrote:

> i am integrating some apps to make a bigger project but the problem is
> when i try insert ckeditor in html login page it is not showing. for this
> reason i tried to make separate app is to see whats going on here. i am
> showing you the code in detail.
> editing/settings.py:
>
>
> ..
> INSTALLED_APPS = [
> 'django.contrib.admin',
> 'django.contrib.auth',
> 'django.contrib.contenttypes',
> 'django.contrib.sessions',
> 'django.contrib.messages',
> 'django.contrib.staticfiles',
> 'editor',
> 'ckeditor_uploader',
> 'ckeditor',
> ]
> TEMPLATES = [
> {
>
> 'DIRS': [os.path.join(BASE_DIR,'templates')],
> .
> STATIC_URL = 'editor/static/'
> STATIC_ROOT='editor/static/'
> CKEDITOR_UPLOAD_PATH='editor/static/media/'
>
> editing/urls.py:
>
> from django.contrib import admin
> from django.urls import path, include
> from django.conf import settings
> from django.conf.urls.static import static
>
> urlpatterns = [
> path('admin/', admin.site.urls),
> path('',include('editor.urls')),
> path('ckeditor/',include('ckeditor_uploader.urls')),
> ] + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
>
> in this case, my static folder is in editor/static when i execute python
> manage.py collectstatic and ckeditor folder is in editor/static directory
> also.
>
> editor/models.py:
>
> from django.db import models
> from ckeditor_uploader.fields import RichTextUploadingField
>
> # Create your models here.
>
> class Post(models.Model):
> title=models.CharField(max_length=255)
> body=models.CharField(max_length=2000)
> description=RichTextUploadingField()
>
> def __str__(self):
> return self.title
>
> editor/admin.py:
>
> from django.contrib import admin
> from .models import Post
>
> admin.site.register(Post)
>
> when i execute python manage.py makemigrations and python manage.py
> migrate, ckeditor can be seen in locahost:8000/admin's new post section
> perfectly. then i tried to make templates.
>
> base.html:
> {% load static %}
> 
> 
> Django blog
> https://fonts.googleapis.com/css?family=Source+Sans+Pro:400;
> rel="stylesheet">
> 
> 
> 
> 
> 
> 
> Django blog
> 
> 
> {% block content %}
> {% endblock content %}
> 
> 
> 
>
> home.html:
> {% extends 'base.html' %}
> {% block content %}
> New post
> 
>
> {% csrf_token %}
> {{ form.media|safe }}
> {{ form.as_p }}
> 
> 
> {% endblock content %}
>
> and then i have created a html file editor/urls.py:
> from django.urls import path
>
> from .views import HomePageView
>
> urlpatterns=[
> path('',HomePageView.as_view(), name='home'),
> ]
>
> and here is the editor/views.py also:
> from django.views.generic import TemplateView
> from .models import Post
>
>
> class HomePageView(TemplateView):
>  model=Post
>  template_name='home.html'
>  fields=['title','body']
>
> i just want to see a simple page of showing new html post editor with
> ckeditor toolbar in it. it's just for seeing what's wrong and why my
> ckeditor toolbar is not showing in my html file. when i run python
> manage.py runserver there is no error showing and the html page is showing
> django post and new post and only the save button. it can't render the form
> of the django's new post. css style is rendered because the django post and
> new post has the desired color and font. but why it is not rendering the
> new post form with ckeditor toolbar?
>
> i am still learning and this problem is eating me up. thanx 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/b8c48a91-b67c-4da0-8ce3-b301798a3851%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/CAP5HUWpVhjVBiVMJcAqSpnYxxte0gw4TYSTBr3xpagH0QYotKw%40mail.gmail.com.


Re: Code Inspect

2019-12-11 Thread Integr@te System
Hi,

You may need refer to ModelViewSet class that inherit from GenericAPIView
class

https://www.django-rest-framework.org/api-guide/viewsets/#modelviewset



On Wed, Dec 11, 2019, 16:38 Soumen Khatua  wrote:

>
>
>
>
>
>
>
>
> *class UserViewSet(viewsets.ModelViewSet):queryset =
> get_user_model().objectsserializer_class = UserSerializerdef
> get_permissions(self):if self.request.method == 'POST':
> self.permission_classes = (AllowAny,)return super(UserViewSet,
> self).get_permissions()*
>
> I didn't understand this code,So i have some questions like:
>
> In this Case I'm overriding ModelViewSet get_permissions class,right?
>
> After overriding self.permission_classes variable,I'm returning Parent
> class(ModelViewSet) get_permissions(), Which method(properties)
> will come after calling UserViewSet.
>
> Thank You in advance
>
> Regards,
> Soumen
>
> --
> 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/CAPUw6WbEBaiizem-Gi2zh5gT1kRpdf-zM75_op2pYOebwTANXw%40mail.gmail.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/CAP5HUWpqLWg22Bo6rKEZSfNt%3DvzSPUcJAwEinThMid1envSmjQ%40mail.gmail.com.


Re: How to add navigatinon bar or Menu Bar in Django Admin Panel only

2019-12-11 Thread Integr@te System
Hi,

https://medium.com/crowdbotics/how-to-add-a-navigation-menu-in-django-admin-770b872a9531

On Wed, Dec 11, 2019, 15:22 Balaji Shetty  wrote:

> Hi
>
> Can anyone help me in adding Navigatinon Bar in Django Admin Panel in
> Backend.
>
> I have to generate some customized reports using Aggregate function link
> Sum, Count, Group by on models.
>
> Sample Demo example is shown in Attachment.
>
>
>
>
>
> --
> Mr Shetty Balaji
> Asst. Prof.
> IT Department
> SGGS I
> Nanded. My. India
>
> --
> 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/CAECSbOvz%3DisaeDNZpr4TT9D1bLOKQENwNAjdOjY7-eJA2N_COw%40mail.gmail.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/CAP5HUWoSj21byGMnJ8MH0axv_O2%2BnrTLNF72oRqH8gYzzd8t3w%40mail.gmail.com.


Re: Sending XML data from Django to another server (SAP)

2019-12-10 Thread Integr@te System
Hi,
https://pypi.org/project/django-import-export-xml/

On Tue, Dec 10, 2019, 19:20 Pema Galey  wrote:

> Thank you for your interest..
> But I have developed my Django application and now I am looking for best
> method to send data from Django server to SAP using XML Format.
> Just I want the recommendation.
>
> Thank you
>
> On Dec 7, 2019, at 6:46 PM, Dvs Khamele  wrote:
>
> Hi do you hire contract based python/django freelancer?
>  I can help you in this and related tasks
> Best Regards,
> Divyesh Khamele
>
> On Sat, 7 Dec 2019 at 19:51, Pema Galey  wrote:
>
>> Hi All,
>> Someone recommend in sending the *data from Django server to SAP server
>> which interprets in XML format.*
>>
>>
>> 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 view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/8e4e2355-bb3b-4695-9770-a18c20249fd0%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/CAH9mneVb0Hve4q9QoxxuvA8fmOZcy%2B35JrL7fg6fSOmx-WnzxA%40mail.gmail.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/5D0984F4-A70C-4D57-8AE4-5F15649C053D%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/CAP5HUWpo5tVfqwszmxfgDS895njVej%2BicHZrnJJWy1J-Wi%2BRvA%40mail.gmail.com.


Re: Hiring an engineer in San Francisco

2019-12-10 Thread Integr@te System
Hi PollyEx team,
Thank for your sharing.


On Tue, Dec 10, 2019, 06:03 Erik Gunderson  wrote:

> PollyEx is hiring a full stack software engineer with an emphasis in
> django. Our team is looking for a full-time employee able to work in our
> San Francisco office.  The stack is python/django/pandas/vue/heroku
>
> To apply visit -
> https://jobs.lever.co/pollyex/23e8fee3-8a9f-4bf1-9943-8584ab9b6c0a or
> www.pollyex.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/154a4188-be29-40f5-82dc-1cec3906ffbf%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/CAP5HUWrJi%3DmCSWMp2ZOtgtAKKvytxhWSCQqFt-UES%2BypVyrmEA%40mail.gmail.com.


Re: Ayuda como pasar un sql al ORM Django

2019-12-09 Thread Integr@te System
Hi friend,

https://docs.djangoproject.com/en/2.2/topics/db/queries/

On Sun, Dec 8, 2019, 04:57 DEYMER DE JESUS HOYOS PEREZ <
ddhoy...@misena.edu.co> wrote:

> Me gustaría saber como puedo pasar esta consulta de postgresql usando el
> orm de django
>
> SELECT  peluqueria_persona."Nombre", "GananciaEmpleado" From venta_venta
> INNER JOIN cita_cita ON  cita_cita.id = "Cita_id"
> INNER JOIN peluqueria_empleado  ON cita_cita.id = "Empleado_id"
> INNER JOIN peluqueria_persona  ON "Contacto_id" = peluqueria_persona.id ;
>
> gracias..
>
>
>
> *Declinación de Responsabilidades:* Los servicios de MISENA son
> soportados tecnológicamente por © Google y ofrecidos por el Servicio
> Nacional de Aprendizaje – SENA de manera gratuita a los aprendices e
> instructores de programas de formación titulada, las opiniones que contenga
> este mensaje son exclusivas de su autor y no representan la opinión del
> Servicio Nacional de Aprendizaje o de sus autoridades. El receptor deberá
> verificar posibles virus informáticos que tenga el correo o cualquier
> anexo, razón por la cual el SENA no es responsable de los daños causados
> por cualquier virus transmitido en este correo electrónico.
>
> Los contenidos, textos, imágenes, archivos enviados en este mensaje son
> responsabilidad exclusiva del remitente y no reflejan ni comprometen de
> ninguna manera a la institución. No se autoriza el uso de esta herramienta
> para el intercambio de correos masivos, cadenas o spam, ni de mensajes
> ofensivos, de carácter político, sexual o religioso, con fines de lucro,
> con propósitos delictivos o cualquier otro mensaje que se considere
> indebido o que vaya en contra de la Ley.
>
> --
> 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/2d6faf86-b14b-44fd-8cdd-b7191d1e0b5a%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/CAP5HUWroh7cg38CbTo_FCyjnx0YrssqGUjwi%3DQ_MBgQC254s5g%40mail.gmail.com.


Re: django.db.utils.ProgrammingError: relation "django_content_type" already exists

2019-12-08 Thread Integr@te System
Hi issuer,

Check if your app development in localhost whether fall into any restricted
case relate to Django content type:
https://docs.djangoproject.com/en/3.0/topics/db/multi-db/



On Sun, Dec 8, 2019, 07:08 Ram  wrote:

> Hi,
>
> As a next step I tried the following but the result is is same. Please let
> me know if you have any clue on this?
>
> 1. Deleted/Dropped 'django_content_type' table from database
> 2. I upgraded Django to version 3.0 from 2.2.7 in my virtual environment
> and ran the following commands
>
> 1. $ python manage.py migrate --fake
> 2. $ python manage.py migrate --fake--initial
> 3. $ python manage.py migrate
>
> But I still see same error
> django.db.utils.ProgrammingError: relation "django_content_type" does not
> exist
> LINE 1: ..."."app_label", "django_content_type"."model" FROM "django_co...
>
> On Wed, Dec 4, 2019 at 3:41 PM Ram  wrote:
>
>> Hello Naveen,
>>
>> I already tried that before posting my last update but the result is the
>> same though. Here I'm pasting the result. This is a total blocker to me. I
>> appreciate if someone can unblock me.
>>
>> $ python manage.py migrate --fake-initial
>>> Operations to perform:
>>>   Apply all migrations: admin, auth, contenttypes, pages, sessions
>>> Running migrations:
>>>   Applying contenttypes.0002_remove_content_type_name...Traceback (most
>>> recent call last):
>>>   File
>>> "/home/shami/vkproject/vkenv/lib/python3.6/site-packages/django/db/backends/utils.py",
>>> line 84, in _execute
>>> return self.cursor.execute(sql, params)
>>> psycopg2.errors.UndefinedColumn: column "name" of relation
>>> "django_content_type" does not exist
>>>
>>>
>>> The above exception was the direct cause of the following exception:
>>>
>>> Traceback (most recent call last):
>>>   File "manage.py", line 21, in 
>>> main()
>>>   File "manage.py", line 17, in main
>>> execute_from_command_line(sys.argv)
>>>   File
>>> "/home/shami/vkproject/vkenv/lib/python3.6/site-packages/django/core/management/__init__.py",
>>> line 381, in execute_from_command_line
>>> utility.execute()
>>>   File
>>> "/home/shami/vkproject/vkenv/lib/python3.6/site-packages/django/core/management/__init__.py",
>>> line 375, in execute
>>> self.fetch_command(subcommand).run_from_argv(self.argv)
>>>   File
>>> "/home/shami/vkproject/vkenv/lib/python3.6/site-packages/django/core/management/base.py",
>>> line 323, in run_from_argv
>>> self.execute(*args, **cmd_options)
>>>   File
>>> "/home/shami/vkproject/vkenv/lib/python3.6/site-packages/django/core/management/base.py",
>>> line 364, in execute
>>> output = self.handle(*args, **options)
>>>   File
>>> "/home/shami/vkproject/vkenv/lib/python3.6/site-packages/django/core/management/base.py",
>>> line 83, in wrapped
>>> res = handle_func(*args, **kwargs)
>>>   File
>>> "/home/shami/vkproject/vkenv/lib/python3.6/site-packages/django/core/management/commands/migrate.py",
>>> line 234, in handle
>>> fake_initial=fake_initial,
>>>   File
>>> "/home/shami/vkproject/vkenv/lib/python3.6/site-packages/django/db/migrations/executor.py",
>>> line 117, in migrate
>>> state = self._migrate_all_forwards(state, plan, full_plan,
>>> fake=fake, fake_initial=fake_initial)
>>>   File
>>> "/home/shami/vkproject/vkenv/lib/python3.6/site-packages/django/db/migrations/executor.py",
>>> line 147, in _migrate_all_forwards
>>> state = self.apply_migration(state, migration, fake=fake,
>>> fake_initial=fake_initial)
>>>   File
>>> "/home/shami/vkproject/vkenv/lib/python3.6/site-packages/django/db/migrations/executor.py",
>>> line 245, in apply_migration
>>> state = migration.apply(state, schema_editor)
>>>   File
>>> "/home/shami/vkproject/vkenv/lib/python3.6/site-packages/django/db/migrations/migration.py",
>>> line 124, in apply
>>> operation.database_forwards(self.app_label, schema_editor,
>>> old_state, project_state)
>>>   File
>>> "/home/shami/vkproject/vkenv/lib/python3.6/site-packages/django/db/migrations/operations/fields.py",
>>> line 249, in database_forwards
>>> schema_editor.alter_field(from_model, from_field, to_field)
>>>   File
>>> "/home/shami/vkproject/vkenv/lib/python3.6/site-packages/django/db/backends/base/schema.py",
>>> line 535, in alter_field
>>> old_db_params, new_db_params, strict)
>>>   File
>>> "/home/shami/vkproject/vkenv/lib/python3.6/site-packages/django/db/backends/postgresql/schema.py",
>>> line 124, in _alter_field
>>> new_db_params, strict,
>>>   File
>>> "/home/shami/vkproject/vkenv/lib/python3.6/site-packages/django/db/backends/base/schema.py",
>>> line 685, in _alter_field
>>> params,
>>>   File
>>> "/home/shami/vkproject/vkenv/lib/python3.6/site-packages/django/db/backends/base/schema.py",
>>> line 137, in execute
>>> cursor.execute(sql, params)
>>>   File
>>> "/home/shami/vkproject/vkenv/lib/python3.6/site-packages/django/db/backends/utils.py",
>>> line 99, in execute
>>> return super().execute(sql, params)
>>>   File
>>> 

Re: ''workon' is not recognized as an internal or external command, operable program or batch file'

2019-12-07 Thread Integr@te System
Hi,

I have homeless, without meal, non friend, unfamily.
Do you want asking me from hiring!?

Just jokes j.
Regards.

On Sun, Dec 8, 2019, 00:47 Dvs Khamele  wrote:

> Hi do you hire contract based python/django freelancer?
>  I can help you in this
> Best Regards,
> Divyesh Khamele
>
> On Sat, 7 Dec 2019 at 20:18, Khaleel Ahmed H. M. Shariff <
> khaleelahme...@gmail.com> wrote:
>
>> Hi Hima,
>> May Peace, Blessings & Mercy of Almighty God be on you!
>> workon is a module. do a *pip install workon*
>>
>> If you still get the same message. You could execute *python -m workon
>> test*
>>
>>
>> Hope this helps
>> Best of Luck.
>>
>>
>> God Bless You!
>> God Bless India!!
>> --
>>
>> Love & Regards
>> Dr. Khaleel Ahmed H. M.
>>
>> Managing Director, Tanzanite Realty India Private Limited
>>
>> ---
>>
>> Human Life is Precious
>> Koran Surah Ma'idah Chapter 5 Verse 32:
>> If anyone killed a person, not in retaliation of murder, or (and) to
>> spread mischief in the land - it would be as if he killed all mankind, & if
>> anyone saved a life, it would be as if he saved the life of all mankind.
>>
>>
>> On Sat, Dec 7, 2019 at 6:58 PM Hima Bindu chowdary 
>> wrote:
>>
>>> I am trying to get into virtual environment in vscode but get the below
>>> error ..
>>>
>>> C:\Users\User\projects\telusko>workon test
>>> 'workon' is not recognized as an internal or external command,
>>> operable program or batch file.
>>>
>>> did some research..implemented some things suggested
>>> 1.The python extension 'pylint' in vscode was installed.
>>> 2.The python interpreter is chosen.
>>> Do we need to make changes to path? please suggest..
>>>
>>> --
>>> 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/9ab0fe68-7e7f-4a99-b66c-09e06f7f13e4%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/CAMjBbiA-qW%2BvHMapMk%3Ds2A_hUDgSzX7ngukng3fT%3Dw1VvWiHsA%40mail.gmail.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/CAH9mneXYJGaJJLP3r2RGL2ki8y_9i%3DzVws6AC%3DqbYd9%2BH%3DyOqw%40mail.gmail.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/CAP5HUWpXxLvvqrNhgk9v6OSiepYaRgKJwC_wOCUShW8kwi_ouQ%40mail.gmail.com.


Re: Django DEBUG magic, and a bizarre bug under django-extra-views

2019-12-07 Thread Integr@te System
Hi issuer,

Plz look at model built by UpdateWithInlinesView
to see if you mistake from limit of string return from get_absolute_url()
https://django-extra-views.readthedocs.io/en/latest/pages/formset-views.html#createwithinlinesview-and-updatewithinlinesview

https://docs.djangoproject.com/en/2.2/ref/models/instances/

must contain ASCII RFC2396 section 2

On Sat, Dec 7, 2019, 20:27 Daniel Chimeno  wrote:

> +1 to more document about DEBUG magic.
>
>
> El sábado, 7 de diciembre de 2019, 0:08:41 (UTC+1), Alaina Rowe escribió:
>>
>> I have not been able to reproduce the bug I am about to describe when
>> DEBUG is True, whether in production on Apache or locally on the Django dev
>> server. So my first question is: What is all the magic that Django DEBUG
>> does behind the scenes? The documentation doesn't have very much
>> information about this.
>>
>> Now for the bug. I understand that the following description is too
>> bare-bones for anyone to reproduce, but I have IP to protect, and I don't
>> have much hope of the error being reproduced anyway.
>>
>> Suppose I have a Django project with at least two apps, app alice with
>> model A and app bob with model B.
>>
>> I am using UpdateWithInlinesView from django-extra-views. The error
>> occurs when this view constructs a formset from instances of model A. In my
>> email about the 500, I get a message like this:
>>
>> FieldError at /some/url/
>> Cannot resolve keyword 'field_of_A' into field. Choices are:
>> field_of_B_1, field_of_B_2, field_of_B_3
>>
>> I've gotten this type of error before. It normally happens when you tell
>> a form "I'm using model C" and "I'm using a field called debbie" and model
>> C doesn't have a field called debbie. That part makes sense. But this error
>> makes it look like it's checking against the field names of model B when it
>> should be checking model A. I have been racking my brain trying to figure
>> out how in the world the construction of a form from one model would
>> consult a different model from a different app.
>>
>> Furthermore, this doesn't happen most of the time, it goes away on server
>> restart, and it doesn't happen under DEBUG = True. So I'm wondering if it's
>> an app registry issue, some sort of race condition that gets the registry
>> out of whack. If so, then I might get somewhere by either understanding the
>> app registry better or understanding what DEBUG does.
>>
>> Any thoughts?
>>
> --
> 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/fb61e2e6-001b-407c-b966-a3c1dc203a59%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/CAP5HUWpryMyyy5xji4NtgYUAZg0NYu1mpRt_LAqfdhtCy8xO8w%40mail.gmail.com.


Re: reg: How to call multiple APIView in one single web page as a list of items?

2019-12-05 Thread Integr@te System
Hi Issuer,

U see QuizList bc of Question queryset been get validate_data when
initilize quiz object instance.

Plz refer to docs to customise ur other view.
https://www.django-rest-framework.org/api-guide/serializers/

On Thu, Dec 5, 2019, 02:15 'Amitesh Sahay' via Django users <
django-users@googlegroups.com> wrote:

> Hi,
>
> There is no error. But based on the urls settings I could see the
> "QuizList" output to my web page. Other than that, other serializers are
> not being displayed there. Below is the serializers.py
>
> from rest_framework import serializers
> from .models import Quiz, Question, QuizTakers, Answer, User
> from django.contrib.auth import authenticate, login
>
>
> class userSerializer(serializers.HyperlinkedModelSerializer):
> class Meta:
> model = User
> fields = 'email'
>
>
> class QuizSerializer(serializers.ModelSerializer):
> class Meta:
> model = Quiz()
> fields = ('name', 'questions_count', 'description', 'created', 
> 'roll_out')
>
> def createQuestion(self, validated_data):
> return Question().objects.create_question(**validated_data)
>
>
> class AnswerSerializer(serializers.ModelSerializer):
> class Meta:
> model = Answer()
> fields = ('question', 'text', 'is_correct')
>
>
> class QuestionSerializer(serializers.ModelSerializer):
>
> class Meta:
> model = Question()
> fields = ('quiz', 'label', 'order')
>
>
> class QuizTakerSerializer(serializers.HyperlinkedModelSerializer):
> class Meta:
> model = QuizTakers()
> fields = ('user', 'quiz', 'correct_answers', 'completed', 'timestamp')
>
>
>
> Regards,
> Amitesh
>
>
> On Thursday, 5 December, 2019, 12:19:34 am IST, Integr@te System <
> datacentral...@gmail.com> wrote:
>
>
> Hi Issuer,
> Plz show result with errors.
>
> Tks.
>
> On Thu, Dec 5, 2019, 01:31 'Amitesh Sahay' via Django users <
> django-users@googlegroups.com> wrote:
>
> I am in the process of developing a small project using django rest
> framework, and within that requirement, I need to list every table in one
> single page. Below is the code snippet.
>
> class QuizList(APIView):
> renderer_classes = [TemplateHTMLRenderer]
> template_name = 'adminView.html'
>
> def get(self, request):
> queryset = Quiz.objects.all()
> return Response({'quiz': queryset})
>
> class AnswerList(APIView):
> renderer_classes = [TemplateHTMLRenderer]
> template_name = 'adminView.html'
>
> def get(self, request):
> queryset = Answer.objects.all()
> return Response({'answer': queryset})
>
> class QuestionList(APIView):
> renderer_classes = [TemplateHTMLRenderer]
> template_name = 'adminView.html'
>
> def get(self, request):
> queryset = Question.objects.all()
> return Response({'question': queryset})
>
> In the above snippet, I am able to list the very first class "QuizView" on
> my web page. But other than that, when I am trying to add other APIViews,
> they are simply not happening. Below is the HTML template:
>
> 
> 
> Admin View
> {% for quizez in quiz %}
>
> {{ quizez.name }}
> {% endfor %}
> 
> 
> {% for questions in question %}
> {{ questions.label }}
> {% endfor %}
> 
> {% for answers in answer %}
> {{ answer.text }}
> {% endfor %}
> 
>
> I tried to put all the for loops within a single "ul", but even that
> didn't work. Please help.
>
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/1895937763.9174288.1575484276499%40mail.yahoo.com
> <https://groups.google.com/d/msgid/django-users/1895937763.9174288.1575484276499%40mail.yahoo.com?utm_medium=email_source=footer>
> .
>
> --
> 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/CAP5HUWo1YnZf9Y0cOUYtYc-noQTzVz%3Do90k9Fy37SD%2BPcqQ75Q%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAP5HUWo1YnZf9Y0cOUYtYc-noQTzVz%3Do90k9Fy37SD%2BPcqQ

Re: reg: How to call multiple APIView in one single web page as a list of items?

2019-12-04 Thread Integr@te System
Hi Issuer,
Plz show result with errors.

Tks.

On Thu, Dec 5, 2019, 01:31 'Amitesh Sahay' via Django users <
django-users@googlegroups.com> wrote:

> I am in the process of developing a small project using django rest
> framework, and within that requirement, I need to list every table in one
> single page. Below is the code snippet.
>
> class QuizList(APIView):
> renderer_classes = [TemplateHTMLRenderer]
> template_name = 'adminView.html'
>
> def get(self, request):
> queryset = Quiz.objects.all()
> return Response({'quiz': queryset})
>
> class AnswerList(APIView):
> renderer_classes = [TemplateHTMLRenderer]
> template_name = 'adminView.html'
>
> def get(self, request):
> queryset = Answer.objects.all()
> return Response({'answer': queryset})
>
> class QuestionList(APIView):
> renderer_classes = [TemplateHTMLRenderer]
> template_name = 'adminView.html'
>
> def get(self, request):
> queryset = Question.objects.all()
> return Response({'question': queryset})
>
> In the above snippet, I am able to list the very first class "QuizView" on
> my web page. But other than that, when I am trying to add other APIViews,
> they are simply not happening. Below is the HTML template:
>
> 
> 
> Admin View
> {% for quizez in quiz %}
>
> {{ quizez.name }}
> {% endfor %}
> 
> 
> {% for questions in question %}
> {{ questions.label }}
> {% endfor %}
> 
> {% for answers in answer %}
> {{ answer.text }}
> {% endfor %}
> 
>
> I tried to put all the for loops within a single "ul", but even that
> didn't work. Please help.
>
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/1895937763.9174288.1575484276499%40mail.yahoo.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/CAP5HUWo1YnZf9Y0cOUYtYc-noQTzVz%3Do90k9Fy37SD%2BPcqQ75Q%40mail.gmail.com.


Re: what tool will be using for Continues integration in python projects??

2019-12-04 Thread Integr@te System
Hi,
Pythonist(a) -pybuilder.

On Thu, Dec 5, 2019, 00:52 DANIEL URBANO DE LA RUA 
wrote:

> You can use jenkins with whatever language you use
>
> --
> 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/ac939c48-a145-4d55-9a26-443151275676%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/CAP5HUWqTvHzgjxgqES63OE49yt6_Gwp3ThwYnVJsUT9VGrtSww%40mail.gmail.com.


Re: Exception in thread django-main-thread:

2019-12-04 Thread Integr@te System
Hi Issuer,

plz check existent of userdetailsu module in newapp/form.py and add newapp
before .form in views.py file




On Wed, Dec 4, 2019, 18:27 Michael Mathonsi  wrote:

> Please help with resolving my application, i have setup the environment
> and almost finished my application when the system decided out  of knowhere
> to generate the following errors and im due for presentation by tomorrow.
>
>
>
> Exception in thread django-main-thread:
> Traceback (most recent call last):
>   File "C:\Users\tamik\Anaconda3\lib\threading.py", line 917, in
> _bootstrap_inner
> self.run()
>   File "C:\Users\tamik\Anaconda3\lib\threading.py", line 865, in run
> self._target(*self._args, **self._kwargs)
>   File
> "C:\Users\tamik\Anaconda3\lib\site-packages\django\utils\autoreload.py",
> line 54, in wrapper
> fn(*args, **kwargs)
>   File
> "C:\Users\tamik\Anaconda3\lib\site-packages\django\core\management\commands\runserver.py",
> line 117, in inner_run
> self.check(display_num_errors=True)
>   File
> "C:\Users\tamik\Anaconda3\lib\site-packages\django\core\management\base.py",
> line 390, in check
> include_deployment_checks=include_deployment_checks,
>   File
> "C:\Users\tamik\Anaconda3\lib\site-packages\django\core\management\base.py",
> line 377, in _run_checks
> return checks.run_checks(**kwargs)
>   File
> "C:\Users\tamik\Anaconda3\lib\site-packages\django\core\checks\registry.py",
> line 72, in run_checks
> new_errors = check(app_configs=app_configs)
>   File
> "C:\Users\tamik\Anaconda3\lib\site-packages\django\core\checks\urls.py",
> line 40, in check_url_namespaces_unique
> all_namespaces = _load_all_namespaces(resolver)
>   File
> "C:\Users\tamik\Anaconda3\lib\site-packages\django\core\checks\urls.py",
> line 57, in _load_all_namespaces
> url_patterns = getattr(resolver, 'url_patterns', [])
>   File
> "C:\Users\tamik\Anaconda3\lib\site-packages\django\utils\functional.py",
> line 80, in __get__
> res = instance.__dict__[self.name] = self.func(instance)
>   File
> "C:\Users\tamik\Anaconda3\lib\site-packages\django\urls\resolvers.py", line
> 584, in url_patterns
> patterns = getattr(self.urlconf_module, "urlpatterns",
> self.urlconf_module)
>   File
> "C:\Users\tamik\Anaconda3\lib\site-packages\django\utils\functional.py",
> line 80, in __get__
> res = instance.__dict__[self.name] = self.func(instance)
>   File
> "C:\Users\tamik\Anaconda3\lib\site-packages\django\urls\resolvers.py", line
> 577, in urlconf_module
> return import_module(self.urlconf_name)
>   File "C:\Users\tamik\Anaconda3\lib\importlib\__init__.py", line 127, in
> import_module
> return _bootstrap._gcd_import(name[level:], package, level)
>   File "", line 1006, in _gcd_import
>   File "", line 983, in _find_and_load
>   File "", line 967, in
> _find_and_load_unlocked
>   File "", line 677, in _load_unlocked
>   File "", line 728, in exec_module
>   File "", line 219, in
> _call_with_frames_removed
>   File "C:\Users\tamik\Videos\Mike_Project\Dsc\dsc_project -
> Copy\newproject\newproject\urls.py", line 21, in 
> path('', include('newapp.url')),
>   File "C:\Users\tamik\Anaconda3\lib\site-packages\django\urls\conf.py",
> line 34, in include
> urlconf_module = import_module(urlconf_module)
>   File "C:\Users\tamik\Anaconda3\lib\importlib\__init__.py", line 127, in
> import_module
> return _bootstrap._gcd_import(name[level:], package, level)
>   File "", line 1006, in _gcd_import
>   File "", line 983, in _find_and_load
>   File "", line 967, in
> _find_and_load_unlocked
>   File "", line 677, in _load_unlocked
>   File "", line 728, in exec_module
>   File "", line 219, in
> _call_with_frames_removed
>   File "C:\Users\tamik\Videos\Mike_Project\Dsc\dsc_project -
> Copy\newproject\newapp\url.py", line 2, in 
> from . import views
>   File "C:\Users\tamik\Videos\Mike_Project\Dsc\dsc_project -
> Copy\newproject\newapp\views.py", line 6, in 
> from .form import userdetailsum, userdetailsu, userdetailsup,
> DateForm, formtrend
> ImportError: cannot import name 'userdetailsu' from 'newapp.form'
> (C:\Users\tamik\Videos\Mike_Project\Dsc\dsc_project -
> Copy\newproject\newapp\form.py)
>
>
>
> --
> 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/d84b8a6f-5917-4080-abdd-30f41cd4826d%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 

Re: orm relation

2019-12-03 Thread Integr@te System
Hi issuer,

Plz refer to docs to customize statement base on your use case, my work for
a sample with limited time. Plz try remove space around equal sign.



On Tue, Dec 3, 2019, 19:26 bill dexter <55dexte...@gmail.com> wrote:

> hi friend;
> i tryed your answer, but it says that error in syntax near  __gt  in ""
> extractyear(dat_enc) - extractyear(annee)__gt = 3""; don't work
>
> Le lun. 2 déc. 2019 à 20:31, Integr@te System 
> a écrit :
>
>> Hi friend,
>>
>> All_list = list(users.object.aggregate(age =
>> cast(extractyear(datetime.now()) - extractyear(dat_nais), output_field =
>> IntField())).filter(extractyear(dat_enc) - extractyear(annee)__gt = 3 & 
>> extractyear(datetime.now())
>> - extractyear(dat_nais)__IN=range(54,70) & cod_nad__contain = 
>> 'CN').order_by('num___annee',
>> 'prn'))
>>
>>
>> Plz add more alias field as your sql command according to a sample above.
>>
>> Ps: check your question first(sql), then pass to communities.
>>
>>
>>
>> On Mon, Dec 2, 2019, 21:16 bill dexter <55dexte...@gmail.com> wrote:
>>
>>> thank you, but if you can give me answer to this  exacte probleme, as
>>> mentioned in question
>>>
>>> Le dim. 1 déc. 2019 à 18:55, Integr@te System 
>>> a écrit :
>>>
>>>> Hi,
>>>>
>>>> here u can try for complex queryset
>>>>
>>>>
>>>>
>>>> https://docs.djangoproject.com/en/2.2/topics/db/queries/#complex-lookups-with-q
>>>>
>>>> On Sun, Dec 1, 2019, 21:08 bill dexter <55dexte...@gmail.com> wrote:
>>>>
>>>>> ELECT a.matr
>>>>>   ,[nom]
>>>>>   ,[prn]
>>>>>   ,cast([dat_nais] as date) as dat_nais
>>>>>   , (YEAR(getdate()) - YEAR(dat_nais)) as age
>>>>>   ,cast([dat_deces] as date) as dat_deces
>>>>>   ,cast([dat_imm] as date) as dat_imm
>>>>>   ,cast([dat_aj] as date) as dat_j
>>>>>   ,[cod_position]
>>>>>   ,YEAR(dat_imm) as anne_imm
>>>>>   ,YEAR(dat_encais) as ann_regl
>>>>>   ,[annee]
>>>>>   ,[cod_nat]
>>>>>   ,cast([dat_e
>>>>>
>>>>> Snc] as date) as dat_regl
>>>>>   ,[mt_encais]
>>>>>   FROM users a
>>>>> left join enca e on e.matr = a.matr
>>>>> left join encr c on (c.cod_encais = e.cod_encais)
>>>>>   where (YEAR(c.dat_enc) - c.annee > 3 ) and ((YEAR(getdate()) -
>>>>> YEAR(a.dat_nais)) between 54 and 70) and c.cod_nat = 'CN'
>>>>>   order by a.nom_, a.prn, c.annee asc;
>>>>>
>>>>> hello;
>>>>> my models are users, enca; encr;
>>>>> who can i performe this query using django ORM, note that i'm using
>>>>> MSSQL; thank very much
>>>>>
>>>>> --
>>>>> 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/85f7f91b-0f52-4a96-8700-bee588eb4a3d%40googlegroups.com
>>>>> <https://groups.google.com/d/msgid/django-users/85f7f91b-0f52-4a96-8700-bee588eb4a3d%40googlegroups.com?utm_medium=email_source=footer>
>>>>> .
>>>>>
>>>> --
>>>> 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/CAP5HUWqap3ddCEmW-7yD_uRWhwxDNQdSNZ%2BQPPvHzcAwDf1e5Q%40mail.gmail.com
>>>> <https://groups.google.com/d/msgid/django-users/CAP5HUWqap3ddCEmW-7yD_uRWhwxDNQdSNZ%2BQPPvHzcAwDf1e5Q%40mail.gmail.com?utm_medium=email_source=footer>
>>>> .
>>>>
>>> --
>>> 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...@goog

Re: Link a .css to a Html template

2019-12-02 Thread Integr@te System
Hi Leo,

Plz look at err/change log in developer tools to inspect whats up, after
you adjust files.



On Tue, Dec 3, 2019, 06:20 Gerardo Palazuelos Guerrero <
gerardo.palazue...@gmail.com> wrote:

> Hi,
> You better share your repo, my guess is you are not sharing all details...
>
> On my case I integrated a template with a Django project as a practice (
> my repo: https://github.com/gpalazuelosg/django-adminlte ), the important
> bits:
>
> #1: settings.py has at the end two entries:
> STATIC_URL = '/static/'
> STATICFILES_DIRS = (os.path.join(BASE_DIR,'static'),)
>
> #2: I have an "static" folder at the same level as manage.py, which has
> another folder called "base" inside
>
> #3: inside the /static/base folder, I have the following folders
> containing pertinent files as you might imagine:
> css
> js
> img
> plugins
>
> #4: On my layout.html file, I use the following:
> {% load static %}
> ...
> 
>
>
> This is how it looks:
>
>
>
> I hopes that helps.
>
> --
> Gerardo Palazuelos Guerrero
>
>
>
> On Mon, Dec 2, 2019 at 3:09 PM Leó Horváth 
> wrote:
>
>> hi,
>> I did what Kevin requested, now console says "GET /pages/ HTTP/1.1" 200
>> 536 and the style still doesn't work.
>> Any ideas?
>> Thanks,
>> Leó
>>
>> Kevin Dublin  ezt írta (időpont: 2019. dec. 2., H,
>> 21:41):
>>
>>> Hi Leo,
>>>
>>> Make sure that you point to the exact directory where the CSS file is
>>> located. If it's in static/pages/frame.css, then point to {% static
>>> "pages/frame.css" %}
>>>
>>> Cheers,
>>>
>>> Kevin
>>>
>>> On Mon, Dec 2, 2019, 11:15 AM Leó Horváth 
>>> wrote:
>>>
 hi! i still cant make it work. this is my html snippet and the .css is
 located at static/pages/frame.css.
 when i run the server the browser displays the hard coded html but not
 the style. console says "GET /static/frame.css HTTP/1.1" 404 1651
 

 {% load static %}

 
 
 
 {% block css %}
 
 {% endblock %}

 ‪‫אורי‬‎  ezt írta (időpont: 2019. dec. 2., H, 3:33):‬

> Hi,
>
> Look at these templates for example:
>
> https://github.com/speedy-net/speedy-net/blob/master/speedy/core/templates/base.html#L12-L27
>
>
> https://github.com/speedy-net/speedy-net/blob/master/speedy/match/templates/base_site.html#L7-L13
>
>
> https://github.com/speedy-net/speedy-net/blob/master/speedy/match/templates/accounts/edit_profile/activate.html#L13-L18
>
>
> אורי
> u...@speedy.net
>
>
> On Mon, Dec 2, 2019 at 3:26 AM Leó Horváth 
> wrote:
>
>> Hi guys, I am experiencing an error while trying to Link a .css file
>> to a Html template of one of my Views. What is the correct way to 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/b37e10ec-3b9d-4178-8757-1d0277f6cd15%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/CABD5YeHFgym3pJ4Q5_gE3ATWJiVJ9KDnoBCN8UqM0%2BhWPxXpbg%40mail.gmail.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/CAJBcW0w3qc8OcDgCJAFKrr881%2B2wyAyY3ENH6%3D2bi%2Bn%2BFALBDA%40mail.gmail.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/CANips4LSgRBQ1QAg7gDgq70r--d4zDvQc%3DnfoiwcyomLEJaj%3Dg%40mail.gmail.com
>>> 

Re: orm relation

2019-12-02 Thread Integr@te System
Hi friend,

All_list = list(users.object.aggregate(age =
cast(extractyear(datetime.now()) - extractyear(dat_nais), output_field =
IntField())).filter(extractyear(dat_enc) - extractyear(annee)__gt = 3
& extractyear(datetime.now())
- extractyear(dat_nais)__IN=range(54,70) & cod_nad__contain =
'CN').order_by('num___annee',
'prn'))


Plz add more alias field as your sql command according to a sample above.

Ps: check your question first(sql), then pass to communities.



On Mon, Dec 2, 2019, 21:16 bill dexter <55dexte...@gmail.com> wrote:

> thank you, but if you can give me answer to this  exacte probleme, as
> mentioned in question
>
> Le dim. 1 déc. 2019 à 18:55, Integr@te System 
> a écrit :
>
>> Hi,
>>
>> here u can try for complex queryset
>>
>>
>>
>> https://docs.djangoproject.com/en/2.2/topics/db/queries/#complex-lookups-with-q
>>
>> On Sun, Dec 1, 2019, 21:08 bill dexter <55dexte...@gmail.com> wrote:
>>
>>> ELECT a.matr
>>>   ,[nom]
>>>   ,[prn]
>>>   ,cast([dat_nais] as date) as dat_nais
>>>   , (YEAR(getdate()) - YEAR(dat_nais)) as age
>>>   ,cast([dat_deces] as date) as dat_deces
>>>   ,cast([dat_imm] as date) as dat_imm
>>>   ,cast([dat_aj] as date) as dat_j
>>>   ,[cod_position]
>>>   ,YEAR(dat_imm) as anne_imm
>>>   ,YEAR(dat_encais) as ann_regl
>>>   ,[annee]
>>>   ,[cod_nat]
>>>   ,cast([dat_e
>>>
>>> Snc] as date) as dat_regl
>>>   ,[mt_encais]
>>>   FROM users a
>>> left join enca e on e.matr = a.matr
>>> left join encr c on (c.cod_encais = e.cod_encais)
>>>   where (YEAR(c.dat_enc) - c.annee > 3 ) and ((YEAR(getdate()) -
>>> YEAR(a.dat_nais)) between 54 and 70) and c.cod_nat = 'CN'
>>>   order by a.nom_, a.prn, c.annee asc;
>>>
>>> hello;
>>> my models are users, enca; encr;
>>> who can i performe this query using django ORM, note that i'm using
>>> MSSQL; thank very much
>>>
>>> --
>>> 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/85f7f91b-0f52-4a96-8700-bee588eb4a3d%40googlegroups.com
>>> <https://groups.google.com/d/msgid/django-users/85f7f91b-0f52-4a96-8700-bee588eb4a3d%40googlegroups.com?utm_medium=email_source=footer>
>>> .
>>>
>> --
>> 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/CAP5HUWqap3ddCEmW-7yD_uRWhwxDNQdSNZ%2BQPPvHzcAwDf1e5Q%40mail.gmail.com
>> <https://groups.google.com/d/msgid/django-users/CAP5HUWqap3ddCEmW-7yD_uRWhwxDNQdSNZ%2BQPPvHzcAwDf1e5Q%40mail.gmail.com?utm_medium=email_source=footer>
>> .
>>
> --
> 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/CAA7%3DR20i-DNEFTgdHQ7bjmvzQHrmML3LjzamrSiK07oJgbC_%2Bw%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAA7%3DR20i-DNEFTgdHQ7bjmvzQHrmML3LjzamrSiK07oJgbC_%2Bw%40mail.gmail.com?utm_medium=email_source=footer>
> .
>

-- 
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/CAP5HUWoRjYGOMbQf2Lz9npLi7%2BhsOfDoN-wYLAUAjbr9ites-Q%40mail.gmail.com.


Re: Django security releases issued: 2.2.8 and 2.1.15.

2019-12-02 Thread Integr@te System
Many thanks Django Team and Carlton's informing.


On Mon, Dec 2, 2019, 16:28 אורי  wrote:

> Bugfixes is empty on
> https://docs.djangoproject.com/en/2.2/releases/2.1.15/
> אורי
> u...@speedy.net
>
>
> On Mon, Dec 2, 2019 at 11:12 AM Carlton Gibson 
> wrote:
>
>> Today the Django team issued 2.2.8 and 2.1.15 as part of our security
>> process. These releases address security issues, and we encourage all users
>> to upgrade as soon as possible:
>>
>> https://www.djangoproject.com/weblog/2019/dec/02/security-releases/
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django developers (Contributions to Django itself)" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to django-developers+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-developers/37826578-136E-422F-84F3-9C01C6A4625E%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/CABD5YeFzL_QF6UYy5nG4Jxb0ANJxaFoL%2BQhE-W%3DqvioLWaLSMw%40mail.gmail.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/CAP5HUWrf_MXoWG0mBbVZtJTCaRifMtoNmEezLtQDB%3DAa3zF9wg%40mail.gmail.com.


Re: Groups and summarys in template

2019-12-01 Thread Integr@te System
Hi Man,
Plz try:
desired_value = Account.object.aggregate( subtotal = sum('Value', filter =
Q(Date = date.todat(




On Mon, Dec 2, 2019, 07:14 Elias Coutinho  wrote:

> Well, the result I expect is a list with subtotals similar to the figure
> below:
>
> [image: image.png]
>
> Can you do it without javascript?
>
> Em sáb., 30 de nov. de 2019 às 03:36, Dvenum 
> escreveu:
>
>> Not sure I understand, what you doing, but you may use F() expression to
>> compare fields in the query:
>>
>> https://docs.djangoproject.com/en/2.2/ref/models/expressions/#f-expressions
>>
>> On Sat, Nov 30, 2019 at 2:36 AM Elias Coutinho 
>> wrote:
>>
>>> Good afternoon people!
>>>
>>> I have the following querysets:
>>>
>>>  accounts = Account.objects.filter (person__is_representative =
>>> False) .order_by ('due date')
>>>  groups = Account.objects.values ('due_date'). annotate (total_day =
>>> Sum ('sold_value')). order_by ('due_date')
>>>
>>>
>>> Accounts Returns a List of Information Sorted by Due Date
>>> groups returns another list sorted and grouped by due date
>>>
>>> I would like django to place a total groups in the template below the
>>> line of accounts when it realizes that the next due date is different from
>>> the previous one, ie totaling by date.
>>>
>>> Can someone help me?
>>>
>>> --
>>> 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/8ea05b06-1eb1-4de3-8787-6d80570a6283%40googlegroups.com
>>> 
>>> .
>>>
>>
>>
>> --
>> dvenum
>> dvenum...@gmail.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/fxaeopAyJj8/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/CAHBRYSeBvJr6cDTRtUXEqsJFb03cZw66G2jk1DqY_7P7-jYq1g%40mail.gmail.com
>> 
>> .
>>
>
>
> --
> Elias Coutinho.
> Aprender sobre alguns assuntos é fundamental.
> Aprender sobre Deus é indiscutivelmente o melhor conteúdo.
>
> --
> 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/CALgom8oa_fEfWMiyCdvr0cWGjKzB9Fk8fENkCjnvXOof%3DKMR%2Bg%40mail.gmail.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/CAP5HUWos_QUR1C2ZTHJreRVutVUEEEw_41sx94bPw6O4YUJqRg%40mail.gmail.com.


Re: How can I host my application in web hosting?

2019-12-01 Thread Integr@te System
Hi friend,

In real world matter, it not just technical aspect, also one should
consider business, services, sth else around from now to future.
For publish in production, ask provider's technical that you want first as
essential basic, break down which items, then business and so on.

In technical, please see previous email of one expert on sharing many
details. On deployment as approximate you implement locally and reference
to doc to migrate.

It just simpler with personal work (for yourself) than company's enviroment.




On Mon, Dec 2, 2019, 01:25 Asif Khan  wrote:

> I am using Webfaction and quit happy. it is quit fast and scalable
> platform for Django application.
>
> On Thursday, August 22, 2019 at 4:47:51 PM UTC+5, Wasim Rana wrote:
>>
>> Hello, I am building a web application locally in my computer. It's
>> almost done and I want to host it in Siteground hosting. How can I do that?
>> Please help.
>> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/1398c821-9ecb-4a4a-af78-87950f9f623e%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/CAP5HUWp6HtJn0RgeH3hxP_4JREbicu3SB-Eci6%2B%3DWFKVgDywGQ%40mail.gmail.com.


Re: orm relation

2019-12-01 Thread Integr@te System
Hi,

here u can try for complex queryset


https://docs.djangoproject.com/en/2.2/topics/db/queries/#complex-lookups-with-q

On Sun, Dec 1, 2019, 21:08 bill dexter <55dexte...@gmail.com> wrote:

> ELECT a.matr
>   ,[nom]
>   ,[prn]
>   ,cast([dat_nais] as date) as dat_nais
>   , (YEAR(getdate()) - YEAR(dat_nais)) as age
>   ,cast([dat_deces] as date) as dat_deces
>   ,cast([dat_imm] as date) as dat_imm
>   ,cast([dat_aj] as date) as dat_j
>   ,[cod_position]
>   ,YEAR(dat_imm) as anne_imm
>   ,YEAR(dat_encais) as ann_regl
>   ,[annee]
>   ,[cod_nat]
>   ,cast([dat_e
>
> Snc] as date) as dat_regl
>   ,[mt_encais]
>   FROM users a
> left join enca e on e.matr = a.matr
> left join encr c on (c.cod_encais = e.cod_encais)
>   where (YEAR(c.dat_enc) - c.annee > 3 ) and ((YEAR(getdate()) -
> YEAR(a.dat_nais)) between 54 and 70) and c.cod_nat = 'CN'
>   order by a.nom_, a.prn, c.annee asc;
>
> hello;
> my models are users, enca; encr;
> who can i performe this query using django ORM, note that i'm using MSSQL;
> thank very much
>
> --
> 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/85f7f91b-0f52-4a96-8700-bee588eb4a3d%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/CAP5HUWqap3ddCEmW-7yD_uRWhwxDNQdSNZ%2BQPPvHzcAwDf1e5Q%40mail.gmail.com.


Re: no such table: main.auth_user__old

2019-12-01 Thread Integr@te System
Hi,
plz use python 3.7.

On Sun, Dec 1, 2019, 01:53 Chetan Rokade  wrote:

> Hi Friends
> Getting below error while adding new user  from admin page. I am using
> python 3.8 with django 2.1 version
> Exception Value:
>
> no such table: main.auth_user__old
>
>
>
> --
> 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/9b9e2d7b-89bd-41c5-bd0f-ce8a865570fb%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/CAP5HUWq_FDrUW8aKDKKV03WQNEAOB3U2x9k5-wbF9kKxO32oWg%40mail.gmail.com.


  1   2   >