Re: hosting django app on app engine

2020-04-22 Thread Anirudh choudhary
You can host your website on Google vm  instance , heroku or python
anywhere
For hosting on heroku try :-
https://www.codingforentrepreneurs.com/blog/go-live-with-django-project-and-heroku/

For hosting on pythonanywhere .com
Try any tutorial from.youtube

On Thu, 23 Apr, 2020, 12:18 AM VenkataSivaRamiReddy, <
vennavenkat...@gmail.com> wrote:

> Hi can you share any reference link. I am looking for deploy my djanago
> application but I don't know how to deploy
>
> On Wed, Apr 22, 2020, 18:44 Anirudh choudhary <
> anirudhchoudary...@gmail.com> wrote:
>
>> hi to all! I am hosting my blogging app on google app engine in a
>> standard environment. the website deploys successfully. but when I try to
>> go to any other URL like anirudhmalik.in to anirudhmalik/blog/list/ it
>> shows me 500 server error on the server side I am using PostgreSQL instance
>> and the logs message only show me the error
>> projects/anirudhmalik-274008/logs/appengine.googleapis.com%2Frequest_log"
>>
>>
>> but I couldn't get any hint from this message and none of the post
>> requests is
>> working on the website and everything is working fine in a local server
>> or my local machine
>>
>> you can check the website on anirudhmalik.in
>>
>> and you can also give suggestion is google app engine is good to host
>> your Django project
>> and other cheap college student type hosting service
>> thankyou
>>
>>
>> main.py
>>
>> from annyportfolio.wsgi import application
>>
>> app=application
>>
>> app.yaml file
>>
>> runtime: python37
>>
>> handlers:
>> # This configures Google App Engine to serve the files in the app's static
>> # directory.
>> - url: /static
>> static_dir: static-storage/
>>
>>
>> # This handler routes all requests not caught above to your main app. It
>> is
>> # required when static routes are defined, but can be omitted (along with
>> # the entire handlers section) when there are no static files defined.
>>
>> - url: /.*
>> secure: always
>> redirect_http_response_code: 301
>> script: auto
>>
>>
>>
>> env_variables:
>> DJANGO_SETTINGS_MODULE: annyportfolio.settings
>>
>>
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to django-users+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CAL8_rkG8qwM491qCcX18qgukA_ao4_ZjH8%2B-K01m17vOTcTTNw%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/CAGiJVX3tOsLwGxuvU_TXCPhb0-xZej8xm8SB4KnDdqEZgsZSQQ%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/CAL8_rkGXxgUr_Fjzv5KJAwHq1NPXyMQPRoN-fj9HMPZXn-o7sw%40mail.gmail.com.


Need Help In My Project (URGENT)

2020-04-22 Thread 'raghav' via Django users

My name is Raghav and I am a final year student.
I want a project for my final semester, the subject of which is the *"Courier 
Management System"*, 
I am not able to complete my project on time due to any problem. The 
problem is that I can no longer go to the institution where I was training. 
Due to lockdown.
My computer is too old which is causing the problem.
This community is a family that keeps on helping each other
I hope someone helps me.

Contact - shubhamnagariya1...@gmail.com()
Email me if anyone wants to help me

If anyone has a project that works like a courier management service, 
contact me its urgent.

- 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/da6ec428-ceee-4a12-bd86-3354b63f035b%40googlegroups.com.


what happens to channels consumer instance after disconnect

2020-04-22 Thread BR
What happens to a consumer instance after a websocket client disconnects? 
Is there any specific cleanup of the instance done, or just regular garbage 
collection?

Is it possible to reconnect to a channels consumer instance to recover the 
state of that instance?

-- 
You received this message because you are subscribed 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/1567d416-f2e4-49ee-a4c0-04f71a82cdc1%40googlegroups.com.


Re: Tutorial "Writing your first Django App": NoReverseMatch at /polls/ - down at the end of part 3

2020-04-22 Thread Awa M. Kinason
You are having an error on your template. {%url 'polls:detail' question.id%}
instead of {% url 'polls:detail' question.id %}

Take note of the space after or before the percentage sign. Django
Templating Engine requires you to respect the rules. If you even add double
spaces where you are supposed to have one space, it's a problem.

