Re: Render works but url does not change

2018-11-15 Thread Derrick Lu
This is my url.py








*app_name = 'springcity'urlpatterns = [url(r'^$', views.index, 
name='index'),url(r'^home/$', views.home, name='home'),
url(r'^portal/$', views.portal, name='portal'),
url(r'^ajax/cutlist/$', views.cutList, name='cutlist'),]*

This is my views.py

































*def home(request):if request.method == "POST":if 'Search' in 
request.POST:modelIn = request.POST['mid']db = 
get_object_or_404(PDetails, model=modelIn)form = 
calcForm()form.fields["stc"].initial = db.stc
form.fields["ocv"].initial = db.ocvform.fields["mppv"].initial 
= db.mppvform.fields["nvtc"].initial = db.nvtc
form.fields["mmppc"].initial = db.mmppc
form.fields["maxov"].initial = db.maxov
form.fields["maxc"].initial = db.maxcargs = {
'calcForm': form,}return render(request, 
'calculator/portal.html',args)else:if 'MInput' in 
request.POST:form = calcForm()args = 
{'calcForm': form,}
request.method = "GET"return render(request, 
'calculator/portal.html',args)   else:if request.method == 
"GET":objectlist = 
Brand.objects.all().order_by('brand')args = {
'objectlist': objectlist,}return 
render(request, 'calculator/home.html',args)*

Then this is my html that I start off with.





















































*{% extends 'calculator/index.html' %}{% block title %} Home {% endblock 
%}{% block link %}{% load staticfiles %}{% endblock %}{% block main %}
{% csrf_token %}Choose 
Company{% for brand in objectlist 
%}{{ brand.brand 
}}{% endfor %}


Choose 
ModelSearch

Manual Input
{% endblock %}*

On Friday, 16 November 2018 13:52:14 UTC+8, Joel wrote:
>
> Post details.. The url, your urls.py etc
>
> On Fri, 16 Nov, 2018, 8:05 AM Derrick Lu  
> wrote:
>
>> HI,
>> I am having trouble with url when rendering to a new page via a button.
>> The new page renders but the url does not reflect the new page.
>> Has anyone had that problem before?
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to django-users...@googlegroups.com .
>> To post to this group, send email to django...@googlegroups.com 
>> .
>> Visit this group at https://groups.google.com/group/django-users.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/8a745765-e3a8-4929-baae-b51ed922ae2d%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/81642d5b-a48a-45b8-b4ac-81d686b11f56%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Render works but url does not change

2018-11-15 Thread Joel
Post details.. The url, your urls.py etc

On Fri, 16 Nov, 2018, 8:05 AM Derrick Lu  HI,
> I am having trouble with url when rendering to a new page via a button.
> The new page renders but the url does not reflect the new page.
> Has anyone had that problem before?
>
> --
> You received this message because you are subscribed to the Google Groups
> "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/8a745765-e3a8-4929-baae-b51ed922ae2d%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/CAA%3Diw_8s46%3DSmDWA%3D4jGSuDsaSS-jGFL8OvdqjHpPTPZq%3DKfww%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Render works but url does not change

2018-11-15 Thread Derrick Lu
HI,
I am having trouble with url when rendering to a new page via a button.
The new page renders but the url does not reflect the new page.
Has anyone had that problem before?

-- 
You received this message because you are subscribed to the Google Groups 
"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/8a745765-e3a8-4929-baae-b51ed922ae2d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Migrations - moving model between apps

2018-11-15 Thread Simon Charette
Hello Matthew,

I'm going to assume no foreign keys are pointing to the model "Foo" you are
trying to move from the app "old" to "new". If it's the case then simply 
repoint
them and run makemigrations once the following steps are completed. You
could wrap the generated AlterField in SeparateDatabaseAndState to avoid
database level foreign key constraints reconstruction if it's critical to 
your
application.

Start by setting old.Foo.Meta.db_table = 'new_foo' and run makemigrations 
old.

That should generate you a new migration with an AlterModelTable('foo', 
'new_foo') operation.

Within this migration you'll want to add a DeleteModel('foo') operation 
wrapped in a
SeparateDatabaseAndState[0] after the AlterModelTable one. Your migration's 
operations
should look like:

operations = [
AlterModelTable('foo', 'new_foo'),
SeparateDatabaseAndState([], [DeleteModel('foo')]),
]

Now, move your "old.Foo" model definition to your "new" app, remove the
new.Foo.Meta.db_table and run "makemigrations new".

Edit the created "new" migration and wrap the CreateModel into a 
SeparateDatabaseAndState
and make sure the migration depends on the "old" migration you just 
created. You migration
should look like the following:

dependencies = [
('old', '000N_old_migration_name'),
]

operations = [
SeparateDatabaseAndState([], [
CreateModel('foo, ...)
)]),
]

Note that this will not take care of renaming the content types and 
permissions that
might have been created for your old.Foo model definition. You could use a 
RunPython
operation to rename them appropriately.

Cheers,
Simon

Le jeudi 15 novembre 2018 18:09:45 UTC-5, Matthew Pava a écrit :
>
> I’m moving a model to a different app in my project, and I want to keep 
> the same data that I already have.  I created a migration with a RunSQL 
> operation that simply renames the table with the new app prefix.  However, 
> when I run makemigrations, Django insists on adding a 
> migrations.CreateModel operation for me in the new app.  How do I avoid 
> that?
>

-- 
You received this message because you are subscribed to the Google Groups 
"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/20606f64-15b4-4946-bb3e-65276de63e40%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Migrations - moving model between apps

2018-11-15 Thread Matthew Pava
I'm moving a model to a different app in my project, and I want to keep the 
same data that I already have.  I created a migration with a RunSQL operation 
that simply renames the table with the new app prefix.  However, when I run 
makemigrations, Django insists on adding a migrations.CreateModel operation for 
me in the new app.  How do I avoid that?

-- 
You received this message because you are subscribed to the Google Groups 
"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/4959b2480e4044d8b48a74b22457d7a4%40iss2.ISS.LOCAL.
For more options, visit https://groups.google.com/d/optout.


Re: MySQL caching_sha2_password

2018-11-15 Thread Mamadou Harouna Diallo
Are install pymysql ? If aren't you need install it

Le jeu. 15 nov. 2018 18:19, Ansh Srivastava  a
écrit :

> Hi experts, I am tryin' to connect to MySQL database and the following
> error flashed!
>
> return Database.connect(**conn_params)
>   File
> "C:\Users\ansh\AppData\Local\Programs\Python\Python36\lib\site-packages\M
> ySQLdb\__init__.py", line 86, in Connect
> return Connection(*args, **kwargs)
>   File
> "C:\Users\ansh\AppData\Local\Programs\Python\Python36\lib\site-packages\M
> ySQLdb\connections.py", line 204, in __init__
> super(Connection, self).__init__(*args, **kwargs2)
> django.db.utils.OperationalError: (2059, "Authentication plugin
> 'caching_sha2_pa
> ssword' cannot be loaded: The specified module could not be found.\r\n")
>
> In the settings.py, I got following:
> DATABASES = {
> 'default': {
> 'ENGINE': 'django.db.backends.mysql',
> 'NAME': 'marvellous' ,
> 'USER': 'root@localhost',
> 'PASSWORD': 'prodot123',
> 'HOST':'127.0.0.1',
> 'PORT':'3306'
> }
> }
>
> Any help would be appreciated!
>
> [image: Mailtrack]
> 
>  Sender
> notified by
> Mailtrack
> 
>  11/15/18,
> 11:47:53 PM
>
> --
> You received this message because you are subscribed to the Google Groups
> "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/CAHMQ531U6DEiDpri8dqdR7N1SJmXAvpZ%3DMrNyXQ1OFcCB7FC3g%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/CAO73PDoDU7R2z7-xE0%2BQTZQmSQRrK%2BAqJSuDE_0_a61wPu7coQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: MySQL caching_sha2_password

2018-11-15 Thread Ansh Srivastava
Yes @Jason
 I am swamped with all those googling but nothin' found there!

[image: Mailtrack]

Sender
notified by
Mailtrack

11/16/18,
12:56:15 AM

On Fri, Nov 16, 2018 at 12:19 AM Jason  wrote:

> did you try googling the error?  a simple google query returned a number
> of possible avenues of investigation
>>
>> --
> You received this message because you are subscribed to the Google Groups
> "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/85aef7a0-7b9f-4262-838e-51392593eea9%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/CAHMQ530Dtkd-TU5qNDLtVQAN_sV6U5h-Rn%2BOCWNN%3DWNwb0C_%3DQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: python manage.py runserver

2018-11-15 Thread Mamadou Harouna Diallo
Are you active your virtuel env if you are use it ?
Or verify if you are in the folder where manage.py is ?

Le jeu. 15 nov. 2018 18:14,  a écrit :

> python manage.py runserver isnt running with me
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To 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/430cec4b-0301-44af-9654-a03eafec4fd5%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/CAO73PDqCX0Tghqz0nY-3p3wfZogRnt06HLN4AoE5zosp6efLQw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: MySQL caching_sha2_password

2018-11-15 Thread Jason
did you try googling the error?  a simple google query returned a number of 
possible avenues of investigation
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"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/85aef7a0-7b9f-4262-838e-51392593eea9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


MySQL caching_sha2_password

2018-11-15 Thread Ansh Srivastava
Hi experts, I am tryin' to connect to MySQL database and the following
error flashed!

return Database.connect(**conn_params)
  File
"C:\Users\ansh\AppData\Local\Programs\Python\Python36\lib\site-packages\M
ySQLdb\__init__.py", line 86, in Connect
return Connection(*args, **kwargs)
  File
"C:\Users\ansh\AppData\Local\Programs\Python\Python36\lib\site-packages\M
ySQLdb\connections.py", line 204, in __init__
super(Connection, self).__init__(*args, **kwargs2)
django.db.utils.OperationalError: (2059, "Authentication plugin
'caching_sha2_pa
ssword' cannot be loaded: The specified module could not be found.\r\n")

In the settings.py, I got following:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'marvellous' ,
'USER': 'root@localhost',
'PASSWORD': 'prodot123',
'HOST':'127.0.0.1',
'PORT':'3306'
}
}

