Re: 3719: 'utf8' is currently an alias for the character set UTF8MB3, which will be replaced by UTF8MB4 - When using MySQL sakila and world DB examples

2018-07-12 Thread Ram Munjuluri
Downgrading to 5.7.7 and installing "mysql-connector-python 8.0.11" through 
pip fixed the issue.
Is this because the mysql-connector-python from MySQL/Oracle does not work 
with their own MySQL 8.0.11 version?


thanks
-Ram
On Friday, July 13, 2018 at 9:18:39 AM UTC+5:30, Ram Munjuluri wrote:
>
> thanks Melvyn. let me try to downgrade to MySQL 5.7.7 first.
>
>
>
> On Friday, July 13, 2018 at 3:13:23 AM UTC+5:30, Melvyn Sopacua wrote:
>>
>> On donderdag 12 juli 2018 19:27:23 CEST Ram Munjuluri wrote: 
>>
>> > from django.db import models 
>> > # Unable to inspect table 'city' 
>> > *# The error was: (3719, "3719: 'utf8' is currently an alias for the 
>> > character set UTF8MB3, which will be replaced by UTF8MB4 in a future 
>> > release. Please consider using UTF8MB4 in order to be unambiguous.", 
>> None)* 
>> > 
>> > Any suggestion here please? I seem to be stuck here. 
>>
>> Downgrade to MySQL 5.x or patch PyMySQL. More info: 
>> https://github.com/PyMySQL/PyMySQL/issues/690 
>>
>> -- 
>> Melvyn Sopacua 
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"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/9fa45c4b-1eec-4d08-ab95-004d91647bca%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: 3719: 'utf8' is currently an alias for the character set UTF8MB3, which will be replaced by UTF8MB4 - When using MySQL sakila and world DB examples

2018-07-12 Thread Ram Munjuluri
thanks Melvyn. let me try to downgrade to MySQL 5.7.7 first.



On Friday, July 13, 2018 at 3:13:23 AM UTC+5:30, Melvyn Sopacua wrote:
>
> On donderdag 12 juli 2018 19:27:23 CEST Ram Munjuluri wrote: 
>
> > from django.db import models 
> > # Unable to inspect table 'city' 
> > *# The error was: (3719, "3719: 'utf8' is currently an alias for the 
> > character set UTF8MB3, which will be replaced by UTF8MB4 in a future 
> > release. Please consider using UTF8MB4 in order to be unambiguous.", 
> None)* 
> > 
> > Any suggestion here please? I seem to be stuck here. 
>
> Downgrade to MySQL 5.x or patch PyMySQL. More info: 
> https://github.com/PyMySQL/PyMySQL/issues/690 
>
> -- 
> Melvyn Sopacua 
>

-- 
You received this message because you are subscribed to the Google Groups 
"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/9781ea56-868f-4084-b063-50ba9b35e0fd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: 3719: 'utf8' is currently an alias for the character set UTF8MB3, which will be replaced by UTF8MB4 - When using MySQL sakila and world DB examples

2018-07-12 Thread Melvyn Sopacua
On donderdag 12 juli 2018 19:27:23 CEST Ram Munjuluri wrote:

> from django.db import models
> # Unable to inspect table 'city'
> *# The error was: (3719, "3719: 'utf8' is currently an alias for the
> character set UTF8MB3, which will be replaced by UTF8MB4 in a future
> release. Please consider using UTF8MB4 in order to be unambiguous.", None)*
> 
> Any suggestion here please? I seem to be stuck here.

Downgrade to MySQL 5.x or patch PyMySQL. More info:
https://github.com/PyMySQL/PyMySQL/issues/690

-- 
Melvyn Sopacua

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


Re: About UserCreationForm

2018-07-12 Thread MICHAEL EBEBE
Please sir Pava
Are you on any social network if yes ya details as in username and how
your profile look
So that we can interact more and closer together
Please

On 7/12/18, Matthew Pava  wrote:
> Because it’s actually django.contrib.auth.forms  …with an s.
>
> From: django-users@googlegroups.com [mailto:django-users@googlegroups.com]
> On Behalf Of abhishek dadhich
> Sent: Thursday, July 12, 2018 1:43 PM
> To: Django users
> Subject: About UserCreationForm
>
> I want to use UserCreationForm but I can't import the form. When I'm
> importing UserCreationForm from django.contrib.auth.form it will show that
> "ModuleNotFoundError: No module named 'django.contrib.auth.form' " How do I
> solve it?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to
> django-users+unsubscr...@googlegroups.com.
> To 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/f416fc71-5f99-47f6-8093-7b63109fc934%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/ffdc4b494566443f931344d0da00bbe6%40ISS1.ISS.LOCAL.
> 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/CAGzuFWGNFn9pjadRgZ3RG1caLCDs3%3DOphpMb4xGMLDrABtkuow%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: I made my first Django app, its goal is to generate a styleguide from your scss files

2018-07-12 Thread Melvyn Sopacua
On donderdag 12 juli 2018 17:13:52 CEST Carlo Ascani wrote:
> Il giorno gio 12 lug 2018 alle ore 16:44 Melvyn Sopacua
> 
>  ha scritto:
> > First and foremost: awesome job.
> 
> Thank you!
> 
> > On donderdag 12 juli 2018 14:38:16 CEST Carlo Ascani wrote:
> > > More details, if interested:
> > > https://gitlab.com/2pxsolidblack/django-marple
> > 
> > Your requirements.txt is a straight dump of pip freeze, including the `-e
> > .`. That's not maintainable.
> 
> mmm that requirements.txt is needed only for the demo project,
> I suppose I could leave that out from the package...?

It's convention that requirements.txt is for the project. You could leave it 
out, or you could rename it to requirements-demo.txt so it's clear what it's 
for. Would also make setting up "my own demo" easier.

> > I would worry about scaling: it's rather large in setup, so if for
> > instance I would load bootstrap 4's scss, would this be a gigantic long
> > page and menu?
> That's an amazing feedback, will work on that, thank you!

Related:
Normally, I setup:
scss/bootstrap.scss scss/bootstrap/variables.scss scss/bootstrap/color-
variables.scss and maybe a few others that override the standard bootstrap 
settings and reference the package files in node_modules/ for the originals.