Hope this helps.

On Wed, Apr 22, 2020 at 6:39 PM sahil khan 
wrote:

> Plz go on my  you tube channel you will get your error regarding sollution
> on my channel
> Link
>
> : https://www.youtube.com/channel/UCxxPBCkto7W8MX6TMctgLqw
>
> On Sun, 19 Apr 2020, 7:49 pm Jorge Gimeno,  wrote:
>
>> If settings.DEBUG == False, then you have to put the allowed addresses
>> in settings.ALLOWED_HOSTS.  If Debug is True, then I'm not sure what's
>> going on.
>>
>> -Jorge
>>
>> On 4/18/20, Markus Grossniklaus  wrote:
>> > Thanks a lot Chucky!
>> > No error message
>> > displays at least one dot! fine
>> >
>> > http://127.0.0.1:8000/admin/
>> > shows ERR_CONNECTION_REFUSED
>> > even with no Proxy active and iptables shows no restrictions e.g.
>> > everything is allowed
>> > How could I debug this?
>> >
>> >
>> > On Wednesday, April 15, 2020 at 12:27:21 AM UTC+2, Markus Grossniklaus
>> > wrote:
>> >>
>> >> a) I worked the whole tutorial down to the bottom of part 3
>> >> b) I connect with the browser to http://127.0.0.1:8000/polls/
>> >> c) the result is: NoReverseMatch at /polls/
>> >> d) all project data are attached to this POST in mysite.zip
>> >> e) I think it cannot be a difficult problem -> does anybody see it?
>> >> Thanx for any help!
>> >>
>> >> [image: NoReverseMatch.PNG]
>> >>
>> >>
>> >
>> > --
>> > You received this message because you are subscribed 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/f3ecb032-80c9-49bf-89da-e1656752fe89%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/CANfN%3DK-9g60pvGj4%2B2Ls8nhstb%3DUWY%3Di-ew7AC7SrARcq-hCuw%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/CAM8veW9vSmzi-Zmv53GXD0t_ddTsTMQz%3DJ0o-hMcohO4OgEQPA%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/CACo9gV6Hu7PMAZRWDBeyfb7J%2BFAbJVWRNOYjtmNE75hBX3tiFQ%40mail.gmail.com.


Re: hosting django app on app engine

2020-04-22 Thread Aldian Fazrihady
Hi Anirudh,

Does this link show you any meaningful error message:
https://console.cloud.google.com/errors?time=PT1H&order=COUNT_DESC&resolution=OPEN&resolution=ACKNOWLEDGED&project=anirudhmalik-274008&authuser=1&folder=true&organizationId=true

 ?

On Wed, Apr 22, 2020 at 8:16 PM Anirudh choudhary <
anirudhchoudary...@gmail.com> wrote:

> hi to all! I am hosting my blogging app on google app engine in a standard
> environment. the website deploys successfully. but when I try to go to any
> other URL like anirudhmalik.in to anirudhmalik/blog/list/ it shows me 500
> server error on the server side I am using PostgreSQL instance and the logs
> message only show me the error
> projects/anirudhmalik-274008/logs/appengine.googleapis.com%2Frequest_log"
>
> but I couldn't get any hint from this message and none of the post
> requests is
> working on the website and everything is working fine in a local server or
> my local machine
>
> you can check the website on anirudhmalik.in
>
> and you can also give suggestion is google app engine is good to host your
> Django project
> and other cheap college student type hosting service
> thankyou
>
>
> main.py
>
> from annyportfolio.wsgi import application
>
> app=application
>
> app.yaml file
>
> runtime: python37
>
> handlers:
> # This configures Google App Engine to serve the files in the app's static
> # directory.
> - url: /static
> static_dir: static-storage/
>
>
> # This handler routes all requests not caught above to your main app. It is
> # required when static routes are defined, but can be omitted (along with
> # the entire handlers section) when there are no static files defined.
>
> - url: /.*
> secure: always
> redirect_http_response_code: 301
> script: auto
>
>
>
> env_variables:
> DJANGO_SETTINGS_MODULE: annyportfolio.settings
>
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAL8_rkG8qwM491qCcX18qgukA_ao4_ZjH8%2B-K01m17vOTcTTNw%40mail.gmail.com
> 
> .
>