Any help would be appreciated!

[image: Mailtrack]

Sender
notified by
Mailtrack

11/15/18,
11:47:53 PM

-- 
You received this message because you are subscribed to the Google Groups 
"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/CAHMQ531U6DEiDpri8dqdR7N1SJmXAvpZ%3DMrNyXQ1OFcCB7FC3g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: python manage.py runserver

2018-11-15 Thread Benjamin SOULAS
could you give us the context? what the error is?

Le jeu. 15 nov. 2018 19:14,  a écrit :

> python manage.py runserver isnt running with me
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To 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/430cec4b-0301-44af-9654-a03eafec4fd5%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/CABG7fFXxoMPaHWaGGnGHPCE-CL%2BBra1yNzUp7VhNTwu1AFSr%2Bw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


python manage.py runserver

2018-11-15 Thread fysaljackson
python manage.py runserver isnt running with me








































































-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To 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/430cec4b-0301-44af-9654-a03eafec4fd5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: How can we secure django python files for production release?

2018-11-15 Thread Andréas Kühne
The short answer:

You don't.

What is your use case? Why do you want to do this? Django is run on a
server and only the devops should have access to updating / looking at the
django files.

You CAN use only the pyc files - but it's more bother than it's worth and
the pyc files can be returned to py format as well.

Regards,

Andréas


Den tors 15 nov. 2018 kl 13:28 skrev HEMENDRA SINGH HADA <
hada.hemendr...@gmail.com>:

> As we know python is interpreted language and we've to give it in readable
> format ? But how we can secure those files for production release so
> customer can't change it or modify it ? As like in Bin in C++, jar in JAVA
> and .exe in .Net
>
>
> https://stackoverflow.com/questions/53313395/how-can-we-secure-django-python-files-for-production-release
>
> --
> You received this message because you are subscribed to the Google Groups
> "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/886b0ecc-f944-4088-b82a-945fc38a9fb3%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/CAK4qSCd%3DMBC-jbqF0%2BkKybi0mwfYSuoSJGNdgetYAyPXGp2yUg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: template

2018-11-15 Thread Аккозов Медер
App name(example "blog")/templates/app name again ("blog")/html file

чт, 15 нояб. 2018 г., 18:53 Scott Tresor scotttre...@gmail.com:

> hello how to user template for django
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To 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/c5d8df21-fb8c-4073-b1b9-b74c4debefa5%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/CACkQVwWfKAo-H_qayq0cG_5zsW6vpYfY55a7nBBG3ZvBc%2Bo3aQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: template