I wouldn't need documentation on the original bootstrap files, in fact, I'd 
like my style guide to show only the files in scss/* not references in those 
files to locations outside of it.

Maybe a little more complex so a long term goal for you :)

-- 
Melvyn Sopacua

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


Re: formaction vs get_absolute_url

2018-07-12 Thread clavierplayer
Relevant urls:

app_name = "utils"
urlpatterns = [
path('', index, name="index"),
path('', index, name="index"),
path('migrate/', migrate, name="migrate"),

# -- Box Opt Evaluation urls --
path('box-optimization/instructions', instruct, name='instructions'),
path('box-optimization/add-items/', 
AddItemsToEvaluateCreateView.as_view(), name='evaluate'),
path('box-optimization/new-test-case', create_new_test_case, 
name='new-case'),
path('box-optimization/results/', 
EvaluateResultsUpdateView.as_view(), name='results')
]


On Thursday, July 12, 2018 at 4:04:25 PM UTC-4, clavie...@gmail.com wrote:
>
> I'm looking for a way to redirect to a different page depending upon which 
> submit button the user clicks. I included a formaction tag in the template, 
> but django still demands that get_absolute_url be defined. Using Django 2.0
>
> Basically, I'm trying to write a small app that launches a test case, 
> which would allow a non-programmer to evaluate a small section of code 
> responsible for a background process. The app should allow the user to add 
> as many test items to it as they wish, one at a time. When an item is 
> added, they can choose to click and 'evaluate' button or an 'add more 
> items' button, and each button should go to a different page--basically, 
> 'add more items' should refresh the same page. Clicking on 'add more items' 
> does indeed post the data to the database, but it ignores the formaction 
> tag. The stack trace says that form_valid is calling get_absolute_url on 
> the model (which I have not defined), but the target url has to do with 
> what the user wants to do next with said model, not the model itself. I 
> haven't figured out how to override the get_absolute_url call based on 
> which html button was clicked. (Though it also said I can provide an url, 
> which I did on the template...)
>
> (The code I'm pasting below may be a little awkward because I've been 
> finding workarounds for things by trial and error; so if anything 
> particularly egregious catches someone's eye, comments to that end are 
> welcome.)
>
> Problem view:
>
> class AddItemsToEvaluateCreateView(CreateView, FormMixin):
> model = ItemsTestCollection
> form_class = EnterItem
> template_name = 'utils\evaluate.html'
>
> def get_queryset(self):
> return ItemsTestCollection.objects.filter(case_id=self.kwargs['pk'])
>
> def get_object(self, queryset=None):
> return EvaluateTestCase.objects.get(pk=self.kwargs['pk'])
>
> def get_context_data(self, **kwargs):
> context = super().get_context_data()
> context['case_id'] = self.kwargs['pk']
> context['items_in_order'] = 
> ItemsTestCollection.objects.filter(case_id=self.kwargs['pk'])
> return context
>
>
> Problem models:
>
> class ItemsTestCollection(models.Model):
> """An item to be tested in Box Opt."""
> item = models.ForeignKey('item.Item', on_delete=models.CASCADE)
> qty = models.IntegerField()
> case = models.ForeignKey('EvaluateTestCase', on_delete=models.CASCADE)
> box = models.ForeignKey('BoxResults', on_delete=models.CASCADE, null=True)
>
>
> class EvaluateTestCase(models.Model):
> """Individual test cases."""
>
> STATUS = (
> ('no', 'Something bad happened,'),
> ('hm', 'Needs improvement.'),
> ('ok', 'Seems all right.')
> )
>
> verdict = models.CharField(max_length=2, choices=STATUS, blank=False, 
> null=True)
> feedback = models.TextField(blank=True, null=True)
>
> def get_absolute_url(self):
> return reverse('utils:evaluate', kwargs={'pk': str(self.id)})
>
> @staticmethod
> def get_item_lots(case_number: int):
> """Get the first ItemLot for each item in the EvaluateTestCase."""
> item_lots: List[ItemLot] = []
> for item_collection in 
> ItemsTestCollection.objects.filter(case_id=case_number):
> 
> item_lots.append(ItemLot.objects.filter(item=item_collection.item)[0])
>
> return item_lots
>
>
>
> Problem template:
>
> 
> {% csrf_token %}
> 
> 
> Item #: 
> 
> 
> 
> Qty: 
> 
> 
> 
> Case: 
> 
> 
> 
>  value="Add more items" />
>  value="Optimize" />
> 
>
>
>
> Error:
> ImproperlyConfigured at /utils/box-optimization/add-items/75
>
> No URL to redirect to.  Either provide a url or define a get_absolute_url 
> method on the Model.
>
> Request Method: POST
> Request URL: http://localhost:8000/utils/box-optimization/add-items/75
> Django Version: 2.0.5
> Exception Type: ImproperlyConfigured
> Exception Value: 
>
> No URL to redirect to.  Either provide a url or define a get_absolute_url 
> method on the Model.
>
> Exception Location: 
> C:\miniconda3\envs\django\lib\site-packages\django\views\generic\edit.py 
> in get_success_url, line 119
> Python Executable: 

formaction vs get_absolute_url

2018-07-12 Thread clavierplayer
I'm looking for a way to redirect to a different page depending upon which 
submit button the user clicks. I included a formaction tag in the template, 
but django still demands that get_absolute_url be defined. Using Django 2.0

Basically, I'm trying to write a small app that launches a test case, which 
would allow a non-programmer to evaluate a small section of code 
responsible for a background process. The app should allow the user to add 
as many test items to it as they wish, one at a time. When an item is 
added, they can choose to click and 'evaluate' button or an 'add more 
items' button, and each button should go to a different page--basically, 
'add more items' should refresh the same page. Clicking on 'add more items' 
does indeed post the data to the database, but it ignores the formaction 
tag. The stack trace says that form_valid is calling get_absolute_url on 
the model (which I have not defined), but the target url has to do with 
what the user wants to do next with said model, not the model itself. I 
haven't figured out how to override the get_absolute_url call based on 
which html button was clicked. (Though it also said I can provide an url, 
which I did on the template...)

(The code I'm pasting below may be a little awkward because I've been 
finding workarounds for things by trial and error; so if anything 
particularly egregious catches someone's eye, comments to that end are 
welcome.)

Problem view:

class AddItemsToEvaluateCreateView(CreateView, FormMixin):
model = ItemsTestCollection
form_class = EnterItem
template_name = 'utils\evaluate.html'

def get_queryset(self):
return ItemsTestCollection.objects.filter(case_id=self.kwargs['pk'])

def get_object(self, queryset=None):
return EvaluateTestCase.objects.get(pk=self.kwargs['pk'])

def get_context_data(self, **kwargs):
context = super().get_context_data()
context['case_id'] = self.kwargs['pk']
context['items_in_order'] = 
ItemsTestCollection.objects.filter(case_id=self.kwargs['pk'])
return context


Problem models:

class ItemsTestCollection(models.Model):
"""An item to be tested in Box Opt."""
item = models.ForeignKey('item.Item', on_delete=models.CASCADE)
qty = models.IntegerField()
case = models.ForeignKey('EvaluateTestCase', on_delete=models.CASCADE)
box = models.ForeignKey('BoxResults', on_delete=models.CASCADE, null=True)


class EvaluateTestCase(models.Model):
"""Individual test cases."""

STATUS = (
('no', 'Something bad happened,'),
('hm', 'Needs improvement.'),
('ok', 'Seems all right.')
)

verdict = models.CharField(max_length=2, choices=STATUS, blank=False, 
null=True)
feedback = models.TextField(blank=True, null=True)

def get_absolute_url(self):
return reverse('utils:evaluate', kwargs={'pk': str(self.id)})

@staticmethod
def get_item_lots(case_number: int):
"""Get the first ItemLot for each item in the EvaluateTestCase."""
item_lots: List[ItemLot] = []
for item_collection in 
ItemsTestCollection.objects.filter(case_id=case_number):

item_lots.append(ItemLot.objects.filter(item=item_collection.item)[0])

return item_lots



Problem template:


{% csrf_token %}


Item #: 



Qty: 



Case: 









Error:
ImproperlyConfigured at /utils/box-optimization/add-items/75

No URL to redirect to.  Either provide a url or define a get_absolute_url 
method on the Model.

Request Method: POST
Request URL: http://localhost:8000/utils/box-optimization/add-items/75
Django Version: 2.0.5
Exception Type: ImproperlyConfigured
Exception Value: 

No URL to redirect to.  Either provide a url or define a get_absolute_url 
method on the Model.

Exception Location: 
C:\miniconda3\envs\django\lib\site-packages\django\views\generic\edit.py 
in get_success_url, line 119
Python Executable: C:\miniconda3\envs\django\python.exe
Python Version: 3.6.5
Python Path: 

['C:\\WMS Repository\\Warehouse Management System',
 'C:\\WMS Repository\\Warehouse Management System',
 'C:\\miniconda3\\envs\\django\\python36.zip',
 'C:\\miniconda3\\envs\\django\\DLLs',
 'C:\\miniconda3\\envs\\django\\lib',
 'C:\\miniconda3\\envs\\django',
 'C:\\Users\\heast\\AppData\\Roaming\\Python\\Python36\\site-packages',
 'C:\\miniconda3\\envs\\django\\lib\\site-packages',
 'C:\\Program Files\\JetBrains\\PyCharm '
 '2017.3.3\\helpers\\pycharm_matplotlib_backend']

Server time: Thu, 12 Jul 2018 15:47:04 -0400

Environment:


Request Method: POST
Request URL: http://localhost:8000/utils/box-optimization/add-items/75

Django Version: 2.0.5
Python Version: 3.6.5
Installed Applications:
['item.apps.ItemConfig',
 'inventory.apps.InventoryConfig',
 'fulfillment.apps.FulfillmentConfig',
 'manifest.apps.ManifestConfig',
 'order.apps.OrderConfig',
 

Re: Weighing Scale & TCP IP connectivity

2018-07-12 Thread Thomas G Lockhart
You can use Django REST framework to get data into Django and a separate Python 
(or other) program to feed it in. Have the Python program connect to the scale 
and use whatever mechanisms are required there to get your data.

If the scale has a browser interface, then use urllib to read a page and then 
use BeautifulSoup to rummage through it and pick out the weight etc. Then push 
it using json into your REST endpoint.

hth

- Tom


> On Jul 11, 2018, at 11:26 PM, ERICK OMONDI AYARA  wrote:
> 
> Hello, I would like to capture weight from a weighing scale using 
> TCP/Ethernet cable into a django app. If anyone can advice on how to use 
> sockets or any other means to make this work, will be appreciated. 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/ee33e49e-67d5-491a-a113-09fbd5290d56%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/FEBBB7C6-7CF7-4E11-9372-ED957E4AD0DF%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: About UserCreationForm

2018-07-12 Thread abhishek dadhich
Thanks, Buddy I Really forgot 'S'

On Friday, July 13, 2018 at 12:24:54 AM UTC+5:30, Matthew Pava wrote:
>
> Because it’s actually django.contrib.auth.forms  …with an *s*.
>
>  
>
> *From:* django...@googlegroups.com  [mailto:
> django...@googlegroups.com ] *On Behalf Of *abhishek dadhich
> *Sent:* Thursday, July 12, 2018 1:43 PM
> *To:* Django users
> *Subject:* About UserCreationForm
>
>  
>
> I want to use UserCreationForm but I can't import the form. When I'm 
> importing UserCreationForm from django.contrib.auth.form it will show that 
> "ModuleNotFoundError: No module named 'django.contrib.auth.form' " How do I 
> solve it?
>
>  
>
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to django-users...@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/f416fc71-5f99-47f6-8093-7b63109fc934%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/7a990958-f3ad-47d7-9fe5-f8e1bb1e540a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


RE: About UserCreationForm

2018-07-12 Thread Matthew Pava
Because it’s actually django.contrib.auth.forms  …with an s.

From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On 
Behalf Of abhishek dadhich
Sent: Thursday, July 12, 2018 1:43 PM
To: Django users
Subject: About UserCreationForm

I want to use UserCreationForm but I can't import the form. When I'm importing 
UserCreationForm from django.contrib.auth.form it will show that 
"ModuleNotFoundError: No module named 'django.contrib.auth.form' " How do I 
solve it?

--
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to 
django-users+unsubscr...@googlegroups.com.
To 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/f416fc71-5f99-47f6-8093-7b63109fc934%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/ffdc4b494566443f931344d0da00bbe6%40ISS1.ISS.LOCAL.
For more options, visit https://groups.google.com/d/optout.


About UserCreationForm

2018-07-12 Thread abhishek dadhich
I want to use UserCreationForm but I can't import the form. When I'm 
importing UserCreationForm from django.contrib.auth.form it will show that 
"ModuleNotFoundError: No module named 'django.contrib.auth.form' " How do I 
solve it?
 

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


3719: 'utf8' is currently an alias for the character set UTF8MB3, which will be replaced by UTF8MB4 - When using MySQL sakila and world DB examples

2018-07-12 Thread Ram Munjuluri
Hello all,

I posted this question with a different subject line and thought  I would 
re-post here with the error.

I am using

MySQL 8.0
Python 3.6.5
Django 2.0.7

When I run 

>* python manage.py inspectdb --database world cit**y*

I get the following error message. Has someone come across this error 
before? I have dropped the schema and recreated it, but to no effect.


# This is an auto-generated Django model module.
# You'll have to do the following manually to clean this up:
#   * Rearrange models' order
#   * Make sure each model has one field with primary_key=True
#   * Make sure each ForeignKey has `on_delete` set to the desired behavior.
#   * Remove `managed = False` lines if you wish to allow Django to create, 
modify, and delete the table
# Feel free to rename the models, but don't rename db_table values or field 
names.
from django.db import models
# Unable to inspect table 'city'
*# The error was: (3719, "3719: 'utf8' is currently an alias for the 
character set UTF8MB3, which will be replaced by UTF8MB4 in a future 
release. Please consider using UTF8MB4 in order to be unambiguous.", None)*

Any suggestion here please? I seem to be stuck here.

Appreciate it.

kind regards
-Ram

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


Re: Accessing Django through ssh tunneling and error to get status

2018-07-12 Thread Dikus Extrange
Hi Jason. Thank you for your reply. I tried with your suggestion. 

Django complained about putting then name of my laptop and its domain in 
allowed hosts (I had to put 'localhost' and '127.0.0.1' before). So I put 
it in settings.py and the. Result is the same with the same message. 

El jueves, 12 de julio de 2018, 13:27:50 (UTC+2), Jason escribió:
>
> you should use *0.0.0.0* for the ip address rather than 127.0.0.1
>
> On Thursday, July 12, 2018 at 7:22:33 AM UTC-4, Dikus Extrange wrote:
>>
>> Hi everyone. I'm accessing to a Django application through a ssh tunnel 
>> with putty as client. I run the server with ./manage.py run server 
>> 127.0.0.1:8000 and it starts right but launching an infinite and 
>> annoying message:
>>
>> Not found: /http:/127.0.0.1:8000/status
>> [12/Jul/2018 10:02:59] "GET 
>> http://127.0.0.1:8000/status?plain=b64_os_username=RE1Dx=1
>>  
>> HTTP/1.1" 404 1768
>> ...
>> ...
>>
>> Could anyone tell me if it's a bug of Django, a missconfiguration or what?
>>
>> Running the server without ssh tunneling is OK. I had to add 
>> localhost.localdomain and 127.0.0.1 to allowed hosts in settings.py.
>>
>> Django version 2.0.6.
>>
>> Thank you in advance. 
>> Dikus
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"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/a42794fb-e9d8-4aa5-8e22-3180e4ef53eb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


RE: Pass empty slug field in urls

2018-07-12 Thread Matthew Pava
The error is due to not having a slug.  You’ll have to create a URL path to 
/restaurants/ if you want to allow an empty slug.

From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On 
Behalf Of Can Hicabi Tartanoglu
Sent: Thursday, July 12, 2018 5:06 AM
To: Django users
Subject: Pass empty slug field in urls

Hello.

I am trying to make this system work:

Restaurant/views.py:

class SearchRestaurantListView(ListView):
# template_name = 'restaurants/restaurantlocation_list.html'

def get_queryset(self):
print(self.kwargs)
slug = self.kwargs.get("slug")
if slug:
print("working")
queryset = RestaurantLocation.objects.filter(
Q(category__iexact=slug) | Q(category__icontains=slug)
)
else:
queryset = RestaurantLocation.objects.all()
return queryset

urls.py:

path('restaurants//', SearchRestaurantListView.as_view())

When the slug field is empty the debugger states it couldn't find 
'restaurants/', the statement above should work no? Appearently not. Please help
--
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to 
django-users+unsubscr...@googlegroups.com.
To 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/9671ccb3-51e6-41d0-b461-7def9dc2425f%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/b468e38a9d534a128beabf75caeb9f47%40ISS1.ISS.LOCAL.
For more options, visit https://groups.google.com/d/optout.


Re: I made my first Django app, its goal is to generate a styleguide from your scss files

2018-07-12 Thread Carlo Ascani
Il giorno gio 12 lug 2018 alle ore 16:44 Melvyn Sopacua
 ha scritto:
>
> First and foremost: awesome job.
>

Thank you!

> On donderdag 12 juli 2018 14:38:16 CEST Carlo Ascani wrote:
>
> > More details, if interested: https://gitlab.com/2pxsolidblack/django-marple
>
> Your requirements.txt is a straight dump of pip freeze, including the `-e .`.
> That's not maintainable.

mmm that requirements.txt is needed only for the demo project,
I suppose I could leave that out from the package...?

>
> I would worry about scaling: it's rather large in setup, so if for instance I
> would load bootstrap 4's scss, would this be a gigantic long page and menu?
>

That's an amazing feedback, will work on that, thank you!

> Keep at it!
> --
> Melvyn Sopacua
>
> --
> 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/UJC8jOEQQ5o/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/2153578.lO0Rj1njIq%40fritzbook.
> For more options, visit https://groups.google.com/d/optout.



-- 
Carlo Ascani aka carloratm

http://carlo.ratm.gitlab.io
carloratm@freenode

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


Re: I made my first Django app, its goal is to generate a styleguide from your scss files

2018-07-12 Thread Melvyn Sopacua
First and foremost: awesome job.

On donderdag 12 juli 2018 14:38:16 CEST Carlo Ascani wrote:

> More details, if interested: https://gitlab.com/2pxsolidblack/django-marple

Your requirements.txt is a straight dump of pip freeze, including the `-e .`. 
That's not maintainable.

I would worry about scaling: it's rather large in setup, so if for instance I 
would load bootstrap 4's scss, would this be a gigantic long page and menu?

Keep at it!
-- 
Melvyn Sopacua

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


Re: How to verify if is new record or update record on django template?

2018-07-12 Thread Jani Tiainen
Hi.

Usually you know that in a view. Url routing will be different depending if
it's a new record or editing old record.

to 12. heinäk. 2018 klo 16.58 Fellipe Henrique 
kirjoitti:

> How to verify if is new record or update record on django template? How
> can i do that?
>
> Thanks!
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAF1jwZH40f%3D3ATxVSNx8Ku%3DWiG1MxnN%3D89MLw-5%2B-iNuEu9uQA%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/CAHn91oentkeMFQE5L1uLx%2BdS5JTNu0Otaxzc78HB_srrv4-9Uw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


How to verify if is new record or update record on django template?

2018-07-12 Thread Fellipe Henrique
How to verify if is new record or update record on django template? How can
i do that?

Thanks!

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


I made my first Django app, its goal is to generate a styleguide from your scss files

2018-07-12 Thread Carlo Ascani
Hi all,

I just made my very first django reusable application.
Its goal is to create a styleguide starting from your scss files.

I would say that it is very frontend-developers-oriented (as I am).

More details, if interested: https://gitlab.com/2pxsolidblack/django-marple

Best,
Carlo

-- 
You received this message because you are subscribed to the Google Groups 
"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/04032c2e-610f-4258-9030-d49ee8e87196%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Accessing Django through ssh tunneling and error to get status

2018-07-12 Thread Jason
you should use *0.0.0.0* for the ip address rather than 127.0.0.1

On Thursday, July 12, 2018 at 7:22:33 AM UTC-4, Dikus Extrange wrote:
>
> Hi everyone. I'm accessing to a Django application through a ssh tunnel 
> with putty as client. I run the server with ./manage.py run server 
> 127.0.0.1:8000 and it starts right but launching an infinite and annoying 
> message:
>
> Not found: /http:/127.0.0.1:8000/status
> [12/Jul/2018 10:02:59] "GET 
> http://127.0.0.1:8000/status?plain=b64_os_username=RE1Dx=1
>  
> HTTP/1.1" 404 1768
> ...
> ...
>
> Could anyone tell me if it's a bug of Django, a missconfiguration or what?
>
> Running the server without ssh tunneling is OK. I had to add 
> localhost.localdomain and 127.0.0.1 to allowed hosts in settings.py.
>
> Django version 2.0.6.
>
> Thank you in advance. 
> Dikus
>

-- 
You received this message because you are subscribed to the Google Groups 
"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/1e18a423-ceaa-4843-a138-7ec72c0f0671%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Pass empty slug field in urls

2018-07-12 Thread Can Hicabi Tartanoglu
Hello.

I am trying to make this system work:

Restaurant/views.py:

class SearchRestaurantListView(ListView):
# template_name = 'restaurants/restaurantlocation_list.html'

def get_queryset(self):
print(self.kwargs)
slug = self.kwargs.get("slug")
if slug:
print("working")
queryset = RestaurantLocation.objects.filter(
Q(category__iexact=slug) | Q(category__icontains=slug)
)
else:
queryset = RestaurantLocation.objects.all()
return queryset


urls.py:

path('restaurants//', SearchRestaurantListView.as_view())


When the slug field is empty the debugger states it couldn't find 
'restaurants/', the statement above should work no? Appearently not. Please 
help

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


Weighing Scale & TCP IP connectivity

2018-07-12 Thread ERICK OMONDI AYARA
Hello, I would like to capture weight from a weighing scale using 
TCP/Ethernet cable into a django app. If anyone can advice on how to use 
sockets or any other means to make this work, will be appreciated. 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/ee33e49e-67d5-491a-a113-09fbd5290d56%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


ERROR - server - Error trying to receive messages: name 'txredisapi' is not defined

2018-07-12 Thread Hank Chu

>
> 2018-07-12 17:35:08,070 - INFO - worker - Listening on channels 
> http.request, websocket.connect, websocket.disconnect, websocket.receive
> 2018-07-12 17:35:08,072 - INFO - server - HTTP/2 support not enabled 
> (install the http2 and tls Twisted extras)
> 2018-07-12 17:35:08,075 - INFO - server - Using native Twisted mode on 
> channel layer
> 2018-07-12 17:35:08,075 - INFO - server - Listening on endpoint 
> tcp:port=80:interface=10.144.1.123
> 2018-07-12 17:35:08,077 - ERROR - server - Error trying to receive 
> messages: name 'txredisapi' is not defined
> 2018-07-12 17:35:13,079 - ERROR - server - Error trying to receive 
> messages: name 'txredisapi' is not defined


Can someone help me to fix this problem?

this my django's setting.py

> redis_host = '10.144.1.123'
> CHANNEL_LAYERS = {
> "default": {
> "BACKEND": "asgi_redis.RedisChannelLayer", 
> "CONFIG": {
> "hosts": [(redis_host, 6379)],
> },
>"ROUTING": "coverage_wabsys_py3.routing.channel_routing",
> },
> }

-- 
You received this message because you are subscribed to the Google Groups 
"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/e3405fbd-1f5a-407b-a18e-138f53a2fe6e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Accessing Django through ssh tunneling and error to get status

2018-07-12 Thread Dikus Extrange
Hi everyone. I'm accessing to a Django application through a ssh tunnel 
with putty as client. I run the server with ./manage.py run server 
127.0.0.1:8000 and it starts right but launching an infinite and annoying 
message:

Not found: /http:/127.0.0.1:8000/status
[12/Jul/2018 10:02:59] "GET 
http://127.0.0.1:8000/status?plain=b64_os_username=RE1Dx=1 
HTTP/1.1" 404 1768
...
...

Could anyone tell me if it's a bug of Django, a missconfiguration or what?

Running the server without ssh tunneling is OK. I had to add 
localhost.localdomain and 127.0.0.1 to allowed hosts in settings.py.

Django version 2.0.6.

Thank you in advance. 
Dikus

-- 
You received this message because you are subscribed to the Google Groups 
"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/10c768a5-25ea-4a9a-81a9-dc5226dcb0e7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


How to Filter Window Function (Lag/Lead) for FloatField

2018-07-12 Thread Gabriel Lima de Oliveira
Hi all. Carlton suggested I should ask this here, as stated at 
https://code.djangoproject.com/ticket/29561#ticket

Please, I'd like to know how to filter using new django 2.0 window 
functions. Something similar to this beautiful and simple example 

. 

Given a table

db=> SELECT * FROM weather ORDER BY day DESC;
daytemperaturerainy
2014-04-08 20.0 f
2014-04-07 20.0 f
2014-04-06 16.0 t
2014-04-05 16.0 t
2014-04-04 16.0 t
2014-04-03 22.0 f
2014-04-02 22.0 f
2014-04-01 22.0 t

I'd like to show dates only if the temperature changed:
daytemperature
2014-04-08 20.0
2014-04-06 16.0
2014-04-03 22.0

On pure PostgreSQL, this translates to:

SELECT
w1.day, w1.temperatureFROM
(SELECT
w2.day,
w2.temperature,
lead(w2.temperature) OVER (ORDER BY w2.day DESC) as prev_temp
 FROM
weather w2
 ORDER BY
w2.day DESC) as w1WHERE
w1.temp IS DISTINCT FROM w1.prev_tempORDER BY
w1.day DESC;


I could accomplish the inner query by using the new Window Functions:

Weather.objects.annotate(prev_temp=Window(expression=Lead('temperature'), 
order_by=F('day').desc()))


Now my problem is use this annotation to filter only when temperature 
differs from prev_temp
(in order to accomplish something similar to the "temperature IS DISTINCT 
FROM prev_temp")

When I try to use the available filters, the following errors occurs:

Weather.objects.annotate(prev_temp=Window(expression=Lead('temperature'), 
order_by=F('day').desc())).order_by('-day').filter(temperature__ne=F('prev_temp'))


Gives the error: 

FieldError: Unsupported lookup 'ne' for FloatField or join on the field not 
permitted.


Another try:

Weather.objects.annotate(prev_temp=Window(expression=Lead('temperature'), 
order_by=F('day').desc())).order_by('-day').filter(~Q(temperature=F('prev_temp'


Gives the error: 

ProgrammingError: window functions are not allowed in WHERE


It's in fact a PostgreSQL error, because the generated SQL query tries to 
pass the LAG function inside the where clause.

How may I accomplish that, even if I have to use the extra fields, or even 
RawSQL class ?


Right now I'm doing:

with connection.cursor() as c:
c.execute('SELECT q.day, q.temperature FROM (%s) AS q WHERE q.temperature 
IS DISTINCT FROM q.prev_temp' % 
str(Weather.objects.annotate(prev_temp=Window(expression=Lead('temperature'), 
order_by=F('day').desc())).order_by('-day').values('day','temperature', 
'prev_temp').query))
result = c.fetchall()


Important to note that I couldn't use the str(queryset.query) as parameter 
to the c.execute. I had to do a python replace.


I.e, had to use ('...%s...' % parameter) instead of c.execute ('...%s...', 
[parameter])


Thank you all in advance. 

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


Re: What is the best route to take to build a general CMS using Django?

2018-07-12 Thread Jason
then prefix that in your question.  your initial posting comes across as 
someone who did little initial research and wanted someone else to do the 
work. 

On Wednesday, July 11, 2018 at 10:52:41 PM UTC-4, afj afj wrote:
>
> I already saw some results for this search but what I found was another 
> whole framework to make even a simple CMS such as django-cms or wagtail
> so what I want to know is is there any guidance to make just a simple CMS?
>
> On Thursday, July 12, 2018 at 5:39:20 AM UTC+3, mark wrote:
>>
>> The point of my response was to let the original author know that he/she 
>> should do some basic research first and then ask a more specific question. 
>> A general question like the one in the subject line is pretty much a wast 
>> of everyone's time, imo.
>>
>> Mark 
>>
>> On Wed, Jul 11, 2018 at 6:24 PM, mottaz hejaze  
>> wrote:
>>
>>> i think we can all use google mark . thanks for the good knowledge
>>>
>>> On Thu, 12 Jul 2018, 02:48 Mark Phillips,  
>>> wrote:
>>>

 https://www.google.com/search?q=What+is+the+best+route+to+take+to+build+a+general+CMS+using+Django%3F=What+is+the+best+route+to+take+to+build+a+general+CMS+using+Django%3F=chrome..69i57j69i60.948j0j9=chrome=UTF-8

 On Wed, Jul 11, 2018 at 5:21 PM, afj afj  wrote:

> --- 
>
> -- 
> You received this message because you are subscribed to the Google 
> Groups "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send 
> an email to django-users...@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/9b74041c-b869-49c7-a5a0-836bdcd9aad1%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...@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/CAEqej2Piz7gnoKvgYTaP1Wjx9Y1Ud0-ecre-DMpGSD3SwBBs3A%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...@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/CAHV4E-ehvW9dxiGD3phywPByQ_JoN6MkvwAw13aGXjNH5Tagjg%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/f7b6ebf7-f561-424f-969d-1f9db4916b6b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Need help for DJango on Windows server with MS SQL Server 2012

2018-07-12 Thread Jason
To answer your first question, that's wehre you look into the project's 
compatibility documentation and do your own research.

Second question: that is a complete unknown, as you're asking us to be 
fortune tellers and be able to tell the future.

In essence, both of your questions can be answered by doing proper research 
and investigation, both beforehand as well as during update problems.

On Wednesday, July 11, 2018 at 6:08:58 PM UTC-4, gurmeetka...@gmail.com 
wrote:
>
> Hi All,
>
> Me and my team will be developing our first application in Python and we 
> will be using SQL Server as backend. I wanted to ask one query regarding 
> the versions of Python that have been developed and the ones that are in 
> development.
>
> If we use the current available version of the Python and DJango like - 
> Django version - 2.0.7 and Python version - 3.7.0 and Django-msssql - 1.8 
> version.
>
> My first question is : Will they work with Sql Server 2012 and will they 
> be compatible working on Windows server?
>
> My second question(and the most important one) is: If all goes well and we 
> deploy application and because of some new feature or for some technical 
> reason, we need to update Python but that updation breaks some existing 
> issue then what could be the possible solution? In other words, if the 
> older version (on which our website is working) is not compatible then what 
> can be done in that case?
>
> Please suggest. It would be of great help if you could help me with the 
> response ASAP.
>
> Thanks in advance.
>
>
>
>
>
> Thanks,
> Gurmeet Kaur
>

-- 
You received this message because you are subscribed to the Google Groups 
"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/484308ac-6534-436f-89fc-7a9053380271%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Needs help

2018-07-12 Thread Kasper Laudrup

Hi Umar,

On 2018-07-12 12:28, Umar Kambala wrote:

That's what I have been trying since, but it's not going through



What have you been trying? I have no idea what you are replying to here?

Kind regards,

Kasper Laudrup

--
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To 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/5f46bc05-ece6-e0ca-71b7-8202612a0c43%40stacktrace.dk.
For more options, visit https://groups.google.com/d/optout.


Re: Needs help

2018-07-12 Thread Umar Kambala
That's what I have been trying since, but it's not going through
On Jul 12, 2018 9:01 AM, "Mike Dewhirst"  wrote:

> Try http://127.0.0.1:8000
>
> On 12/07/2018 6:40 PM, Umar Kambala wrote:
>
>>
>> Kasper thanks for your brotherly advice, please I will be glad next time
>> u add me a link. But I came across another error, when I run python
>> manage.py runserver everything work find but when I enter 127.0.0.1 I gets
>> "no internet connection" do I hv to be connected wit internet before I can
>> access de local server?
>>
>> On Jul 9, 2018 11:57 AM, "Kasper Laudrup" > laud...@stacktrace.dk>> wrote:
>>
>> Hi Umar.
>>
>> On 07/09/2018 01:52 PM, Umar Kambala wrote:
>>
>>
>> This is the error
>>
>> url(r'^$', views.home, name='home')
>> attributeError: module 'boards.views' has no attribute 'home'
>>
>>
>> Do you know what a Python module is and what an attribute on a
>> module means? Then the answer is obvious.
>>
>> Try to read up on that.
>>
>> Kind regards,
>>
>> Kasper Laudrup
>>
>> -- You received this message because you are subscribed to the
>> Google
>> Groups "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it,
>> send an email to django-users+unsubscr...@googlegroups.com
>> .
>> To 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/9a2b1e04-5f45
>> -ecd5-6d43-17f247a6836c%40stacktrace.dk
>> > 5-ecd5-6d43-17f247a6836c%40stacktrace.dk>.
>> 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 > 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/ms
>> gid/django-users/CAPkbFbYeTZU6G0rtcpQ9Cgm6qf--cD-
>> JfhO4dwNYHD-eUjr_fw%40mail.gmail.com > sgid/django-users/CAPkbFbYeTZU6G0rtcpQ9Cgm6qf--cD-
>> JfhO4dwNYHD-eUjr_fw%40mail.gmail.com?utm_medium=email_source=footer>.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit https://groups.google.com/d/ms
> gid/django-users/429e7c72-256a-23b7-762d-4adb5a6c8d69%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/CAPkbFbapP897y%2BG_rOUQozTY95PvrPvRF4%3D%3D08yOPiM5GZqmGw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Needs help

2018-07-12 Thread Kasper Laudrup

Hi Umar,

On 2018-07-12 10:40, Umar Kambala wrote:
Kasper thanks for your brotherly advice, please I will be glad next time 
u add me a link.


As I mentioned before, I think you should pick up a beginner book on 
Python programming.


I personally read a book called "Dive into Python" some years ago which 
was quite good although it might be slightly outdated now. But that book 
is for someone who already has experience with other programming 
languages, which doesn't seem to be your case, so I couldn't recommend 
that in your case.


Anyway, there are tons of tutorials on Python programming for beginners. 
I don't know which ones to recommend, but maybe someone else can be helpful.


> But I came across another error, when I run python
> manage.py runserver everything work find but when I enter 127.0.0.1 I
> gets "no internet connection" do I hv to be connected wit internet
> before I can access de local server?
>

You've already asked that question and someone else already gave you an 
answer. I cannot help debugging your internet connection. Ask you ISP or 
wherever you get your connection from.


Kind regards,

Kasper Laudrup

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


Re: Beginner

2018-07-12 Thread Harsh Rawat
So basically I need to write the documentation regarding what should be the
apt name for the feature and what packages come installed with django
initially .

On Thu, Jul 12, 2018, 11:41 AM Harsh Rawat  wrote:

> Thanks a lot .
>
> On Thu, Jul 12, 2018, 3:11 AM 'Anthony Flury' via Django users <
> django-users@googlegroups.com> wrote:
>
>> On 10/07/18 14:06, Harsh Rawat wrote:
>> > Identifying a useful name means ?
>> >
>> Let's say you have identified a great group of packages which you can
>> install and provides Django friendly Shopping cart.
>>
>> It would be better for that group of packages to be installed by :
>>
>>  pip install Django['shopping-cart']
>>
>> rather than say :
>>
>>  pip install Django[anthony]
>>
>>
>> while 'anthony' is a perfectly fine name (my parents definitely liked
>> it), it isn't particularly useful in this case; if you saw that in an
>> installation script you would wonder why Django was being installed
>> using that option, but 'shopping-cart' is at least helpful in terms for
>> describing the functionality you might get.
>>
>>
>>
>> > --
>> > You received this message because you are subscribed to the Google
>> > Groups "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/785cb34c-4099-4213-9aef-2c81a5a21ef7%40googlegroups.com
>> > <
>> https://groups.google.com/d/msgid/django-users/785cb34c-4099-4213-9aef-2c81a5a21ef7%40googlegroups.com?utm_medium=email_source=footer
>> >.
>> > For more options, visit https://groups.google.com/d/optout.
>>
>>
>> --
>> --
>> Anthony Flury
>> email : *anthony.fl...@btinternet.com*
>> Twitter : *@TonyFlury *
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "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/11a73dce-a6ad-e16e-eec4-8551f088ee54%40btinternet.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/CALd6sVMQr7M9_UuZM28c9McObDiSUv51hugk816KncHxvt6Q_A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Needs help

2018-07-12 Thread Mike Dewhirst

Try http://127.0.0.1:8000

On 12/07/2018 6:40 PM, Umar Kambala wrote:


Kasper thanks for your brotherly advice, please I will be glad next 
time u add me a link. But I came across another error, when I run 
python manage.py runserver everything work find but when I enter 
127.0.0.1 I gets "no internet connection" do I hv to be connected wit 
internet before I can access de local server?


On Jul 9, 2018 11:57 AM, "Kasper Laudrup" > wrote:


Hi Umar.

On 07/09/2018 01:52 PM, Umar Kambala wrote:


This is the error

url(r'^$', views.home, name='home')
attributeError: module 'boards.views' has no attribute 'home'


Do you know what a Python module is and what an attribute on a
module means? Then the answer is obvious.

Try to read up on that.

Kind regards,

Kasper Laudrup

-- 
You received this message because you are subscribed to the Google

Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it,
send an email to django-users+unsubscr...@googlegroups.com
.
To 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/9a2b1e04-5f45-ecd5-6d43-17f247a6836c%40stacktrace.dk

.
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/CAPkbFbYeTZU6G0rtcpQ9Cgm6qf--cD-JfhO4dwNYHD-eUjr_fw%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/429e7c72-256a-23b7-762d-4adb5a6c8d69%40dewhirst.com.au.
For more options, visit https://groups.google.com/d/optout.


Re: Needs help

2018-07-12 Thread Umar Kambala
Kasper thanks for your brotherly advice, please I will be glad next time u
add me a link. But I came across another error, when I run python manage.py
runserver everything work find but when I enter 127.0.0.1 I gets "no
internet connection" do I hv to be connected wit internet before I can
access de local server?
On Jul 9, 2018 11:57 AM, "Kasper Laudrup"  wrote:

> Hi Umar.
>
> On 07/09/2018 01:52 PM, Umar Kambala wrote:
>
>>
>> This is the error
>>
>> url(r'^$', views.home, name='home')
>> attributeError: module 'boards.views' has no attribute 'home'
>>
>>
> Do you know what a Python module is and what an attribute on a module
> means? Then the answer is obvious.
>
> Try to read up on that.
>
> Kind regards,
>
> Kasper Laudrup
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To 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/ms
> gid/django-users/9a2b1e04-5f45-ecd5-6d43-17f247a6836c%40stacktrace.dk.
> 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/CAPkbFbYeTZU6G0rtcpQ9Cgm6qf--cD-JfhO4dwNYHD-eUjr_fw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Beginner

2018-07-12 Thread Harsh Rawat
Thanks a lot .

On Thu, Jul 12, 2018, 3:11 AM 'Anthony Flury' via Django users <
django-users@googlegroups.com> wrote:

> On 10/07/18 14:06, Harsh Rawat wrote:
> > Identifying a useful name means ?
> >
> Let's say you have identified a great group of packages which you can
> install and provides Django friendly Shopping cart.
>
> It would be better for that group of packages to be installed by :
>
>  pip install Django['shopping-cart']
>
> rather than say :
>
>  pip install Django[anthony]
>
>
> while 'anthony' is a perfectly fine name (my parents definitely liked
> it), it isn't particularly useful in this case; if you saw that in an
> installation script you would wonder why Django was being installed
> using that option, but 'shopping-cart' is at least helpful in terms for
> describing the functionality you might get.
>
>
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "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/785cb34c-4099-4213-9aef-2c81a5a21ef7%40googlegroups.com
> > <
> https://groups.google.com/d/msgid/django-users/785cb34c-4099-4213-9aef-2c81a5a21ef7%40googlegroups.com?utm_medium=email_source=footer
> >.
> > For more options, visit https://groups.google.com/d/optout.
>
>
> --
> --
> Anthony Flury
> email : *anthony.fl...@btinternet.com*
> Twitter : *@TonyFlury *
>
> --
> You received this message because you are subscribed to the Google Groups
> "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/11a73dce-a6ad-e16e-eec4-8551f088ee54%40btinternet.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/CALd6sVO4APGqc7prf534JOP%2B477OQZ1OHocwuXH_6n76M6O6hw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: What is the best route to take to build a general CMS using Django?

2018-07-12 Thread Carlo Ascani
Il giorno gio 12 lug 2018 alle ore 04:53 afj afj
 ha scritto:
>
> I already saw some results for this search but what I found was another whole 
> framework to make even a simple CMS such as django-cms or wagtail
> so what I want to know is is there any guidance to make just a simple CMS?

django-cms and wagtail are not a `whole framework`, they are django
applications which can be integrated in any Django project.



>
> On Thursday, July 12, 2018 at 5:39:20 AM UTC+3, mark wrote:
>>
>> The point of my response was to let the original author know that he/she 
>> should do some basic research first and then ask a more specific question. A 
>> general question like the one in the subject line is pretty much a wast of 
>> everyone's time, imo.
>>
>> Mark
>>
>> On Wed, Jul 11, 2018 at 6:24 PM, mottaz hejaze  wrote:
>>>
>>> i think we can all use google mark . thanks for the good knowledge
>>>
>>> On Thu, 12 Jul 2018, 02:48 Mark Phillips,  
>>> wrote:

 https://www.google.com/search?q=What+is+the+best+route+to+take+to+build+a+general+CMS+using+Django%3F=What+is+the+best+route+to+take+to+build+a+general+CMS+using+Django%3F=chrome..69i57j69i60.948j0j9=chrome=UTF-8

 On Wed, Jul 11, 2018 at 5:21 PM, afj afj  wrote:
>
> ---
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to django-users...@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/9b74041c-b869-49c7-a5a0-836bdcd9aad1%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...@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/CAEqej2Piz7gnoKvgYTaP1Wjx9Y1Ud0-ecre-DMpGSD3SwBBs3A%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...@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/CAHV4E-ehvW9dxiGD3phywPByQ_JoN6MkvwAw13aGXjNH5Tagjg%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/489f8080-11ba-45c6-8295-41bc16c4857c%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



-- 
Carlo Ascani aka carloratm

http://carlo.ratm.gitlab.io
carloratm@freenode

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