-- 
Regards,

Aldian Fazrihady
http://aldianfazrihady.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/CAN7EoAZdNYOYF2n98STXedOraydhg_u31sf0mrEhhaN00GDLVA%40mail.gmail.com.


Re: hosting django app on app engine

2020-04-22 Thread VenkataSivaRamiReddy
Hi can you share any reference link. I am looking for deploy my djanago
application but I don't know how to deploy

On Wed, Apr 22, 2020, 18:44 Anirudh choudhary 
wrote:

> hi to all! I am hosting my blogging app on google app engine in a standard
> environment. the website deploys successfully. but when I try to go to any
> other URL like anirudhmalik.in to anirudhmalik/blog/list/ it shows me 500
> server error on the server side I am using PostgreSQL instance and the logs
> message only show me the error
> projects/anirudhmalik-274008/logs/appengine.googleapis.com%2Frequest_log"
>
> but I couldn't get any hint from this message and none of the post
> requests is
> working on the website and everything is working fine in a local server or
> my local machine
>
> you can check the website on anirudhmalik.in
>
> and you can also give suggestion is google app engine is good to host your
> Django project
> and other cheap college student type hosting service
> thankyou
>
>
> main.py
>
> from annyportfolio.wsgi import application
>
> app=application
>
> app.yaml file
>
> runtime: python37
>
> handlers:
> # This configures Google App Engine to serve the files in the app's static
> # directory.
> - url: /static
> static_dir: static-storage/
>
>
> # This handler routes all requests not caught above to your main app. It is
> # required when static routes are defined, but can be omitted (along with
> # the entire handlers section) when there are no static files defined.
>
> - url: /.*
> secure: always
> redirect_http_response_code: 301
> script: auto
>
>
>
> env_variables:
> DJANGO_SETTINGS_MODULE: annyportfolio.settings
>
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAL8_rkG8qwM491qCcX18qgukA_ao4_ZjH8%2B-K01m17vOTcTTNw%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/CAGiJVX3tOsLwGxuvU_TXCPhb0-xZej8xm8SB4KnDdqEZgsZSQQ%40mail.gmail.com.


Re: Tutorial "Writing your first Django App": NoReverseMatch at /polls/ - down at the end of part 3

2020-04-22 Thread sahil khan
Plz go on my  you tube channel you will get your error regarding sollution
on my channel
Link

: https://www.youtube.com/channel/UCxxPBCkto7W8MX6TMctgLqw

On Sun, 19 Apr 2020, 7:49 pm Jorge Gimeno,  wrote:

> If settings.DEBUG == False, then you have to put the allowed addresses
> in settings.ALLOWED_HOSTS.  If Debug is True, then I'm not sure what's
> going on.
>
> -Jorge
>
> On 4/18/20, Markus Grossniklaus  wrote:
> > Thanks a lot Chucky!
> > No error message
> > displays at least one dot! fine
> >
> > http://127.0.0.1:8000/admin/
> > shows ERR_CONNECTION_REFUSED
> > even with no Proxy active and iptables shows no restrictions e.g.
> > everything is allowed
> > How could I debug this?
> >
> >
> > On Wednesday, April 15, 2020 at 12:27:21 AM UTC+2, Markus Grossniklaus
> > wrote:
> >>
> >> a) I worked the whole tutorial down to the bottom of part 3
> >> b) I connect with the browser to http://127.0.0.1:8000/polls/
> >> c) the result is: NoReverseMatch at /polls/
> >> d) all project data are attached to this POST in mysite.zip
> >> e) I think it cannot be a difficult problem -> does anybody see it?
> >> Thanx for any help!
> >>
> >> [image: NoReverseMatch.PNG]
> >>
> >>
> >
> > --
> > You received this message because you are subscribed 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/f3ecb032-80c9-49bf-89da-e1656752fe89%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/CANfN%3DK-9g60pvGj4%2B2Ls8nhstb%3DUWY%3Di-ew7AC7SrARcq-hCuw%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/CAM8veW9vSmzi-Zmv53GXD0t_ddTsTMQz%3DJ0o-hMcohO4OgEQPA%40mail.gmail.com.