2018-11-15 Thread Nelson Varela
This is just a guess... but I think no... I am really sure you can 
find it. here:
https://docs.djangoproject.com/en/2.1/topics/templates/

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, 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/e3accace-4f3b-4b0a-a8e5-4ad2f548eed5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: template

2018-11-15 Thread Joel Mathew
Huh?




On Thu, 15 Nov 2018 at 18:23, Scott Tresor  wrote:

> hello how to user template for django
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To 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/c5d8df21-fb8c-4073-b1b9-b74c4debefa5%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/CAA%3Diw_9j-n671MnfaG7T9VEyGyrn3nrttzhyDorrUtWJ%3D2k5TA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: How to fix (2027, 'Malformed packet') exception?

2018-11-15 Thread prateek gupta
I am using mysqlclient 1.3.12.

On Thu 15 Nov, 2018, 6:20 PM Jason  its an issue with your mysql connection lib.  which one are you using?
>
> On Thursday, November 15, 2018 at 1:02:20 AM UTC-5, prateek gupta wrote:
>>
>> Hi All,
>>
>> I am facing a strange issue in my pre-prod server (in dev and uat it's
>> working fine).
>> Whenever I login in django admin and click on any table, it shows me
>> following error- (2027, 'Malformed packet')
>>
>> [image: db_error.JPG]
>>
>> Is there any db setting I am missing here or its is related to server
>> settings?
>> Has anyone faced this issue?
>>
>> Thanks,
>> Prateek
>>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Django users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/django-users/IDzHy2KEMg0/unsubscribe.
> To unsubscribe from this group and all its topics, 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/f810fe7a-7c66-4c70-98bd-372f712b387c%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/CAF44VH7SRr3zCwLuDUk%2B7HWFsHtUV2iSuFv-xjjTPL9c9-wpxg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


template

2018-11-15 Thread Scott Tresor
hello how to user template for django

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To 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/c5d8df21-fb8c-4073-b1b9-b74c4debefa5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: How to fix (2027, 'Malformed packet') exception?

2018-11-15 Thread Jason
its an issue with your mysql connection lib.  which one are you using?

On Thursday, November 15, 2018 at 1:02:20 AM UTC-5, prateek gupta wrote:
>
> Hi All,
>
> I am facing a strange issue in my pre-prod server (in dev and uat it's 
> working fine).
> Whenever I login in django admin and click on any table, it shows me 
> following error- (2027, 'Malformed packet')
>
> [image: db_error.JPG]
>
> Is there any db setting I am missing here or its is related to server 
> settings?
> Has anyone faced this issue?
>
> Thanks,
> Prateek
>

-- 
You received this message because you are subscribed to the Google Groups 
"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/f810fe7a-7c66-4c70-98bd-372f712b387c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Looking for Job in Django

2018-11-15 Thread Harish Soni
Preference is Bangalore but relocation is also not a big deal if it's good
opportunity.

On Thu, Nov 15, 2018, 5:58 PM Sameer Sharma  In which city you are looking for a job ?
>
> On Thursday, November 15, 2018 at 11:38:08 AM UTC+5:30, Harish Soni wrote:
>>
>> Hi All,
>> I'm looking for opportunity.
>>
>> Serving Notice Period .
>> More than 2+ year of experience.
>> E2E development knowledge, Team Management, Project Management,
>> Requirement Gathering and Solutioning
>>
>> Thanks & Regards
>>
>> Harish Soni Swarnkar | +91-766510
>>
>> --
> You received this message because you are subscribed to the Google Groups
> "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/1a0c8c5f-dfb4-4565-b65c-b3e9205035e7%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/CAMOFmokBHXXCPAN55pDX8-9yCzHwm-yQHwuKuP5h%2Brypa46LQg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Looking for Job in Django

2018-11-15 Thread Sameer Sharma
In which city you are looking for a job ? 

On Thursday, November 15, 2018 at 11:38:08 AM UTC+5:30, Harish Soni wrote:
>
> Hi All, 
> I'm looking for opportunity.
>
> Serving Notice Period .
> More than 2+ year of experience.
> E2E development knowledge, Team Management, Project Management, 
> Requirement Gathering and Solutioning
>
> Thanks & Regards
>
> Harish Soni Swarnkar | +91-766510
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"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/1a0c8c5f-dfb4-4565-b65c-b3e9205035e7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Fwd: Dead code: Vulture?

