Re: [Django] #34189: Code in Tutorial does not work because of a ', '

2022-11-29 Thread Django
#34189: Code in Tutorial does not work because of a ','
-+--
 Reporter:  Roger Rüttimann  |Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  Documentation|  Version:  4.1
 Severity:  Normal   |   Resolution:  invalid
 Keywords:   | Triage Stage:  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+--

Comment (by Roger Rüttimann):

 Actually your right, I tried to reprodcue it, but I can not. Now it's
 working either way, with or without the comma.
 Sorry for the unproductive ticket and thanks for the quick feedback!

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/01070184c3970734-ffee5c5d-8375-4b66-b4c6-16e97d72c56e-00%40eu-central-1.amazonses.com.


Re: [Django] #34189: Code in Tutorial does not work because of a ', '

2022-11-29 Thread Django
#34189: Code in Tutorial does not work because of a ','
-+--
 Reporter:  Roger Rüttimann  |Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  Documentation|  Version:  4.1
 Severity:  Normal   |   Resolution:  invalid
 Keywords:   | Triage Stage:  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+--

Comment (by Mariusz Felisiak):

 > I still think its a bug, because this happens when I copy paste the code
 of the tutorial and try to run the development server:

 Maybe there is a bug but not in the tutorial or Django itself, but in your
 code. You probably made some typo when copying code from the tutorial.
 Please use one of
 [https://code.djangoproject.com/wiki/TicketClosingReasons/UseSupportChannels
 support channels].

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/01070184c37cc2fe-e760bdfc-b976-4c69-b877-32a68dca4c68-00%40eu-central-1.amazonses.com.


Re: [Django] #34189: Code in Tutorial does not work because of a ', '

2022-11-29 Thread Django
#34189: Code in Tutorial does not work because of a ','
-+--
 Reporter:  Roger Rüttimann  |Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  Documentation|  Version:  4.1
 Severity:  Normal   |   Resolution:  invalid
 Keywords:   | Triage Stage:  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+--