Re: Django Error - 'staticfiles' is not a registered tag library. Must be one of: admin_list admin_modify admin_urls

2020-04-22 Thread sahil khan
If you have this type of problem plz connect or join our you tube channel
'errormania' and comment whatever your errors problem i will make a video
on particular error

Link: https://www.youtube.com/channel/UCxxPBCkto7W8MX6TMctgLqw

On Sun, 19 Apr 2020, 7:09 am rama prakash y,  wrote:

> THANK YOU BROOO
>
>
> On Tuesday, December 17, 2019 at 4:38:39 AM UTC+5:30, Bilim Tr wrote:
>>
>>
>>
>> 10 Aralık 2019 Salı 19:00:32 UTC+3 tarihinde Balaji yazdı:
>>>
>>> Hi
>>>
>>> I am getting error for every Project.
>>>
>>> I  created new environment and reinstalled python and Django.
>>>
>>> emplateSyntaxError at /
>>>
>>> 'staticfiles' is not a registered tag library. Must be one of:
>>> admin_list
>>> admin_modify
>>> admin_urls
>>> cache
>>> i18n
>>> l10n
>>> log
>>> propeller
>>> static
>>> tz
>>>
>>>
>>>
>>>
>>> --
>>>
>>>
>>> *Mr. Shetty Balaji S.Asst. ProfessorDepartment of Information
>>> Technology,*
>>> *SGGS Institute of Engineering & Technology, Vishnupuri, Nanded.MH.India*
>>> *Official: bssh...@sggs.ac.in *
>>> *  Mobile: +91-9270696267*
>>>
>>> --
> You received this message because you are subscribed 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/8f3af48b-9e69-4a60-a83a-16c4703cab21%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/CAM8veW9%2BaC2R%3DQT%2B0LbMPKfxgT0xhPv7X2H6yqyaL6Z2jBtLhA%40mail.gmail.com.


ORM

2020-04-22 Thread Jayesh Prajapati
Hello World,


I have doubt for that's why I come here.

If one can clear my doubt it would be so helpful.

Suppose, I have a table 3 table with foreign key of in each table.

Table 1
 FK of table 2

Table 2
 FK of table 3

Table 3
 FK of another table


Now, what I am doing is

t1 = Table1.objects.get().first()
t1.table_2.table_3.anyrow = "new value"
t1.save()

Then,

passing the t1 object to another function and printing the value of anyrow 
of table_3.

What it will print?
Is it right? or Wrong?

-- 
You received this message because you are subscribed 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/af9bbdac-50e5-4da9-bfce-c8135fb40213%40googlegroups.com.


Re: Django pdfs

2020-04-22 Thread Lunga Baliwe
Maybe you can check Django FileField
  for
upload and check what it looks like on the admin side.


On Wed, Apr 22, 2020 at 6:09 PM Hella Nick  wrote:

> me to。do you help me?
>
> Perceval Maturure 于2020年4月22日 周三07:31写道:
>
>> Hi Django Users
>>
>> I am developing a Django document management system which will cater for
>> pdf file uploads. What is the best resource to use (tutorial) as I want to
>> have the pdfs accessible from admin. Can I do this with Django filer
>>
>> Regards
>>
>> Perceval
>>
>> --
>> You received this message because you are subscribed 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/B912F6EC-E628-49E8-91AB-8442B25A7E34%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/CAHfGPEfRLO_VqswP9sHG%2BOM_HOob%2BQw2ztgvZx3TbMd5%3Dtk50w%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/CANDnEWdBhLMgNud%2B6CZguak0%3DSEivu2VHOGEOY1RV2kVjS7oFw%40mail.gmail.com.


Re: Django pdfs

2020-04-22 Thread Hella Nick
me to。do you help me?

Perceval Maturure 于2020年4月22日 周三07:31写道:

> Hi Django Users
>
> I am developing a Django document management system which will cater for
> pdf file uploads. What is the best resource to use (tutorial) as I want to
> have the pdfs accessible from admin. Can I do this with Django filer
>
> Regards
>
> Perceval
>
> --
> You received this message because you are subscribed 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/B912F6EC-E628-49E8-91AB-8442B25A7E34%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/CAHfGPEfRLO_VqswP9sHG%2BOM_HOob%2BQw2ztgvZx3TbMd5%3Dtk50w%40mail.gmail.com.


