Re: Must be my and and can't be my code -- tracing back a URL pattern type mismatch

2019-04-03 Thread Josh Marshall
OK, I've gotten time to touch the code again, applied your suggestion, but 
there is no apparent change in behavior.  For the sake of argument, I'm 
including the stack trace again.  I'm not sure where my good debugging 
entry point is here.

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


stack trace
Description: Binary data


Re: Hosting recommendations please

2019-04-03 Thread Mike Dewhirst

On 3/04/2019 8:27 pm, Saurabh Jaiswal wrote:

Hey Mike,
Launch a digital ocean droplet with plesk 17.08 with decent specs and 
you can run all your three websites with ease on it on a single droplet.

You would have to setup apache mod_wsgi on it and you will be good to go.
If you need help do let me know.
I have been running my django projects without any hiccups.


Saurab

I use plesk in another area and can't complain. It is a good suggestion 
but I'm looking for minimal change other than the essential infrastructure.


Thanks for the offer of help. I'll keep this email in case I try that as 
well


Cheers

Mike



On Wed, Apr 3, 2019 at 12:02 PM Mike Dewhirst > wrote:


Thank you everyone for your recommendations. I have decided to see
what
DigitalOcean feels like.

Cheers

Mike

On 2/04/2019 6:08 pm, Mike Dewhirst wrote:
> I have to move three Django websites away from my current VM
service
> provider by the end of April because he is going out of the VM
business.
>
> One is a plain Mezzanine CMS on one VM running Nginx/Gunicorn
and the
> other two are on the second VM running Apache and mod_wsgi.
>
> I'm most familiar with Ubuntu 16.04 and hope to go to 18.04.
>
> I think the RAM requirements are around 4GB for the Apache sites
and
> half that for Nginx. Haven't done any profiling.
>
> I'm in Australia. I'm after stability and reliability and if I'm
> lucky, scalability.
>
> If you have any negative comments about providers please send them
> off-list.
>
> Many thanks
>
> 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 post to this group, send email to django-users@googlegroups.com
.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit

https://groups.google.com/d/msgid/django-users/d9f02ffd-7c55-3ce4-f5a6-40f499aaa52f%40dewhirst.com.au.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google 
Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send 
an email to django-users+unsubscr...@googlegroups.com 
.
To post to this group, send email to django-users@googlegroups.com 
.

Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAOsmX49ecqimKO2RnBYQUinp5Km8GpX0-QVu_OcTAj6K%3Dzfcdw%40mail.gmail.com 
.

For more options, visit https://groups.google.com/d/optout.


--
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/f863b852-063f-16b9-aad3-e3a49e4f6102%40dewhirst.com.au.
For more options, visit https://groups.google.com/d/optout.


Re: Using forms to handle request.GET data?

2019-04-03 Thread Allen Stewart


On Tuesday, April 2, 2019 at 2:12:50 PM UTC-7, Carsten Fuchs wrote:
>
> Dear Django group, 
>
> I would like to show users a form that they can use to customize the view, 
> for example a ChoiceField from which the year of the report can be chosen. 
> It seems straightforward to use a forms.Form to handle the request.GET 
> data: 
>
>
> from django import forms 
>
> class JahrAuswahl(forms.Form): 
> year = forms.ChoiceField(required=False, choices=[(j, j) for j in 
> range(2018, 2021)]) 
>
> def clean_year(self): 
> y = self.cleaned_data['year'] 
> if not y: 
> # Set a "default" value here. 
> y = 2019 
> print('Year:', y) 
> return y 
>
>
> However, the problem is with default values. Please consider this: 
>
>
> >>> year_form = JahrAuswahl({'year': 2018})   # Provide explicit data. 
> >>> print(year_form) 
> Year: 2018 # from JahrAuswahl.clean_year() 
> Year: id="id_year"> 
>   2018# Just as expected! 
>   2019 
>   2020 
>  
>
>
> >>> year_form = JahrAuswahl({})# Data is empty now, need default 
> values! 
> >>> print(year_form) 
> Year: 2019 # JahrAuswahl.clean_year() provides a default 
> value. 
> Year: id="id_year"> 
>   2018 
>   2019   # BUT it doesn't make it back into 
> year_form.data ! 
>   2020 
>  
>
>
> Well, the problem is that with {} (that is, request.GET == {}), we get 
> default values in year_form.cleaned_data, but we cannot use year_form in 
> the template context to render the form fields. 
> Some work-around might be to use the year_form.cleaned_data to initialize 
> a new JahrAuswahl instance: 
>
>
> >>> year_form = JahrAuswahl(year_form.cleaned_data)   # HACK!? 
> >>> print(year_form) 
> Year: 2019 
> Year: id="id_year"> 
>   2018 
>   2019# ok! 
>   2020 
>  
>
>
> But this feels like a hack and really not like the proper way to do this. 
> How can I solve this problem in an elegant Django manner? 
>
> Best regards, 
> Carsten 
>
>
>

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


Re: Using forms to handle request.GET data?

2019-04-03 Thread Mohammad Etemaddar
Set default value:
year = forms.ChoiceField(required=False, choices=[(j, j) for j in range(2018, 
2021)], default=2019)
You do not need clean_year any more I think.

On Wednesday, April 3, 2019 at 1:42:50 AM UTC+4:30, Carsten Fuchs wrote:
> Dear Django group,
> 
> I would like to show users a form that they can use to customize the view, 
> for example a ChoiceField from which the year of the report can be chosen. It 
> seems straightforward to use a forms.Form to handle the request.GET data:
> 
> 
> from django import forms
> 
> class JahrAuswahl(forms.Form):
> year = forms.ChoiceField(required=False, choices=[(j, j) for j in 
> range(2018, 2021)])
> 
> def clean_year(self):
> y = self.cleaned_data['year']
> if not y:
> # Set a "default" value here.
> y = 2019
> print('Year:', y)
> return y
> 
> 
> However, the problem is with default values. Please consider this:
> 
> 
> >>> year_form = JahrAuswahl({'year': 2018})   # Provide explicit data.
> >>> print(year_form)
> Year: 2018 # from JahrAuswahl.clean_year()
> Year: id="id_year">
>   2018# Just as expected!
>   2019
>   2020
> 
> 
> 
> >>> year_form = JahrAuswahl({})# Data is empty now, need default values!
> >>> print(year_form)
> Year: 2019 # JahrAuswahl.clean_year() provides a default value.
> Year: id="id_year">
>   2018
>   2019   # BUT it doesn't make it back into 
> year_form.data !
>   2020
> 
> 
> 
> Well, the problem is that with {} (that is, request.GET == {}), we get 
> default values in year_form.cleaned_data, but we cannot use year_form in the 
> template context to render the form fields.
> Some work-around might be to use the year_form.cleaned_data to initialize a 
> new JahrAuswahl instance:
> 
> 
> >>> year_form = JahrAuswahl(year_form.cleaned_data)   # HACK!?
> >>> print(year_form)
> Year: 2019
> Year: id="id_year">
>   2018
>   2019# ok!
>   2020
> 
> 
> 
> But this feels like a hack and really not like the proper way to do this.
> How can I solve this problem in an elegant Django manner?
> 
> Best regards,
> Carsten

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


RE: Login by phone number best practice

2019-04-03 Thread Mohammad Etemaddar
Thank you. But django-phone-login seems a bit complex. It uses rest framework. 
I don't know why.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/1b5e02f9-4b1a-499c-a566-9a682a1ca1e6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


I need help on adding a search button to an input field

2019-04-03 Thread Mohammad Etemaddar
You can use FieldWithButtons in form helper's layout:
https://django-crispy-forms.readthedocs.io/en/d-0/layouts.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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/59a2b90b-d146-4cf5-8047-40ed533586e6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: I need help on adding a search button to an input field

2019-04-03 Thread Anirudh Jain
You can include the following code in the end

ButtonHolder(
Submit('submit', 'Update', css_class='btn btn-theme small')
)