Comment (by Roger Rüttimann):

 Thanks for the comment @Mariusz Felisiak, but even as the code might be
 valid python, I still think its a bug, because this happens when I copy
 paste the code of the tutorial and try to run the development server:


 {{{
 (cvmanager) ➜  cvmanager git:(main) ✗ python manage.py runserver
 Watching for file changes with StatReloader
 Performing system checks...

 Exception in thread django-main-thread:
 Traceback (most recent call last):
   File "/Users/rroger/py_virtualenvs/cvmanager/lib/python3.10/site-
 packages/django/urls/resolvers.py", line 717, in url_patterns
 iter(patterns)
 TypeError: 'module' object is not iterable

 The above exception was the direct cause of the following exception:

 Traceback (most recent call last):
   File
 
"/opt/homebrew/Cellar/python@3.10/3.10.8/Frameworks/Python.framework/Versions/3.10/lib/python3.10/threading.py",
 line 1016, in _bootstrap_inner
 self.run()
   File
 
"/opt/homebrew/Cellar/python@3.10/3.10.8/Frameworks/Python.framework/Versions/3.10/lib/python3.10/threading.py",
 line 953, in run
 self._target(*self._args, **self._kwargs)
   File "/Users/rroger/py_virtualenvs/cvmanager/lib/python3.10/site-
 packages/django/utils/autoreload.py", line 64, in wrapper
 fn(*args, **kwargs)
   File "/Users/rroger/py_virtualenvs/cvmanager/lib/python3.10/site-
 packages/django/core/management/commands/runserver.py", line 134, in
 inner_run
 self.check(display_num_errors=True)
   File "/Users/rroger/py_virtualenvs/cvmanager/lib/python3.10/site-
 packages/django/core/management/base.py", line 475, in check
 all_issues = checks.run_checks(
   File "/Users/rroger/py_virtualenvs/cvmanager/lib/python3.10/site-
 packages/django/core/checks/registry.py", line 88, in run_checks
 new_errors = check(app_configs=app_configs, databases=databases)
   File "/Users/rroger/py_virtualenvs/cvmanager/lib/python3.10/site-
 packages/django/core/checks/urls.py", line 14, in check_url_config
 return check_resolver(resolver)
   File "/Users/rroger/py_virtualenvs/cvmanager/lib/python3.10/site-
 packages/django/core/checks/urls.py", line 24, in check_resolver
 return check_method()
   File "/Users/rroger/py_virtualenvs/cvmanager/lib/python3.10/site-
 packages/django/urls/resolvers.py", line 495, in check
 messages.extend(check_resolver(pattern))
   File "/Users/rroger/py_virtualenvs/cvmanager/lib/python3.10/site-
 packages/django/core/checks/urls.py", line 24, in check_resolver
 return check_method()
   File "/Users/rroger/py_virtualenvs/cvmanager/lib/python3.10/site-
 packages/django/urls/resolvers.py", line 494, in check
 for pattern in self.url_patterns:
   File "/Users/rroger/py_virtualenvs/cvmanager/lib/python3.10/site-
 packages/django/utils/functional.py", line 57, in __get__
 res = instance.__dict__[self.name] = self.func(instance)
   File "/Users/rroger/py_virtualenvs/cvmanager/lib/python3.10/site-
 packages/django/urls/resolvers.py", line 725, in url_patterns
 raise ImproperlyConfigured(msg.format(name=self.urlconf_name)) from e
 django.core.exceptions.ImproperlyConfigured: The included URLconf '' does not
 appear to have any patterns in it. If you see the 'urlpatterns' variable
 with valid patterns in the file then the issue is probably caused by a
 circular import.
 }}}

 and without the ',' it works as expected. I think code in a tutorial
 should run without raisng exceptions.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/01070184c377032f-992b3ead-c8df-4a91-ba7e-8fe4fbc9fbb8-00%40eu-central-1.amazonses.com.


Re: [Django] #34189: Code in Tutorial does not work because of a ', '

2022-11-29 Thread Django
#34189: Code in Tutorial does not work because of a ','
-+--
 Reporter:  Roger Rüttimann  |Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  Documentation|  Version:  4.1
 Severity:  Normal   |   Resolution:  invalid
 Keywords:   | Triage Stage:  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+--
Changes (by Mariusz Felisiak):

 * status:  new => closed
 * resolution:   => invalid


Comment:

 `urlpatterns` is a list and this example is a valid Python code. Trac is
 not a support channel, so if you're having trouble understanding how
 Python/Django works, see TicketClosingReasons/UseSupportChannels for ways
 to get help.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/01070184c361ae2c-6a4b6150-a75e-44c0-ac71-bb31bb6a6e73-00%40eu-central-1.amazonses.com.


[Django] #34189: Code in Tutorial does not work because of a ','

2022-11-29 Thread Django
#34189: Code in Tutorial does not work because of a ','
-+
   Reporter:  rroger |  Owner:  nobody
   Type:  Bug| Status:  new
  Component:  Documentation  |Version:  4.1
   Severity:  Normal |   Keywords:
   Triage Stage:  Unreviewed |  Has patch:  0
Needs documentation:  0  |Needs tests:  0
Patch needs improvement:  0  |  Easy pickings:  0
  UI/UX:  0  |
-+
 Page: https://docs.djangoproject.com/en/4.1/intro/tutorial01/

 Code

 {{{
 from django.urls import path

 from . import views

 urlpatterns = [
 path('', views.index, name='index'),
 ]
 }}}

 the ',' at the end of path(...) needs to be removed, otherwise an
 exception is raised and the code does not work.

 it should be:


 {{{
 from django.urls import path

 from . import views

 urlpatterns = [
 path('', views.index, name='index')
 ]
 }}}


 I am sorry in case I violite some buge tracking conventions. I actually
 want to continue with the tutorial, but wanted to raise the issue. Thanks
 for the otherwise greate tutorial! :)

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/01070184c35b49f6-b38b490f-2f45-493e-ba89-95bbf9025518-00%40eu-central-1.amazonses.com.