Re: How can I use Django

2020-04-22 Thread Anonymous Patel
https://www.youtube.com/channel/UCxxPBCkto7W8MX6TMctgLqw

Here is Developers community where you can ask for videos of your errors or
how to start with django they provide videos in a day or two so try
commenting your problem there or join there telegram channel with same name
errormania.
They are new but helps

Raj Patel

On Wed, 22 Apr, 2020, 7:55 pm Motaz Hejaze,  wrote:

> Please checkout the official documentation
>
> On Wed, 22 Apr 2020, 3:21 pm saifadnan abdallah, <
> saifadnanabdal...@gmail.com> wrote:
>
>> In which Computer app can I use 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/391a8324-219e-4c97-9cbc-be406fc49f7a%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/CAHV4E-dn0mb8C9aKmZtWLrn1yQnfWCpHcHOFm7zj%2BNtVghqOkQ%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/CAF_9CispEHNdAjHeMeUk%2BT24wSCJeFyF%3D-ebFLe_uku_Tmy5Ow%40mail.gmail.com.


Re: Reg: Django signal not working

2020-04-22 Thread Jorge Gimeno
On Wed, Apr 22, 2020 at 4:55 AM 'Amitesh Sahay' via Django users <
django-users@googlegroups.com> wrote:

> Hello Sahil,
>
> Thank you for the youtube link. The video has done the exactly same thing
> that I am doing. However, I understand that the user registration is
> created through default "User" model, and UserCreationForm. However, I am
> adding a custom field "*city*", and its not working for me.
>
> Except the *city*, all other default is saved into the
> database.(Username, first_name, last_name, email, password)
>
> I have already shared the code snippet here in my previous emails. If
> possible go through it and let me know .
>
> Regards,
> Amitesh
>
>
> On Tuesday, 21 April, 2020, 06:33:42 pm IST, sahil khan <
> parmarsahilkha...@gmail.com> wrote:
>
>
> Hello i am from google group plz see this video chennel and solve
> your problem
> https://youtu.be/QDk3rI_H3ks like comment and subscribe and share so that
> another people get help this channel
>
> On Mon, 20 Apr 2020, 4:28 pm Aditya Singh, 
> wrote:
>
> What's the original issue please, seems like you picked things up with
> someone till this email.
> Regards,
> Aditya
>
> On Mon, Apr 20, 2020, 3:11 PM 'Amitesh Sahay' via Django users <
> django-users@googlegroups.com> wrote:
>
> -+c Hello Jorge,
>
> After doing some research, I realized that the signal which is saving the
> user profile should have
>
> "instance.signup.save()" , as the name of the custom model is signup. This
> time I still got the error .However,  I could create the new user and login
> to the website. However, when I look into the admin panel, I still could't
> see the "contact" field getting saved after the user is registered
> successfully.
>
> Therefore the main purpose of creating the custom User model still
> failing.
>
> Below are the code snippet, and screenshot from my admin panel.
>
> Models.py
> -
>
> from django.db import models
> from django.contrib.auth.models import User
> from django.db.models.signals import post_save
> from django.dispatch import receiver
>
>
> class SignUp(models.Model):
> user = models.OneToOneField(User, on_delete=models.CASCADE)
> Contact = models.CharField(max_length=500, blank=True)
>
> @receiver(post_save, sender=User)
> def create_user_profile(sender, instance, created, **kwargs):
> if created:
> SignUp.objects.create(user=instance)
>
> @receiver(post_save, sender=User)
> def save_user_profile(sender, instance, **kwargs):
> save2 = instance.signup.save()
> print(save2)
>
>
> To debug the issue, I used the print statement to see the output of
> "instance.signup.save()". So, after submitting the form, I checked the
> "runserver" console. The output was "None". So, something doesn't seems to
> be right.
>
> forms.py
> --
>
> from django.contrib.auth.forms import UserCreationForm
> from django.contrib.auth.models import User
> from django import forms
> from .models import SignUp
>
>
> class SignUpForm(UserCreationForm):
> email = forms.EmailField()
> first_name = forms.CharField(max_length=100)
> last_name = forms.CharField(max_length=100)
>
> class Meta:
> model = User
> fields = ('username', 'first_name', 'last_name', 'email', 
> 'password1', 'password2')
>
>
> class CustomSignUpPage(forms.ModelForm):
> Contact = forms.CharField(max_length=10)
>
> class Meta:
> model = SignUp
> fields = ('Contact', )
>
>
> views.py
> -
>
> def register_user(request):
> if request.method == "POST":
> form = SignUpForm(request.POST)
> cus_form = CustomSignUpPage(request.POST)
> if form.is_valid() and cus_form.is_valid():
> save1 = form.save()
> save1.refresh_from_db()
> cus_form = CustomSignUpPage(request.POST, 
> instance=request.save1.signup.contact)
> cus_form.full_clean()
> cus_form.save()
> username = form.cleaned_data['username']
> password = form.cleaned_data['password1']
> user = authenticate(request, username=username, password=password)
> login(request, user)
> messages.success(request, f'Registration successful')
> return redirect('home')
> else:
> messages.error(request, f'Please correct the error below.')
> else:
> form = SignUpForm()
> cus_form = CustomSignUpPage()
>
> return render(request, 'authenticate\\register.html', context={'form': 
> form, 'cus_form': cus_form})
>
> Screenshot from the admin panel:
>
> [image: Inline image]
> Please suggest. If you are comfortable we can go on a web meeting where I
> can share my screen and we can work on it.
>
> Regards,
> Amitesh
>
> Sent from Yahoo Mail on Android
> 
>
> On Su