Take care of proper indentation.

On Wed, 3 Apr 2019, 23:48 Nanjuki Saidat,  wrote:

> Hi everyone,
> I want to add a search button to an input search field , if there is
> anyone who knows
> how to add a button to the field in crispy form's input field. Please help
> me out
>
>
> https://pagure.io/fedora-commops/fedora-happiness-packets/issue/raw/files/a8846b7d72aced5bdc0a2470dc97a495fb7558d6a0908a04b369260e862d-Screenshot_2019-03-20_Open-source_Happiness_Packets.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 post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAHrBrjDW%2Bn-oHwdiYRpw%3DdS8HA%2BAH%2Bne3_kjmxz-UHYqPhX9ow%40mail.gmail.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

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


RE: Login by phone number best practice

2019-04-03 Thread Matthew Pava
Check out these:
https://djangopackages.org/grids/g/authentication/

A package for phone number authentication:
https://github.com/wejhink/django-phone-login


-Original Message-
From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On 
Behalf Of Mohammad Etemaddar
Sent: Wednesday, April 3, 2019 1:59 PM
To: Django users
Subject: Login by phone number best practice

I want users to login by phone number (without registration).
But we need username field for authentication.
This is just for make easy for users that don't know about using email. And 
also make it easier to login for them.
But I need also username and email for other users for future.
I need you opinion on how to implement it.
Set username field to phone_number / create random username for users that need 
to login by phone

I also need best practices and documentations if is available for login and 
registration in this situation.

Thank you

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

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


Login by phone number best practice

2019-04-03 Thread Mohammad Etemaddar
I want users to login by phone number (without registration).
But we need username field for authentication.
This is just for make easy for users that don't know about using email. And 
also make it easier to login for them.
But I need also username and email for other users for future.
I need you opinion on how to implement it.
Set username field to phone_number / create random username for users that need 
to login by phone

I also need best practices and documentations if is available for login and 
registration in this situation.

Thank you

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


I need help on adding a search button to an input field

2019-04-03 Thread Nanjuki Saidat
Hi everyone,
I want to add a search button to an input search field , if there is anyone
who knows
how to add a button to the field in crispy form's input field. Please help
me out

https://pagure.io/fedora-commops/fedora-happiness-packets/issue/raw/files/a8846b7d72aced5bdc0a2470dc97a495fb7558d6a0908a04b369260e862d-Screenshot_2019-03-20_Open-source_Happiness_Packets.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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAHrBrjDW%2Bn-oHwdiYRpw%3DdS8HA%2BAH%2Bne3_kjmxz-UHYqPhX9ow%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Adding a search button to an input field.

2019-04-03 Thread Nanjuki Saidat
Hi everyone,
I want to add a search button to an input search field , if there is anyone
who knows
how to add a button to the field in crispy form's input field. Please help
me out

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


Re: django Query filter

2019-04-03 Thread Nikolay Smirnov
Your request.POST does not contain "search1".
Do so search1 = request.POST.get('search1')

Example:
def viewstr(request):
views = create_store.objects.all()
brn = Prod_Brand.objects.all()
mi = ''
if request.method == 'POST':
search1 = request.POST.get('search1')
if search1:
mi = 
create_store.objects.filter(Q(select_brand__Brand__icontains=search1))
if mi:
return render(request,'viewstr.html',{'vi':mi,'brn':brn})
search = request.POST.get('search')
if search:
mi = create_store.objects.filter(Q(id__icontains=search))
if mi:
return render(request,'viewstr.html',{'vi':mi,'brn':brn})

return 
render(request,'viewstr.html',{'viewstr':viewstr,'vi':mi,'brn':brn})





On Wednesday, 3 April 2019 13:33:20 UTC+2, Abhineet Baranwal wrote:
>
>
> *this is my views file which creates an error like  
> django.utils.datastructures.MultiValueDictKeyError: 'search1' . Can anyone 
> tell me where i go wrong?*
>
> *def viewstr(request):*
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> *views = create_store.objects.all()brn = 
> Prod_Brand.objects.all()mi = ''if request.method == 'POST':
> # mi = ''search1 = request.POST['search1']if search1 == '' 
> :passelse:mi = 
> create_store.objects.filter(Q(select_brand__Brand__icontains=search1))
> 
> if mi:return 
> render(request,'viewstr.html',{'vi':mi,'brn':brn})search = 
> request.POST['search']if search == '' :passelse 
> :mi = 
> create_store.objects.filter(Q(id__icontains=search))if 
> mi:return 
> render(request,'viewstr.html',{'vi':mi,'brn':brn})return 
> render(request,'viewstr.html',{'viewstr':viewstr,'vi':mi,'brn':brn})*
>

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


Re: What step am I missing?

2019-04-03 Thread Pedro Folch
Sorry codingforentreprenour or so. On YouTube.

On Wed, Apr 3, 2019, 10:18 AM Pedro Folch  wrote:

> Helpful videos use encodingforentrepernours and justdjango are very
> helpful providers
>
> On Sun, Mar 10, 2019, 4:23 PM Joseph Jones  wrote:
>
>> Hello all!
>> I have been reading
>> https://www.packtpub.com/application-development/learn-python-programming-second-edition
>>  Since
>> November, so I am very much new to the Python community. I am currently on
>> chapter 14 "Web development" which suggests completing the tutorial on
>> djangoproject.com after installing Django of course. When I've run the
>> first two commands in the cmd of my PC I get the output the tutorial would
>> indicate. However when I run the command .../> py manage.py runserver I
>> receive a command error that no such file exists. My question is what
>> mistake am I making? I'm hypothesizing one is to create a file entitled
>> "manage.py' before beginning, however unless I'm misreading the text in the
>> tutorial the command .../> django-admin startproject runserver
>> auto-generates said file. Any suggestions on what I'm doing wrong would be
>> immensely appreciated. Let me apologize in advance if I either, ask for
>> clarification in any responses(again I am new), or mess up again through
>> out the course of the tutorial and again reach out to the community. Thank
>> you for any help,
>> Joseph
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to django-users+unsubscr...@googlegroups.com.
>> To post to this group, send email to django-users@googlegroups.com.
>> Visit this group at https://groups.google.com/group/django-users.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CAJGsC5OzcyMwrW%3D-EmU%2B-3o8esQ2JeVQoJScq%3DHy_mtsxKRuKQ%40mail.gmail.com
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>

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


Re: What step am I missing?

2019-04-03 Thread Pedro Folch
Helpful videos use encodingforentrepernours and justdjango are very helpful
providers

On Sun, Mar 10, 2019, 4:23 PM Joseph Jones  wrote:

> Hello all!
> I have been reading
> https://www.packtpub.com/application-development/learn-python-programming-second-edition
>  Since
> November, so I am very much new to the Python community. I am currently on
> chapter 14 "Web development" which suggests completing the tutorial on
> djangoproject.com after installing Django of course. When I've run the
> first two commands in the cmd of my PC I get the output the tutorial would
> indicate. However when I run the command .../> py manage.py runserver I
> receive a command error that no such file exists. My question is what
> mistake am I making? I'm hypothesizing one is to create a file entitled
> "manage.py' before beginning, however unless I'm misreading the text in the
> tutorial the command .../> django-admin startproject runserver
> auto-generates said file. Any suggestions on what I'm doing wrong would be
> immensely appreciated. Let me apologize in advance if I either, ask for
> clarification in any responses(again I am new), or mess up again through
> out the course of the tutorial and again reach out to the community. Thank
> you for any help,
> Joseph
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAJGsC5OzcyMwrW%3D-EmU%2B-3o8esQ2JeVQoJScq%3DHy_mtsxKRuKQ%40mail.gmail.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

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


Re: What step am I missing?

2019-04-03 Thread jgibson
Sorry, I addressed this to Pedro when I meant jos.jwj.