2018-11-15 Thread Lachlan Musicman
Hola,

I have inherited a Django 1.8 code base, which I'm updating to latest
release.

I was wondering if anyone has used a Dead Code or Unused Code finder, like
Vulture?

https://github.com/jendrikseipp/vulture

and if so, what their opinions on those tools were?

cheers
L.

--
'...postwork futures are dismissed with the claim that "it is not in our
nature to be idle", thereby demonstrating at once an essentialist view of
labor and an impoverished imagination of the possibilities of nonwork.'

Kathi Weeks, *The Problem with Work: Feminism, Marxism, Antiwork Politics
and Postwork Imaginaries*


-- 
You received this message because you are subscribed to the Google Groups 
"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/CAGBeqiM88LKt-Ao0fUuJDMRTNEAyxrkLeopew7KWJ6xkVdB%3Dqw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Custom queryset in a list_editable field of Admin changelist

2018-11-15 Thread Poorna Shashank
This has been very old and I had to search for it for a long time. Posting 
in case some one needs the answer to the same.

So, the way to do this would be to go via the ModelForm route where the 
querysets for each fields for each instance can be set separately

from django import forms

class MyModelForm(forms.ModelForm):
  def __init__(self, *args, **kwargs):
super(MyModelForm, self).__init__(*args, **kwargs)
instance = kwargs['instance']
self.fields['my_field'].queryset = MyFieldModel.objects.filter(...)

@admin.register(MyModel)
class MyModelAdmin(admin.ModelAdmin):
  list_display = ['foo_field', 'bar_field', 'my_field']
  list_editable = ('my_field',)
  
  def get_changelist_form(self, request, **kwargs):
return MyModelForm



On Thursday, 17 January 2013 00:18:09 UTC+5:30, Daniel França wrote:
>
> Hello,
> I'm using list_editable of a ModelAdmin to allow users change a 
> choicefield right in the changelist view.
>
> Ex:
> I've a list
>
> *Field1 Field2 ChoiceField*
> abc def foo
> ghj klm bar
>
> The idea is that ChoiceField is filled according to the *field1 *and *field2 
> *values, so the values filled in "foo" choicefield can be different than 
> in "bar" choicefield.
>
> But to filter this field this way I need to know some field values of the 
> instance I'm pointing.
> I'd tried to implement:
> def formfield_for_foreignkey(self, db_field, request=None, **kwargs):
> if db_field.name == 'my_field':
>kwargs['queryset'] = MyNewFiltter
>
> MyNewFilter is a filter based on fields values of the instance itself
> But it seems that the formfield_for_foreignkey is not created for a 
> specific instance, so I've no access to instance fields, is there some way 
> to do what I'm thinking about in Admin? If you've any other suggestions to 
> do that please let me know.
>
> Best Regards,
> -- 
> Daniel França,
> about.me/danielfranca
>

-- 
You received this message because you are subscribed to the Google Groups 
"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/fffd08a5-1054-4ca1-8be0-e4ed2ef3e132%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


How can we secure django python files for production release?

2018-11-15 Thread HEMENDRA SINGH HADA
As we know python is interpreted language and we've to give it in readable 
format ? But how we can secure those files for production release so 
customer can't change it or modify it ? As like in Bin in C++, jar in JAVA 
and .exe in .Net

https://stackoverflow.com/questions/53313395/how-can-we-secure-django-python-files-for-production-release

-- 
You received this message because you are subscribed to the Google Groups 
"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/886b0ecc-f944-4088-b82a-945fc38a9fb3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: How to solve django.db.utils.OperationalError: (2013, 'Lost connection to MySQL server during query')?

2018-11-15 Thread Krishnasagar Subhedarpage
Okay. Please check error logs of mysql. Its default
path: /var/log/mysql/error.log
Please look into any error signals for the same table into it. This could
give clue for root cause of issue.

Regards,
Krishnasagar Subhedarpage




On Thu, 15 Nov 2018 at 14:42, prateek gupta  wrote:

> Hi,
>
> My all db have 20 gb of size.
>
> On Thursday, November 15, 2018 at 12:27:27 PM UTC+5:30, Krishnasagar
> Subhedarpage wrote:
>>
>> Hi Prateek,
>>
>> Did you check disk info of server instance? What's disk consumption?
>>
>> Regards,
>> Krishnasagar Subhedarpage
>>
>>
>>
>>
>> On Thu, 15 Nov 2018 at 12:09, prateek gupta  wrote:
>>
>>> It is strange again, now I am getting the same error.
>>> Till morning it was working fine but now it is again showing same error.
>>>
>>> On Wednesday, November 14, 2018 at 7:07:46 PM UTC+5:30, Jason wrote:

 also, you might want to update your mysqlclient package.  1.3.12 was
 released over a year ago, and 1.3.13 was pushed out late June of this year.

>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Django users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to django-users...@googlegroups.com.
>>> To post to this group, send email to django...@googlegroups.com.
>>> Visit this group at https://groups.google.com/group/django-users.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/9bd1c72a-7c97-49b5-8a37-646e49dbc785%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/cf5bdd99-6e58-430f-85bd-6df249378f2c%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/CAChYJc91DPRP8cqk9bHn6nrK6PA64oo0Zz3kmxuN_AzOMJmdAA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: How to solve django.db.utils.OperationalError: (2013, 'Lost connection to MySQL server during query')?

2018-11-15 Thread vineeth sagar
Try reducing the connection max age to a lesser value like 3600 maybe?

On Nov 15, 2018 2:41 PM, "prateek gupta"  wrote:

> Hi,
>
> My all db have 20 gb of size.
>
> On Thursday, November 15, 2018 at 12:27:27 PM UTC+5:30, Krishnasagar
> Subhedarpage wrote:
>>
>> Hi Prateek,
>>
>> Did you check disk info of server instance? What's disk consumption?
>>
>> Regards,
>> Krishnasagar Subhedarpage
>>
>>
>>
>>
>> On Thu, 15 Nov 2018 at 12:09, prateek gupta  wrote:
>>
>>> It is strange again, now I am getting the same error.
>>> Till morning it was working fine but now it is again showing same error.
>>>
>>> On Wednesday, November 14, 2018 at 7:07:46 PM UTC+5:30, Jason wrote:

 also, you might want to update your mysqlclient package.  1.3.12 was
 released over a year ago, and 1.3.13 was pushed out late June of this year.

>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Django users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to django-users...@googlegroups.com.
>>> To post to this group, send email to django...@googlegroups.com.
>>> Visit this group at https://groups.google.com/group/django-users.
>>> To view this discussion on the web visit https://groups.google.com/d/ms
>>> gid/django-users/9bd1c72a-7c97-49b5-8a37-646e49dbc785%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/cf5bdd99-6e58-430f-85bd-6df249378f2c%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/CAMMZq8Ou8-Z8D80XLRDO80HpBfyEmPeXEy9E%3DjgF6JnVE5SC6A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: How to solve django.db.utils.OperationalError: (2013, 'Lost connection to MySQL server during query')?

2018-11-15 Thread prateek gupta
Hi,

My all db have 20 gb of size.

On Thursday, November 15, 2018 at 12:27:27 PM UTC+5:30, Krishnasagar 
Subhedarpage wrote:
>
> Hi Prateek,
>
> Did you check disk info of server instance? What's disk consumption?
>
> Regards, 
> Krishnasagar Subhedarpage
>
>
>
>
> On Thu, 15 Nov 2018 at 12:09, prateek gupta  > wrote:
>
>> It is strange again, now I am getting the same error.
>> Till morning it was working fine but now it is again showing same error.
>>
>> On Wednesday, November 14, 2018 at 7:07:46 PM UTC+5:30, Jason wrote:
>>>
>>> also, you might want to update your mysqlclient package.  1.3.12 was 
>>> released over a year ago, and 1.3.13 was pushed out late June of this year.
>>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to django-users...@googlegroups.com .
>> To post to this group, send email to django...@googlegroups.com 
>> .
>> Visit this group at https://groups.google.com/group/django-users.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/9bd1c72a-7c97-49b5-8a37-646e49dbc785%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/cf5bdd99-6e58-430f-85bd-6df249378f2c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.