Re: How can I use Django

2020-04-22 Thread Motaz Hejaze
Please checkout the official documentation

On Wed, 22 Apr 2020, 3:21 pm saifadnan abdallah, <
saifadnanabdal...@gmail.com> wrote:

> In which Computer app can I use 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/391a8324-219e-4c97-9cbc-be406fc49f7a%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/CAHV4E-dn0mb8C9aKmZtWLrn1yQnfWCpHcHOFm7zj%2BNtVghqOkQ%40mail.gmail.com.


How can I use Django

2020-04-22 Thread saifadnan abdallah
In which Computer app can I use 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/391a8324-219e-4c97-9cbc-be406fc49f7a%40googlegroups.com.


Can I use Django for client-server communication ?

2020-04-22 Thread Sharanagouda Biradar
HI,

I have developed a python application(GUI using Tkinter)  which triggers 
python test scripts automatically and gives the result But now I want to 
launch this GUI App on multiple  machines using a single machine(something 
like server-client model), also I want to set required config parameters in 
client machine using server itself. Can I achieve all this using Django? I 
am very much new to Django and need to know if I can achieve this using 
Django. if not kindly let me know what tool I can use to achieve 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/7c261ec0-c114-477e-b646-7d7ffee9dad3%40googlegroups.com.


hosting django app on app engine

2020-04-22 Thread Anirudh choudhary
hi to all! I am hosting my blogging app on google app engine in a standard
environment. the website deploys successfully. but when I try to go to any
other URL like anirudhmalik.in to anirudhmalik/blog/list/ it shows me 500
server error on the server side I am using PostgreSQL instance and the logs
message only show me the error
projects/anirudhmalik-274008/logs/appengine.googleapis.com%2Frequest_log"

but I couldn't get any hint from this message and none of the post requests
is
working on the website and everything is working fine in a local server or
my local machine

you can check the website on anirudhmalik.in

and you can also give suggestion is google app engine is good to host your
Django project
and other cheap college student type hosting service
thankyou


main.py

from annyportfolio.wsgi import application

app=application

app.yaml file

runtime: python37

handlers:
# This configures Google App Engine to serve the files in the app's static
# directory.
- url: /static
static_dir: static-storage/


# This handler routes all requests not caught above to your main app. It is
# required when static routes are defined, but can be omitted (along with
# the entire handlers section) when there are no static files defined.

- url: /.*
secure: always
redirect_http_response_code: 301
script: auto