On Wednesday, April 3, 2019 at 11:24:11 AM UTC-4, jgi...@caktusgroup.com 
wrote:
>
> Pedro,
>
> Can you provide us with the structure of your project?  For example:
>
> /home/pedro/intro_django/
> /home/pedro/intro_django/manage.py
> /home/pedro/intro_django/apps/
> /home/pedro/intro_django/apps/models.py
> /home/pedro/intro_django/apps/views.py
>
>
> Then let us know which where you are issuing the command "py manage.py 
> runserver"
>
> Thanks,
>
> Jeremy Gibson
> https://caktusgroup.com
>
> On Wednesday, April 3, 2019 at 10:33:45 AM UTC-4, jos.jwj wrote:
>>
>> Pedro, 
>> I apologize for the response delay. First thank you very much for 
>> recommending pycharm. I do still find myself getting stuck on the same 
>> line. when I've run the code >py manage.py runserver I still receive an 
>> error that ' manage.py does not exist'. I'm sure it is a basic step that 
>> I'm not seeing, and taking a month to complete a basic tutorial is 
>> certainly humbling. any advice would be greatly appreciated and if I'm not 
>> being descriptive enough please let me know and I will do my best to be as 
>> accurate as possible. Thank you,
>>
>> Joseph
>>
>> On Fri, Mar 15, 2019 at 6:45 AM Pedro Folch  wrote:
>>
>>> Also try using pycharm it will probably be easier for running django.  
>>> It helps.
>>>
>>> On Thu, Mar 14, 2019, 9:22 PM Pedro Folch  wrote:
>>>
 Your cms line should be in the same directory as the manage.py

 On Thu, Mar 14, 2019, 8:46 PM Joseph Jones  wrote:

> Hi, 
> yes Thank you so much those video tutorial helped me quite a bit. I 
> was able to create a new directory, as the "introduction to django" 
> tutorial suggested I've made sure its title is project specific. However, 
> I 
> seem to have run into a problem creating a path to my new directory. when 
> last I ran the command I received an Command error stating that my 
> project 
> name was not valid. Any thoughts on what detail I am overlooking would be 
> very appreciated,
> Thank you
>
> On Tue, Mar 12, 2019 at 8:30 AM Suresh Kannan  
> wrote:
>
>> Hi,
>>
>> You can watch these videos. I think this might help you.
>>
>> https://www.youtube.com/watch?v=FNQxxpM1yOs (windows)
>>
>>
>> https://www.youtube.com/watch?v=oT1A1KKf0SI=PLxxA5z-8B2xk4szCgFmgonNcCboyNneMD
>>  
>> (linux)
>>
>> On Mon, 11 Mar 2019 at 09:35, Joseph Jones  wrote:
>>
>>> Thank you so much, does one bring up the cd command in the python 
>>> terminal?
>>>
>>> On Mon, Mar 11, 2019 at 8:07 AM Kayode Oladipo  
>>> wrote:
>>>
 You have to be in the project level directory to access 'manage.py'.
 Use the 'cd' command in the terminal to do this.

 On Sun, Mar 10, 2019, 23:23 Joseph Jones >>>
> Hello all!
> I have been reading  
> https://www.packtpub.com/application-development/learn-python-programming-second-edition
>  Since 
> November, so I am very much new to the Python community. I am 
> currently on 
> chapter 14 "Web development" which suggests completing the tutorial 
> on  
> djangoproject.com after installing Django of course. When I've 
> run the first two commands in the cmd of my PC I get the output the 
> tutorial would indicate. However when I run the command .../> py 
> manage.py 
> runserver I receive a command error that no such file exists. My 
> question 
> is what mistake am I making? I'm hypothesizing one is to create a 
> file 
> entitled "manage.py' before beginning, however unless I'm misreading 
> the 
> text in the tutorial the command .../> django-admin startproject 
> runserver 
> auto-generates said file. Any suggestions on what I'm doing wrong 
> would be 
> immensely appreciated. Let me apologize in advance if I either, ask 
> for 
> clarification in any responses(again I am new), or mess up again 
> through 
> out the course of the tutorial and again reach out to the community. 
> Thank 
> you for any help,
> Joseph
>
> -- 
> You received this message because you are 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 post to this group, send email to django...@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/django-users/CAJGsC5OzcyMwrW%3D-EmU%2B-3o8esQ2JeVQoJScq%3DHy_mtsxKRuKQ%40mail.gmail.com
>  
> 

Re: What step am I missing?

2019-04-03 Thread Pedro Folch
Also terminal in pycharm is the command prom if you press the green arrow
on top it will also run the manage.py and will give you answers if problems
found

On Wed, Apr 3, 2019, 9:46 AM Pedro Folch  wrote:

> Also when you create a project, select the django project on pycharm
> This will create almost all the steps needed for startup
>
> On Wed, Apr 3, 2019, 8:33 AM Joseph Jones  wrote:
>
>> Pedro,
>> I apologize for the response delay. First thank you very much for
>> recommending pycharm. I do still find myself getting stuck on the same
>> line. when I've run the code >py manage.py runserver I still receive an
>> error that ' manage.py does not exist'. I'm sure it is a basic step that
>> I'm not seeing, and taking a month to complete a basic tutorial is
>> certainly humbling. any advice would be greatly appreciated and if I'm not
>> being descriptive enough please let me know and I will do my best to be as
>> accurate as possible. Thank you,
>>
>> Joseph
>>
>> On Fri, Mar 15, 2019 at 6:45 AM Pedro Folch 
>> wrote:
>>
>>> Also try using pycharm it will probably be easier for running django.
>>> It helps.
>>>
>>> On Thu, Mar 14, 2019, 9:22 PM Pedro Folch  wrote:
>>>
 Your cms line should be in the same directory as the manage.py

 On Thu, Mar 14, 2019, 8:46 PM Joseph Jones  wrote:

> Hi,
> yes Thank you so much those video tutorial helped me quite a bit. I
> was able to create a new directory, as the "introduction to django"
> tutorial suggested I've made sure its title is project specific. However, 
> I
> seem to have run into a problem creating a path to my new directory. when
> last I ran the command I received an Command error stating that my project
> name was not valid. Any thoughts on what detail I am overlooking would be
> very appreciated,
> Thank you
>
> On Tue, Mar 12, 2019 at 8:30 AM Suresh Kannan 
> wrote:
>
>> Hi,
>>
>> You can watch these videos. I think this might help you.
>>
>> https://www.youtube.com/watch?v=FNQxxpM1yOs (windows)
>>
>>
>> https://www.youtube.com/watch?v=oT1A1KKf0SI=PLxxA5z-8B2xk4szCgFmgonNcCboyNneMD
>> (linux)
>>
>> On Mon, 11 Mar 2019 at 09:35, Joseph Jones  wrote:
>>
>>> Thank you so much, does one bring up the cd command in the python
>>> terminal?
>>>
>>> On Mon, Mar 11, 2019 at 8:07 AM Kayode Oladipo <
>>> oladipokayo...@gmail.com> wrote:
>>>
 You have to be in the project level directory to access 'manage.py'.
 Use the 'cd' command in the terminal to do this.

 On Sun, Mar 10, 2019, 23:23 Joseph Jones >>>
> Hello all!
> I have been reading
> https://www.packtpub.com/application-development/learn-python-programming-second-edition
>  Since
> November, so I am very much new to the Python community. I am 
> currently on
> chapter 14 "Web development" which suggests completing the tutorial on
> djangoproject.com after installing Django of course. When I've
> run the first two commands in the cmd of my PC I get the output the
> tutorial would indicate. However when I run the command .../> py 
> manage.py
> runserver I receive a command error that no such file exists. My 
> question
> is what mistake am I making? I'm hypothesizing one is to create a file
> entitled "manage.py' before beginning, however unless I'm misreading 
> the
> text in the tutorial the command .../> django-admin startproject 
> runserver
> auto-generates said file. Any suggestions on what I'm doing wrong 
> would be
> immensely appreciated. Let me apologize in advance if I either, ask 
> for
> clarification in any responses(again I am new), or mess up again 
> through
> out the course of the tutorial and again reach out to the community. 
> Thank
> you for any help,
> Joseph
>
> --
> You received this message because you are subscribed to the Google
> Groups "Django users" group.
> To unsubscribe from this group and stop receiving emails from it,
> send an email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com
> .
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAJGsC5OzcyMwrW%3D-EmU%2B-3o8esQ2JeVQoJScq%3DHy_mtsxKRuKQ%40mail.gmail.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>
 --
 You received this message because 