env_variables:
DJANGO_SETTINGS_MODULE: annyportfolio.settings

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


Setting up Stripe Intentions

2020-04-22 Thread John McClain
Hello all,

I have an active stripe account configured and running live in my app.

I am wanting to change the default currency and was wondering if anyone
could help with setting up the intention to accomplish this. I have tried a
few times and am unable to get past the errors. I have reverted back to my
starting point and am now looking for advice on how to integrate the
solution.

cheers

-- 
John McClain

Cell: 085-1977-823
Skype: jmcclain0129
Email: jmcclain0...@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/CAN-hv_rxC2h63_03viTiNTGsJwa8HRZ%3Dtmo7Fi3RUcJF6%2Ba5Fg%40mail.gmail.com.


Re: Reg: Django signal not working

2020-04-22 Thread 'Amitesh Sahay' via Django users
Hello Sahil,
Thank you for the youtube link. The video has done the exactly same thing that 
I am doing. However, I understand that the user registration is created through 
default "User" model, and UserCreationForm. However, I am adding a custom field 
"city", and its not working for me. 
Except the city, all other default is saved into the database.(Username, 
first_name, last_name, email, password)
I have already shared the code snippet here in my previous emails. If possible 
go through it and let me know .


Regards,
Amitesh 

On Tuesday, 21 April, 2020, 06:33:42 pm IST, sahil khan 
 wrote:  
 
 Hello i am from google group plz see this video chennel and solve your 
problemhttps://youtu.be/QDk3rI_H3ks like comment and subscribe and share so 
that another people get help this channel 

On Mon, 20 Apr 2020, 4:28 pm Aditya Singh,  wrote:

What's the original issue please, seems like you picked things up with someone 
till this email.Regards,Aditya
On Mon, Apr 20, 2020, 3:11 PM 'Amitesh Sahay' via Django users 
 wrote:

-+c Hello Jorge, 
After doing some research, I realized that the signal which is saving the user 
profile should have 
"instance.signup.save()" , as the name of the custom model is signup. This time 
I still got the error .However,  I could create the new user and login to the 
website. However, when I look into the admin panel, I still could't see the 
"contact" field getting saved after the user is registered successfully. 
Therefore the main purpose of creating the custom User model still failing. 
Below are the code snippet, and screenshot from my admin panel.
Models.py-from django.db import models
from django.contrib.auth.models import User
from django.db.models.signals import post_save
from django.dispatch import receiver


class SignUp(models.Model):
user = models.OneToOneField(User, on_delete=models.CASCADE)
Contact = models.CharField(max_length=500, blank=True)

@receiver(post_save, sender=User)
def create_user_profile(sender, instance, created, **kwargs):
if created:
SignUp.objects.create(user=instance)

@receiver(post_save, sender=User)
def save_user_profile(sender, instance, **kwargs):
save2 = instance.signup.save()
print(save2)
To debug the issue, I used the print statement to see the output of 
"instance.signup.save()". So, after submitting the form, I checked the 
"runserver" console. The output was "None". So, something doesn't seems to be 
right.
forms.py--from django.contrib.auth.forms import UserCreationForm
from django.contrib.auth.models import User
from django import forms
from .models import SignUp


class SignUpForm(UserCreationForm):
email = forms.EmailField()
first_name = forms.CharField(max_length=100)
last_name = forms.CharField(max_length=100)

class Meta:
model = User
fields = ('username', 'first_name', 'last_name', 'email', 'password1', 
'password2')


class CustomSignUpPage(forms.ModelForm):
Contact = forms.CharField(max_length=10)

class Meta:
model = SignUp
fields = ('Contact', )
views.py-def register_user(request):
if request.method == "POST":
form = SignUpForm(request.POST)
cus_form = CustomSignUpPage(request.POST)
if form.is_valid() and cus_form.is_valid():
save1 = form.save()
save1.refresh_from_db()
cus_form = CustomSignUpPage(request.POST, 
instance=request.save1.signup.contact)
cus_form.full_clean()
cus_form.save()
username = form.cleaned_data['username']
password = form.cleaned_data['password1']
user = authenticate(request, username=username, password=password)
login(request, user)
messages.success(request, f'Registration successful')
return redirect('home')
else:
messages.error(request, f'Please correct the error below.')
else:
form = SignUpForm()
cus_form = CustomSignUpPage()

return render(request, 'authenticate\\register.html', context={'form': 
form, 'cus_form': cus_form})Screenshot from the admin panel:
Please suggest. If you are comfortable we can go on a web meeting where I can 
share my screen and we can work on it.
Regards,Amitesh

Sent from Yahoo Mail on Android 
 
  On Sun, 19 Apr 2020 at 19:42, Jorge Gimeno wrote:   
Amitesh,

Where is User.profile defined?

-Jorge

On 4/18/20, Saurabh Ranjan Singh  wrote:
> I am having the same issue. Please fix it.
>
> On Friday, 17 April 2020 22:47:40 UTC+5:30, Amitesh Sahay wrote:
>>
>> Hi,
>>
>> I am creating a Django signup form through "User" model and
>> "UserCreationForm" and customized the User model to accommodate single
>> user
>> defined field "contact".
>>
>> However, the signal that I have written seems not to be working.
>> Whenever, I am filling the form, I am getting below error:
>>
>> AttributeError at /auth/register/
>> 'User' object

Re: Whats the best package for Django-admin styling

2020-04-22 Thread Andréas Kühne
Hi,

I think grappelli does a great job regarding styling the admin pages - I
use it all the time. It is also (currently) actively developed. However
there are other solutions:
https://djangopackages.org/grids/g/admin-interface/

The main thing I would look for is to make sure that the package I choose
it actively being developed.

Regards,

Andréas


Den ons 22 apr. 2020 kl 04:19 skrev suman patel :

> Hi,
>We are having Django admin used extensively in our project. Any
> suggestions for adding more style and features to it. I searched Django-
> grappelli.
> Anyone using it. Any feedback and basic features you have used so far.
>
> Thx
> patel
>
> --
> You received this message because you are subscribed 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/CAPjHK8CPNVYPuHE3L71A01tEDS7dG-1jmCUwe4AwC%3DsqoxRP_g%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/CAK4qSCfXRzW0%2BP-4qhAwketm8JbZO6iteXmepppuavsOftQHwA%40mail.gmail.com.


Re: Expecting JSON object instead of JSON Array

2020-04-22 Thread Andréas Kühne
You are doing a get to the default route for the viewset I am guessing?
That would return a list - because you are getting ALL records and not one
specific record.

If you added more records to the database you will also see more in the
list.

See here for more information:
https://www.django-rest-framework.org/api-guide/viewsets/

Regards,

Andréas


Den tis 21 apr. 2020 kl 15:03 skrev Salah Abdul Gafoor <
salahgaf...@gmail.com>:

> In my django application with database engine djongo, I'm trying to return
> a JSON response by retrieving from my database. But, I'm receiving JSON
> array instead of JSON object. Currently, there is only one record in my
> database. Please see the code below.
>
> model.py
>
> class bloodDonors(models.Model):
> location=models.CharField(max_length=20)
> name=models.CharField(max_length=20)
> phone=models.IntegerField()
> address=models.TextField()
> bloodGroup=models.CharField(max_length=5)
> type=models.CharField(max_length=20)
> def __str__(self):
> return self.name
>
>
> views.py
>
> class bloodDonersView(viewsets.ModelViewSet):
> queryset = bloodDonors.objects.all()
> serializer_class = bloodDonorsSerializer
>
>
> JSON Reponse:
>
> [
> {
> "id": 3,
> "location": "Delhi",
> "name": "Tony",
> "phone": 888,
> "address": "South street",
> "bloodGroup": "B+",
> "type": "blood-donation"
> }
> ]
>
> But, actually I needed the response as given below:
>
> {
> "id": 3,
> "location": "Delhi",
> "name": "Tony",
> "phone": 888,
> "address": "South street",
> "bloodGroup": "B+",
> "type": "blood-donation"
> }
>
> --
> You received this message because you are subscribed 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/5656271c-fe21-4933-ad3f-9dc7505a56c1%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/CAK4qSCcSfsas24nuQHNyq6PixPin0Mzbc0WWfJ9KC9g85ma5JA%40mail.gmail.com.