Re: What step am I missing?

2019-04-03 Thread Pedro Folch
Also when you create a project, select the django project on pycharm
This will create almost all the steps needed for startup

On Wed, Apr 3, 2019, 8:33 AM Joseph Jones  wrote:

> Pedro,
> I apologize for the response delay. First thank you very much for
> recommending pycharm. I do still find myself getting stuck on the same
> line. when I've run the code >py manage.py runserver I still receive an
> error that ' manage.py does not exist'. I'm sure it is a basic step that
> I'm not seeing, and taking a month to complete a basic tutorial is
> certainly humbling. any advice would be greatly appreciated and if I'm not
> being descriptive enough please let me know and I will do my best to be as
> accurate as possible. Thank you,
>
> Joseph
>
> On Fri, Mar 15, 2019 at 6:45 AM Pedro Folch  wrote:
>
>> Also try using pycharm it will probably be easier for running django.  It
>> helps.
>>
>> On Thu, Mar 14, 2019, 9:22 PM Pedro Folch  wrote:
>>
>>> Your cms line should be in the same directory as the manage.py
>>>
>>> On Thu, Mar 14, 2019, 8:46 PM Joseph Jones  wrote:
>>>
 Hi,
 yes Thank you so much those video tutorial helped me quite a bit. I was
 able to create a new directory, as the "introduction to django" tutorial
 suggested I've made sure its title is project specific. However, I seem to
 have run into a problem creating a path to my new directory. when last I
 ran the command I received an Command error stating that my project name
 was not valid. Any thoughts on what detail I am overlooking would be very
 appreciated,
 Thank you

 On Tue, Mar 12, 2019 at 8:30 AM Suresh Kannan 
 wrote:

> Hi,
>
> You can watch these videos. I think this might help you.
>
> https://www.youtube.com/watch?v=FNQxxpM1yOs (windows)
>
>
> https://www.youtube.com/watch?v=oT1A1KKf0SI=PLxxA5z-8B2xk4szCgFmgonNcCboyNneMD
> (linux)
>
> On Mon, 11 Mar 2019 at 09:35, Joseph Jones  wrote:
>
>> Thank you so much, does one bring up the cd command in the python
>> terminal?
>>
>> On Mon, Mar 11, 2019 at 8:07 AM Kayode Oladipo <
>> oladipokayo...@gmail.com> wrote:
>>
>>> You have to be in the project level directory to access 'manage.py'.
>>> Use the 'cd' command in the terminal to do this.
>>>
>>> On Sun, Mar 10, 2019, 23:23 Joseph Jones >>
 Hello all!
 I have been reading
 https://www.packtpub.com/application-development/learn-python-programming-second-edition
  Since
 November, so I am very much new to the Python community. I am 
 currently on
 chapter 14 "Web development" which suggests completing the tutorial on
 djangoproject.com after installing Django of course. When I've run
 the first two commands in the cmd of my PC I get the output the 
 tutorial
 would indicate. However when I run the command .../> py manage.py 
 runserver
 I receive a command error that no such file exists. My question is what
 mistake am I making? I'm hypothesizing one is to create a file entitled
 "manage.py' before beginning, however unless I'm misreading the text 
 in the
 tutorial the command .../> django-admin startproject runserver
 auto-generates said file. Any suggestions on what I'm doing wrong 
 would be
 immensely appreciated. Let me apologize in advance if I either, ask for
 clarification in any responses(again I am new), or mess up again 
 through
 out the course of the tutorial and again reach out to the community. 
 Thank
 you for any help,
 Joseph

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

>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Django users" group.
>>> To unsubscribe from this group and stop receiving emails from it,
>>> send an email to django-users+unsubscr...@googlegroups.com.
>>> To post to this group, send email to django-users@googlegroups.com.
>>> Visit this group at 

Re: What step am I missing?

2019-04-03 Thread Pedro Folch
When you run the line manage.py you should be on the same folder.  Make
sure that you can see manage.py when you do an ls on the command prom

On Wed, Apr 3, 2019, 8:33 AM Joseph Jones  wrote:

> Pedro,
> I apologize for the response delay. First thank you very much for
> recommending pycharm. I do still find myself getting stuck on the same
> line. when I've run the code >py manage.py runserver I still receive an
> error that ' manage.py does not exist'. I'm sure it is a basic step that
> I'm not seeing, and taking a month to complete a basic tutorial is
> certainly humbling. any advice would be greatly appreciated and if I'm not
> being descriptive enough please let me know and I will do my best to be as
> accurate as possible. Thank you,
>
> Joseph
>
> On Fri, Mar 15, 2019 at 6:45 AM Pedro Folch  wrote:
>
>> Also try using pycharm it will probably be easier for running django.  It
>> helps.
>>
>> On Thu, Mar 14, 2019, 9:22 PM Pedro Folch  wrote:
>>
>>> Your cms line should be in the same directory as the manage.py
>>>
>>> On Thu, Mar 14, 2019, 8:46 PM Joseph Jones  wrote:
>>>
 Hi,
 yes Thank you so much those video tutorial helped me quite a bit. I was
 able to create a new directory, as the "introduction to django" tutorial
 suggested I've made sure its title is project specific. However, I seem to
 have run into a problem creating a path to my new directory. when last I
 ran the command I received an Command error stating that my project name
 was not valid. Any thoughts on what detail I am overlooking would be very
 appreciated,
 Thank you

 On Tue, Mar 12, 2019 at 8:30 AM Suresh Kannan 
 wrote:

> Hi,
>
> You can watch these videos. I think this might help you.
>
> https://www.youtube.com/watch?v=FNQxxpM1yOs (windows)
>
>
> https://www.youtube.com/watch?v=oT1A1KKf0SI=PLxxA5z-8B2xk4szCgFmgonNcCboyNneMD
> (linux)
>
> On Mon, 11 Mar 2019 at 09:35, Joseph Jones  wrote:
>
>> Thank you so much, does one bring up the cd command in the python
>> terminal?
>>
>> On Mon, Mar 11, 2019 at 8:07 AM Kayode Oladipo <
>> oladipokayo...@gmail.com> wrote:
>>
>>> You have to be in the project level directory to access 'manage.py'.
>>> Use the 'cd' command in the terminal to do this.
>>>
>>> On Sun, Mar 10, 2019, 23:23 Joseph Jones >>
 Hello all!
 I have been reading
 https://www.packtpub.com/application-development/learn-python-programming-second-edition
  Since
 November, so I am very much new to the Python community. I am 
 currently on
 chapter 14 "Web development" which suggests completing the tutorial on
 djangoproject.com after installing Django of course. When I've run
 the first two commands in the cmd of my PC I get the output the 
 tutorial
 would indicate. However when I run the command .../> py manage.py 
 runserver
 I receive a command error that no such file exists. My question is what
 mistake am I making? I'm hypothesizing one is to create a file entitled
 "manage.py' before beginning, however unless I'm misreading the text 
 in the
 tutorial the command .../> django-admin startproject runserver
 auto-generates said file. Any suggestions on what I'm doing wrong 
 would be
 immensely appreciated. Let me apologize in advance if I either, ask for
 clarification in any responses(again I am new), or mess up again 
 through
 out the course of the tutorial and again reach out to the community. 
 Thank
 you for any help,
 Joseph

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

>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Django users" group.
>>> To unsubscribe from this group and stop receiving emails from it,
>>> send an email to django-users+unsubscr...@googlegroups.com.
>>> To post to this group, send email to django-users@googlegroups.com.
>>> Visit this group at 

Re: What step am I missing?

2019-04-03 Thread jgibson
Pedro,

Can you provide us with the structure of your project?  For example:

/home/pedro/intro_django/
/home/pedro/intro_django/manage.py
/home/pedro/intro_django/apps/
/home/pedro/intro_django/apps/models.py
/home/pedro/intro_django/apps/views.py


Then let us know which where you are issuing the command "py manage.py 
runserver"

Thanks,

Jeremy Gibson
https://caktusgroup.com

On Wednesday, April 3, 2019 at 10:33:45 AM UTC-4, jos.jwj wrote:
>
> Pedro, 
> I apologize for the response delay. First thank you very much for 
> recommending pycharm. I do still find myself getting stuck on the same 
> line. when I've run the code >py manage.py runserver I still receive an 
> error that ' manage.py does not exist'. I'm sure it is a basic step that 
> I'm not seeing, and taking a month to complete a basic tutorial is 
> certainly humbling. any advice would be greatly appreciated and if I'm not 
> being descriptive enough please let me know and I will do my best to be as 
> accurate as possible. Thank you,
>
> Joseph
>
> On Fri, Mar 15, 2019 at 6:45 AM Pedro Folch  > wrote:
>
>> Also try using pycharm it will probably be easier for running django.  It 
>> helps.
>>
>> On Thu, Mar 14, 2019, 9:22 PM Pedro Folch > > wrote:
>>
>>> Your cms line should be in the same directory as the manage.py
>>>
>>> On Thu, Mar 14, 2019, 8:46 PM Joseph Jones >> > wrote:
>>>
 Hi, 
 yes Thank you so much those video tutorial helped me quite a bit. I was 
 able to create a new directory, as the "introduction to django" tutorial 
 suggested I've made sure its title is project specific. However, I seem to 
 have run into a problem creating a path to my new directory. when last I 
 ran the command I received an Command error stating that my project name 
 was not valid. Any thoughts on what detail I am overlooking would be very 
 appreciated,
 Thank you

 On Tue, Mar 12, 2019 at 8:30 AM Suresh Kannan >>> > wrote:

> Hi,
>
> You can watch these videos. I think this might help you.
>
> https://www.youtube.com/watch?v=FNQxxpM1yOs (windows)
>
>
> https://www.youtube.com/watch?v=oT1A1KKf0SI=PLxxA5z-8B2xk4szCgFmgonNcCboyNneMD
>  
> (linux)
>
> On Mon, 11 Mar 2019 at 09:35, Joseph Jones  > wrote:
>
>> Thank you so much, does one bring up the cd command in the python 
>> terminal?
>>
>> On Mon, Mar 11, 2019 at 8:07 AM Kayode Oladipo > > wrote:
>>
>>> You have to be in the project level directory to access 'manage.py'.
>>> Use the 'cd' command in the terminal to do this.
>>>
>>> On Sun, Mar 10, 2019, 23:23 Joseph Jones >>  wrote:
>>>
 Hello all!
 I have been reading  
 https://www.packtpub.com/application-development/learn-python-programming-second-edition
  Since 
 November, so I am very much new to the Python community. I am 
 currently on 
 chapter 14 "Web development" which suggests completing the tutorial on 
  
 djangoproject.com after installing Django of course. When I've run 
 the first two commands in the cmd of my PC I get the output the 
 tutorial 
 would indicate. However when I run the command .../> py manage.py 
 runserver 
 I receive a command error that no such file exists. My question is 
 what 
 mistake am I making? I'm hypothesizing one is to create a file 
 entitled 
 "manage.py' before beginning, however unless I'm misreading the text 
 in the 
 tutorial the command .../> django-admin startproject runserver 
 auto-generates said file. Any suggestions on what I'm doing wrong 
 would be 
 immensely appreciated. Let me apologize in advance if I either, ask 
 for 
 clarification in any responses(again I am new), or mess up again 
 through 
 out the course of the tutorial and again reach out to the community. 
 Thank 
 you for any help,
 Joseph

 -- 
 You received this message because you are 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 post to this group, send email to django...@googlegroups.com 
 .
 Visit this group at https://groups.google.com/group/django-users.
 To view this discussion on the web visit 
 https://groups.google.com/d/msgid/django-users/CAJGsC5OzcyMwrW%3D-EmU%2B-3o8esQ2JeVQoJScq%3DHy_mtsxKRuKQ%40mail.gmail.com
  
 
 .
 For more options, visit https://groups.google.com/d/optout.

>>> -- 
>>> You received this 

Re: What step am I missing?

2019-04-03 Thread Joseph Jones
Pedro,
I apologize for the response delay. First thank you very much for
recommending pycharm. I do still find myself getting stuck on the same
line. when I've run the code >py manage.py runserver I still receive an
error that ' manage.py does not exist'. I'm sure it is a basic step that
I'm not seeing, and taking a month to complete a basic tutorial is
certainly humbling. any advice would be greatly appreciated and if I'm not
being descriptive enough please let me know and I will do my best to be as
accurate as possible. Thank you,

Joseph

On Fri, Mar 15, 2019 at 6:45 AM Pedro Folch  wrote:

> Also try using pycharm it will probably be easier for running django.  It
> helps.
>
> On Thu, Mar 14, 2019, 9:22 PM Pedro Folch  wrote:
>
>> Your cms line should be in the same directory as the manage.py
>>
>> On Thu, Mar 14, 2019, 8:46 PM Joseph Jones  wrote:
>>
>>> Hi,
>>> yes Thank you so much those video tutorial helped me quite a bit. I was
>>> able to create a new directory, as the "introduction to django" tutorial
>>> suggested I've made sure its title is project specific. However, I seem to
>>> have run into a problem creating a path to my new directory. when last I
>>> ran the command I received an Command error stating that my project name
>>> was not valid. Any thoughts on what detail I am overlooking would be very
>>> appreciated,
>>> Thank you
>>>
>>> On Tue, Mar 12, 2019 at 8:30 AM Suresh Kannan 
>>> wrote:
>>>
 Hi,

 You can watch these videos. I think this might help you.

 https://www.youtube.com/watch?v=FNQxxpM1yOs (windows)


 https://www.youtube.com/watch?v=oT1A1KKf0SI=PLxxA5z-8B2xk4szCgFmgonNcCboyNneMD
 (linux)

 On Mon, 11 Mar 2019 at 09:35, Joseph Jones  wrote:

> Thank you so much, does one bring up the cd command in the python
> terminal?
>
> On Mon, Mar 11, 2019 at 8:07 AM Kayode Oladipo <
> oladipokayo...@gmail.com> wrote:
>
>> You have to be in the project level directory to access 'manage.py'.
>> Use the 'cd' command in the terminal to do this.
>>
>> On Sun, Mar 10, 2019, 23:23 Joseph Jones >
>>> Hello all!
>>> I have been reading
>>> https://www.packtpub.com/application-development/learn-python-programming-second-edition
>>>  Since
>>> November, so I am very much new to the Python community. I am currently 
>>> on
>>> chapter 14 "Web development" which suggests completing the tutorial on
>>> djangoproject.com after installing Django of course. When I've run
>>> the first two commands in the cmd of my PC I get the output the tutorial
>>> would indicate. However when I run the command .../> py manage.py 
>>> runserver
>>> I receive a command error that no such file exists. My question is what
>>> mistake am I making? I'm hypothesizing one is to create a file entitled
>>> "manage.py' before beginning, however unless I'm misreading the text in 
>>> the
>>> tutorial the command .../> django-admin startproject runserver
>>> auto-generates said file. Any suggestions on what I'm doing wrong would 
>>> be
>>> immensely appreciated. Let me apologize in advance if I either, ask for
>>> clarification in any responses(again I am new), or mess up again through
>>> out the course of the tutorial and again reach out to the community. 
>>> Thank
>>> you for any help,
>>> Joseph
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Django users" group.
>>> To unsubscribe from this group and stop receiving emails from it,
>>> send an email to django-users+unsubscr...@googlegroups.com.
>>> To post to this group, send email to django-users@googlegroups.com.
>>> Visit this group at https://groups.google.com/group/django-users.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/CAJGsC5OzcyMwrW%3D-EmU%2B-3o8esQ2JeVQoJScq%3DHy_mtsxKRuKQ%40mail.gmail.com
>>> 
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it,
>> send an email to django-users+unsubscr...@googlegroups.com.
>> To post to this group, send email to django-users@googlegroups.com.
>> Visit this group at https://groups.google.com/group/django-users.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CA%2BARzD8BiTZ8Rzfi9twFF7GTzYpBZqpCdpR3K_tGW5b1Rfsdrw%40mail.gmail.com
>> 

RE: BaseModelFormSet > _construct_form

2019-04-03 Thread Matthew Pava
You may want to consider using the django-angular 
(https://github.com/jrief/django-angular) package and reading this question:
https://stackoverflow.com/questions/32978137/using-formsets-in-django-angular

From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On 
Behalf Of Nikolay Smirnov
Sent: Wednesday, April 3, 2019 1:53 AM
To: Django users
Subject: Re: BaseModelFormSet > _construct_form

I override add_prefix because on client side I use angularjs. In some cases it 
is impossible or not easy to use hyphens in the names.

I do not overwrite _construct_form! That was just a possibility to solve that. 
But at the moment, I see no other options for solving that.

I find it personally that generating variable pk_key within the _construct_form 
is a bad practice. And becomes not compatible with generating form field ID's 
and -field names.

On Tuesday, 2 April 2019 23:15:15 UTC+2, Matthew Pava wrote:
Why are overwriting add_prefix? Why are you overwriting _construct_form?

From: django...@googlegroups.com 
[mailto:django...@googlegroups.com] On Behalf Of nikolaysm
Sent: Tuesday, April 2, 2019 9:37 AM
To: Django users
Subject: BaseModelFormSet > _construct_form

Hello,

In function _construct_form variable "pk_key" is generated as:
 pk_key = "%s-%s" % (self.add_prefix (i), self.model._meta.pk.name) "

So pk_key is not flexible. Because if I overwrite function "add_prefix" from 
class "forms.ModelForm", I get error "MultiValueDictKeyError".

My add_prefix function:
def add_prefix(self, field_name):
  return '%s_%s' % (self.prefix, field_name) if self.prefix else field_name

I see a possibility to solve that for now. Overwrite function _construct_form.

Other options?
--
You received this message because you are 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 post to this group, send email to djang...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/92616dd1-1e04-43f6-9e91-edfc56dfe5bc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to 
django-users+unsubscr...@googlegroups.com.
To post to this group, send email to 
django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/95d37c13-d5da-4566-913d-cff89975f897%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

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


Re: google chrome extension

2019-04-03 Thread אורי
I also think the server side of the extension can use Django (or any other
platform and programming language) but the extension itself (the client
side) - I'm not sure it's a good idea to use Django.

Try to search about Chrome extensions and see what it takes to make one. I
think JavaScript is the default and easiest way to create an extension.
אורי
u...@speedy.net


On Wed, Apr 3, 2019 at 2:32 PM Abhineet Baranwal <
suabhineetbaran...@gmail.com> wrote:

>
> *Can i create a chrome extension in django or flask ? I have already
> created an extension in javascript but i didn't know how to start creating
> it in django . Can anyone tell me how to do it with some example?*
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/ec99c11f-ec5a-46f9-87cc-ae159b2aad61%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

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


Re: google chrome extension

2019-04-03 Thread Alex Chiaranda
Greetings,

for Chrome Extension, you must use Javascript, or Javascript + Native Code 
(compiling for the target platform, and distributing it with the 
extension). So the quick answer is "You shouldn't do it", but it might be 
possible. I don't think it would be approved thought, because you would 
have to distribute a python interpreter with you extension, the extension 
size would be huge.


However, if your extension is meant to communicate with a server side 
application, this part can be whatever you want, providing a REST API for 
your extension.

Hope it helps !

Regards,

Alex


On Wednesday, April 3, 2019 at 8:33:20 AM UTC-3, Abhineet Baranwal wrote:
>
>
> *Can i create a chrome extension in django or flask ? I have already 
> created an extension in javascript but i didn't know how to start creating 
> it in django . Can anyone tell me how to do it with some example?*
>

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


psycopg2.DataError: invalid input syntax

2019-04-03 Thread omar ahmed
i am getting this error :
psycopg2.DataError: invalid input syntax
what is the solution ?

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


Re: django Query filter

2019-04-03 Thread Guru Murthy
Hi abhineet baranwal,
You have to use q(id__in=search) instead q(id__icontains=search) ..search
more about how to use in query in django and 1 thing you are not getting
correct post value of searc1

On Wed, 3 Apr, 2019, 5:31 PM Abhineet Baranwal, <
suabhineetbaran...@gmail.com> wrote:

> Thanks for your efforts, But i didn't get it can you please elaborate your
> answer?
>
> On Wed, Apr 3, 2019 at 5:16 PM Guru Murthy 
> wrote:
>
>> Hi Abhijeet baranwal,
>>   I think you are adding contains is not correct query listing you have
>> to use in query instead
>>
>>
>> On Wed, 3 Apr, 2019, 5:02 PM Abhineet Baranwal, <
>> suabhineetbaran...@gmail.com> wrote:
>>
>>>
>>> *this is my views file which creates an error like
>>> django.utils.datastructures.MultiValueDictKeyError: 'search1' . Can anyone
>>> tell me where i go wrong?*
>>>
>>> *def viewstr(request):*
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> *views = create_store.objects.all()brn =
>>> Prod_Brand.objects.all()mi = ''if request.method == 'POST':
>>> # mi = ''search1 = request.POST['search1']if search1 == ''
>>> :passelse:mi =
>>> create_store.objects.filter(Q(select_brand__Brand__icontains=search1))
>>> if mi:return
>>> render(request,'viewstr.html',{'vi':mi,'brn':brn})search =
>>> request.POST['search']if search == '' :passelse
>>> :mi =
>>> create_store.objects.filter(Q(id__icontains=search))if
>>> mi:return
>>> render(request,'viewstr.html',{'vi':mi,'brn':brn})return
>>> render(request,'viewstr.html',{'viewstr':viewstr,'vi':mi,'brn':brn})*
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Django users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to django-users+unsubscr...@googlegroups.com.
>>> To post to this group, send email to django-users@googlegroups.com.
>>> Visit this group at https://groups.google.com/group/django-users.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/cdafd13a-46b5-471d-a927-b3d5d8e58f5c%40googlegroups.com
>>> 
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to django-users+unsubscr...@googlegroups.com.
>> To post to this group, send email to django-users@googlegroups.com.
>> Visit this group at https://groups.google.com/group/django-users.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CAMgkGLV-OzbGCnJZv-MoQz5GvjgetOjjZ-TVV5KLNQMezZC13g%40mail.gmail.com
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAFOSuXL4i%3DqCWNWkRwm2MFfHgvD9jJueZd4uARFb6Rza%2BAy-JA%40mail.gmail.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

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


Re: django Query filter

2019-04-03 Thread dvij parekh
seems like search1 key is containg multi value dictionary and you are
checking it with == which is for single value
after
*search1 = request.POST['search1']  *
put
*print(* *search1*  *)*
*return "hello"*

 and comment code remaining below ,check terminal it will show you how many
value you have in dictionary


On Wed, Apr 3, 2019 at 5:03 PM Abhineet Baranwal <
suabhineetbaran...@gmail.com> wrote:

>
> *this is my views file which creates an error like
> django.utils.datastructures.MultiValueDictKeyError: 'search1' . Can anyone
> tell me where i go wrong?*
>
> *def viewstr(request):*
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> *views = create_store.objects.all()brn =
> Prod_Brand.objects.all()mi = ''if request.method == 'POST':
> # mi = ''search1 = request.POST['search1']if search1 == ''
> :passelse:mi =
> create_store.objects.filter(Q(select_brand__Brand__icontains=search1))
> if mi:return
> render(request,'viewstr.html',{'vi':mi,'brn':brn})search =
> request.POST['search']if search == '' :passelse
> :mi =
> create_store.objects.filter(Q(id__icontains=search))if
> mi:return
> render(request,'viewstr.html',{'vi':mi,'brn':brn})return
> render(request,'viewstr.html',{'viewstr':viewstr,'vi':mi,'brn':brn})*
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/cdafd13a-46b5-471d-a927-b3d5d8e58f5c%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

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


Re: django Query filter

2019-04-03 Thread Abhineet Baranwal
Thanks for your efforts, But i didn't get it can you please elaborate your
answer?

On Wed, Apr 3, 2019 at 5:16 PM Guru Murthy  wrote:

> Hi Abhijeet baranwal,
>   I think you are adding contains is not correct query listing you have to
> use in query instead
>
>
> On Wed, 3 Apr, 2019, 5:02 PM Abhineet Baranwal, <
> suabhineetbaran...@gmail.com> wrote:
>
>>
>> *this is my views file which creates an error like
>> django.utils.datastructures.MultiValueDictKeyError: 'search1' . Can anyone
>> tell me where i go wrong?*
>>
>> *def viewstr(request):*
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> *views = create_store.objects.all()brn =
>> Prod_Brand.objects.all()mi = ''if request.method == 'POST':
>> # mi = ''search1 = request.POST['search1']if search1 == ''
>> :passelse:mi =
>> create_store.objects.filter(Q(select_brand__Brand__icontains=search1))
>> if mi:return
>> render(request,'viewstr.html',{'vi':mi,'brn':brn})search =
>> request.POST['search']if search == '' :passelse
>> :mi =
>> create_store.objects.filter(Q(id__icontains=search))if
>> mi:return
>> render(request,'viewstr.html',{'vi':mi,'brn':brn})return
>> render(request,'viewstr.html',{'viewstr':viewstr,'vi':mi,'brn':brn})*
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to django-users+unsubscr...@googlegroups.com.
>> To post to this group, send email to django-users@googlegroups.com.
>> Visit this group at https://groups.google.com/group/django-users.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/cdafd13a-46b5-471d-a927-b3d5d8e58f5c%40googlegroups.com
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAMgkGLV-OzbGCnJZv-MoQz5GvjgetOjjZ-TVV5KLNQMezZC13g%40mail.gmail.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

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


Re: django Query filter

2019-04-03 Thread Guru Murthy
Hi Abhijeet baranwal,
  I think you are adding contains is not correct query listing you have to
use in query instead


On Wed, 3 Apr, 2019, 5:02 PM Abhineet Baranwal, <
suabhineetbaran...@gmail.com> wrote:

>
> *this is my views file which creates an error like
> django.utils.datastructures.MultiValueDictKeyError: 'search1' . Can anyone
> tell me where i go wrong?*
>
> *def viewstr(request):*
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> *views = create_store.objects.all()brn =
> Prod_Brand.objects.all()mi = ''if request.method == 'POST':
> # mi = ''search1 = request.POST['search1']if search1 == ''
> :passelse:mi =
> create_store.objects.filter(Q(select_brand__Brand__icontains=search1))
> if mi:return
> render(request,'viewstr.html',{'vi':mi,'brn':brn})search =
> request.POST['search']if search == '' :passelse
> :mi =
> create_store.objects.filter(Q(id__icontains=search))if
> mi:return
> render(request,'viewstr.html',{'vi':mi,'brn':brn})return
> render(request,'viewstr.html',{'viewstr':viewstr,'vi':mi,'brn':brn})*
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/cdafd13a-46b5-471d-a927-b3d5d8e58f5c%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

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


Re: BaseModelFormSet > _construct_form

2019-04-03 Thread Nikolay Smirnov
I override add_prefix because on client side I use angularjs. In some cases 
it is impossible or not easy to use hyphens in the names.

I do not overwrite _construct_form! That was just a possibility to solve 
that. But at the moment, I see no other options for solving that.

I find it personally that generating variable pk_key within the 
_construct_form is a bad practice. And becomes not compatible with 
generating form field ID's and -field names.

On Tuesday, 2 April 2019 23:15:15 UTC+2, Matthew Pava wrote:
>
> Why are overwriting add_prefix? Why are you overwriting _*construct*_form?
>
>  
>
> *From:* django...@googlegroups.com  [mailto:
> django...@googlegroups.com ] *On Behalf Of *nikolaysm
> *Sent:* Tuesday, April 2, 2019 9:37 AM
> *To:* Django users
> *Subject:* BaseModelFormSet > _construct_form
>
>  
>
> Hello,
>
>  
>
> In function _construct_form variable "pk_key" is generated as:
>
>  pk_key = "%s-%s" % (self.add_prefix (i), self.model._meta.pk.name) "
>
>  
>
> So pk_key is not flexible. Because if I overwrite function "add_prefix" 
> from class "forms.ModelForm", I get error "MultiValueDictKeyError".
>
>  
>
> My add_prefix function:
>
> def add_prefix(self, field_name):
>
>   return '%s_%s' % (self.prefix, field_name) if self.prefix else 
> field_name
>
>  
>
> I see a possibility to solve that for now. Overwrite function 
> _construct_form.
>
> Other options?
>
> -- 
> You received this message because you are 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 post to this group, send email to djang...@googlegroups.com 
> .
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/django-users/92616dd1-1e04-43f6-9e91-edfc56dfe5bc%40googlegroups.com
>  
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

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


google chrome extension

2019-04-03 Thread Abhineet Baranwal

*Can i create a chrome extension in django or flask ? I have already 
created an extension in javascript but i didn't know how to start creating 
it in django . Can anyone tell me how to do it with some example?*

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


django Query filter

2019-04-03 Thread Abhineet Baranwal

*this is my views file which creates an error like  
django.utils.datastructures.MultiValueDictKeyError: 'search1' . Can anyone 
tell me where i go wrong?*

*def viewstr(request):*





















*views = create_store.objects.all()brn = 
Prod_Brand.objects.all()mi = ''if request.method == 'POST':
# mi = ''search1 = request.POST['search1']if search1 == '' 
:passelse:mi = 
create_store.objects.filter(Q(select_brand__Brand__icontains=search1))  
  
if mi:return 
render(request,'viewstr.html',{'vi':mi,'brn':brn})search = 
request.POST['search']if search == '' :passelse 
:mi = 
create_store.objects.filter(Q(id__icontains=search))if 
mi:return 
render(request,'viewstr.html',{'vi':mi,'brn':brn})return 
render(request,'viewstr.html',{'viewstr':viewstr,'vi':mi,'brn':brn})*

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


Re: Remove username field

2019-04-03 Thread Soumen Khatua
Can you send me the code link, please I'm struggling to find it or solve it.
Please help.
Thank you for your time.

On Wed, 3 Apr 2019, 09:28 Guru Murthy,  wrote:

> Hi Suman khatua,
>You can remove the username from admin authentication system
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAMgkGLVJv7Yt6h1F%2B59erwGcwgdsU9vERe7Ho7OUPT-5046aSA%40mail.gmail.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

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


django

2019-04-03 Thread Abhineet Baranwal

*The below code works fine on one search but for another it gives an error 
like django.utils.datastructures.MultiValueDictKeyError: 'search1' . Can 
anyone tell me where i go wrong?*




*def viewstr(request):*




















*views = create_store.objects.all()brn = 
Prod_Brand.objects.all()mi = ''if request.method == 'POST':
# mi = ''search1 = request.POST['search1']if search1 == '' 
:passelse:mi = 
create_store.objects.filter(Q(select_brand__Brand__icontains=search1))  
  
if mi:return 
render(request,'viewstr.html',{'vi':mi,'brn':brn})search = 
request.POST['search']if search == '' :passelse 
:mi = 
create_store.objects.filter(Q(id__icontains=search))if 
mi:return 
render(request,'viewstr.html',{'vi':mi,'brn':brn})return 
render(request,'viewstr.html',{'viewstr':viewstr,'vi':mi,'brn':brn})*

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


Re: How to deploy migrations to production

2019-04-03 Thread אורי
You can read about collectstatic here:
https://docs.djangoproject.com/en/dev/howto/static-files/deployment/

I think you should run it every time there is a change in the static files.
If you want to make sure, run it every time you deploy a new version.
אורי
u...@speedy.net


On Wed, Apr 3, 2019 at 8:04 AM Simon A  wrote:

> Thank you. I'd surely be able to use this when we deploy. But is it really
> necessary to run collectstatic everytime there is a deployment to perform?
> I just use this to make the admin page have the correct styling when
> accessed in production.
>
> On Wednesday, April 3, 2019 at 12:55:31 PM UTC+8, Uri Even-Chen wrote:
>>
>> I think *makemigrations* should never be used in production. You run it
>> locally and then commit the migrations.
>>
>> If it's a new production server you are deploying, I think you can delete
>> all your migrations and then run *makemigrations* (locally) to create
>> only initial migrations. But only if you are sure you're not going to need
>> to go back to a previous migration version. But if it's not a new
>> production server, just run *migrate* there after you commit your
>> migrations locally and pull them from the server.
>>
>> Take a look at
>> https://github.com/speedy-net/speedy-net/blob/master/contrib/deploy.sh
>> אורי
>> u...@speedy.net
>>
>>
>> On Tue, Apr 2, 2019 at 3:51 PM Simon A  wrote:
>>
>>> There is a workflow section in the migration page from the django
>>> project documentation. But there are somethings I am confused about,
>>>
>>> It says that the migrations need to be created in the non production
>>> environment and then checked in to the repository along with the changes in
>>> models.py.
>>>
>>> My question is how would that migration be applied in the production
>>> environment.
>>>
>>> Once the new migrations and changes in the model are deployed in the
>>> server, should I execute *python manage.py migrate* in the server?
>>>
>>> Or is it also acceptable to just deploy the changes in production
>>> environment, then execute *makemigrations* and *migrate* in production?
>>>
>>> FYI, our deployment process is still a bit manual. There is a different
>>> person handling the production servers so I'd still have to document the
>>> deployment steps and endorse to the sysadmins that will perform the change
>>> in the server.
>>>
>>> --
>>> You received this message because you are 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 post to this group, send email to django...@googlegroups.com.
>>> Visit this group at https://groups.google.com/group/django-users.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/35d6d27e-6210-4c8c-b31c-2adb424b9773%40googlegroups.com
>>> 
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/0c5358fd-bfde-4989-abfa-b4bc83ef2ad8%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

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


Re: Django inbuilt server

2019-04-03 Thread Saurabh Jaiswal
Django uses wsgi webservers by default.

On Wed, Apr 3, 2019 at 1:53 PM PASCUAL Eric  wrote:

> Hi,
>
> Chances are that you're thinking about "runserver", which is a management
> command. On Unix based systems (i.e. Linux or MacOS) you start it with :
>
> *./manage.py runserver*
>
> I'm not exactly sure about Windows, but it should be something as :
>
> *python manage.py runserver*
>
> Warning : as stressed in the documentation, this is not a server to be
> used in production and it is reserved to development and local tests.
>
> Eric
>
> --
> *From:* django-users@googlegroups.com  on
> behalf of primeshs...@cse.mrt.ac.lk 
> *Sent:* Tuesday, April 2, 2019 14:36
> *To:* Django users
> *Subject:* Django inbuilt server
>
> Hello, I'm a new django user. Can someone please tell me what is the name
> of django inbuilt server is? I went throughout the internet but I couldn't
> find a proper answer.
>
> 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 post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/1cd87cfb-9b2f-4b02-a2e0-4cb494318532%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/AM0P193MB0308CFC1341078ACDCDBFF388C570%40AM0P193MB0308.EURP193.PROD.OUTLOOK.COM
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

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


Re: Hosting recommendations please

2019-04-03 Thread Saurabh Jaiswal
Hey Mike,
Launch a digital ocean droplet with plesk 17.08 with decent specs and you
can run all your three websites with ease on it on a single droplet.
You would have to setup apache mod_wsgi on it and you will be good to go.
If you need help do let me know.
I have been running my django projects without any hiccups.

On Wed, Apr 3, 2019 at 12:02 PM Mike Dewhirst  wrote:

> Thank you everyone for your recommendations. I have decided to see what
> DigitalOcean feels like.
>
> Cheers
>
> Mike
>
> On 2/04/2019 6:08 pm, Mike Dewhirst wrote:
> > I have to move three Django websites away from my current VM service
> > provider by the end of April because he is going out of the VM business.
> >
> > One is a plain Mezzanine CMS on one VM running Nginx/Gunicorn and the
> > other two are on the second VM running Apache and mod_wsgi.
> >
> > I'm most familiar with Ubuntu 16.04 and hope to go to 18.04.
> >
> > I think the RAM requirements are around 4GB for the Apache sites and
> > half that for Nginx. Haven't done any profiling.
> >
> > I'm in Australia. I'm after stability and reliability and if I'm
> > lucky, scalability.
> >
> > If you have any negative comments about providers please send them
> > off-list.
> >
> > Many thanks
> >
> > 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 post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/d9f02ffd-7c55-3ce4-f5a6-40f499aaa52f%40dewhirst.com.au
> .
> For more options, visit https://groups.google.com/d/optout.
>

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


Re: Django inbuilt server

2019-04-03 Thread PASCUAL Eric
Hi,

Chances are that you're thinking about "runserver", which is a management 
command. On Unix based systems (i.e. Linux or MacOS) you start it with :

./manage.py runserver

I'm not exactly sure about Windows, but it should be something as :

python manage.py runserver

Warning : as stressed in the documentation, this is not a server to be used in 
production and it is reserved to development and local tests.

Eric


From: django-users@googlegroups.com  on behalf 
of primeshs...@cse.mrt.ac.lk 
Sent: Tuesday, April 2, 2019 14:36
To: Django users
Subject: Django inbuilt server

Hello, I'm a new django user. Can someone please tell me what is the name of 
django inbuilt server is? I went throughout the internet but I couldn't find a 
proper answer.

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 post to this group, send email to 
django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/1cd87cfb-9b2f-4b02-a2e0-4cb494318532%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

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


Re: Hosting recommendations please

2019-04-03 Thread Mike Dewhirst
Thank you everyone for your recommendations. I have decided to see what 
DigitalOcean feels like.


Cheers

Mike

On 2/04/2019 6:08 pm, Mike Dewhirst wrote:
I have to move three Django websites away from my current VM service 
provider by the end of April because he is going out of the VM business.


One is a plain Mezzanine CMS on one VM running Nginx/Gunicorn and the 
other two are on the second VM running Apache and mod_wsgi.


I'm most familiar with Ubuntu 16.04 and hope to go to 18.04.

I think the RAM requirements are around 4GB for the Apache sites and 
half that for Nginx. Haven't done any profiling.


I'm in Australia. I'm after stability and reliability and if I'm 
lucky, scalability.


If you have any negative comments about providers please send them 
off-list.


Many thanks

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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/d9f02ffd-7c55-3ce4-f5a6-40f499aaa52f%40dewhirst.com.au.
For more options, visit https://groups.google.com/d/optout.