Two things ...

Look at the error near the bottom of the traceback and notice it says there is 
a syntax faux pas on line 21 of one of your files. If you find and fix that 
python will advance to your next error - if any.

And

runserver is asking you to Ctrl-c and do python manage.py migrate 
--settings=<mysite.settings>

This will ensure your database matches all the models in your project including 
Django's own models.

Connected by Motorola

Emil Lilja <emil.fpli...@gmail.com> wrote:

>Hey,
>
>Thanks for your reply!
>
>So yeah i did the tutorial from scratch again and noticed like you were aiming 
>at that the server was actually running. Even though the tutorial clearly 
>states that you should get the following output when running runserver, I only 
>seem to get this after i terminate with Ctrl+C:
>Performing system checks... System check identified no issues (0 silenced). 
>You have unapplied migrations; your app may not work properly until they are 
>applied. Run 'python manage.py migrate' to apply them. August 03, 2019 - 
>15:50:53 Django version 2.2, using settings 'mysite.settings' Starting 
>development server at http://127.0.0.1:8000/ Quit the server with CONTROL-C.
>
>Anyways i realised why the server probably isn't running, I've created the 
>polls app and followed all the steps (copied code exactly) and i get a 
>SyntaxError?
>What's causing this?
>
>body, pre { margin: 0; padding: 0; } pre { font-family: inherit; } #vt100 { 
>float: left; border: 0px solid; padding: 1px; line-height: 111%; font-size: 
>9pt; font-family: 'Lucida Console', 'Lucida Console ', 'Consolas'; color: 
>#BFBFBF; background-color: #000000; } .bd { font-weight: bold } .it { 
>font-style: italic } .ul { text-decoration-line: underline } .st { 
>text-decoration-line: line-through } .lu { text-decoration-line: line-through 
>underline } .fg-color0 { color: #000000 } .bg-color0 { background-color: 
>#000000 } .fg-color1 { color: #BF0000 } .bg-color1 { background-color: #BF0000 
>} .fg-color2 { color: #00BF00 } .bg-color2 { background-color: #00BF00 } 
>.fg-color3 { color: #BFBF00 } .bg-color3 { background-color: #BFBF00 } 
>.fg-color4 { color: #0000BF } .bg-color4 { background-color: #0000BF } 
>.fg-color5 { color: #BF00BF } .bg-color5 { background-color: #BF00BF } 
>.fg-color6 { color: #00BFBF } .bg-color6 { background-color: #00BFBF } 
>.fg-color7 { color: #BFBFBF } .bg-color7 { background-color: #BFBFBF } 
>.fg-color8 { color: #404040 } .bg-color8 { background-color: #404040 } 
>.fg-color9 { color: #FF4040 } .bg-color9 { background-color: #FF4040 } 
>.fg-color10 { color: #40FF40 } .bg-color10 { background-color: #40FF40 } 
>.fg-color11 { color: #FFFF40 } .bg-color11 { background-color: #FFFF40 } 
>.fg-color12 { color: #6060FF } .bg-color12 { background-color: #6060FF } 
>.fg-color13 { color: #FF40FF } .bg-color13 { background-color: #FF40FF } 
>.fg-color14 { color: #40FFFF } .bg-color14 { background-color: #40FFFF } 
>.fg-color15 { color: #FFFFFF } .bg-color15 { background-color: #FFFFFF } 
>.cursor { background-color: #BFBFBF } .font10 { font-family: 'F25 Blackletter 
>Typewriter' } 
>
>$ python manage.py runserver Watching for file changes with StatReloader 
>### I Press Ctrl+C and get the following output: 
>Exception in thread django-main-thread: Traceback (most recent call last): 
>File "C:\Anaconda3\lib\threading.py", line 917, in _bootstrap_inner self.run() 
>File "C:\Anaconda3\lib\threading.py", line 865, in run 
>self._target(*self._args, **self._kwargs) File 
>"C:\Anaconda3\lib\site-packages\django\utils\autoreload.py", line 54, in 
>wrapper fn(*args, **kwargs) File 
>"C:\Anaconda3\lib\site-packages\django\core\management\commands\runserver.py", 
>line 117, in inner_run self.check(display_num_errors=True) File 
>"C:\Anaconda3\lib\site-packages\django\core\management\base.py", line 390, in 
>check include_deployment_checks=include_deployment_checks, File 
>"C:\Anaconda3\lib\site-packages\django\core\management\base.py", line 377, in 
>_run_check s return checks.run_checks(**kwargs) File 
>"C:\Anaconda3\lib\site-packages\django\core\checks\registry.py", line 72, in 
>run_checks new_errors = check(app_configs=app_configs) File 
>"C:\Anaconda3\lib\site-packages\django\core\checks\urls.py", line 13, in 
>check_url_confi g return check_resolver(resolver) File 
>"C:\Anaconda3\lib\site-packages\django\core\checks\urls.py", line 23, in 
>check_resolver return check_method() File 
>"C:\Anaconda3\lib\site-packages\django\urls\resolvers.py", line 398, in check 
>for pattern in self.url_patterns: File 
>"C:\Anaconda3\lib\site-packages\django\utils\functional.py", line 80, in 
>__get__ res = instance.__dict__[self.name] = self.func(instance) File 
>"C:\Anaconda3\lib\site-packages\django\urls\resolvers.py", line 579, in 
>url_patterns patterns = getattr(self.urlconf_module, "urlpatterns", 
>self.urlconf_module) File 
>"C:\Anaconda3\lib\site-packages\django\utils\functional.py", line 80, in 
>__get__ res = instance.__dict__[self.name] = self.func(instance) File 
>"C:\Anaconda3\lib\site-packages\django\urls\resolvers.py", line 572, in 
>urlconf_module return import_module(self.urlconf_name) File 
>"C:\Anaconda3\lib\importlib\__init__.py", line 127, in import_module return 
>_bootstrap._gcd_import(name[level:], package, level) File "", line 1006, in 
>_gcd_import File "", line 983, in _find_and_load File "", line 967, in 
>_find_and_load_unlocked File "", line 677, in _load_unlocked File "", line 
>724, in exec_module File "", line 860, in get_code File "", line 791, in 
>source_to_code File "", line 219, in _call_with_frames_removed File 
>"C:\Users\Emil Lilja\Code\mysite\mysite\urls.py", line 21 path('admin/', 
>admin.site.urls), ^ SyntaxError: invalid syntax Performing system checks... 
>
>
>
>On Wednesday, August 7, 2019 at 5:02:22 AM UTC+2, Mike Dewhirst wrote:
>
>On 6/08/2019 10:32 pm, Emil Lilja wrote: 
>> Hey all, 
>> 
>> I realize I'm somewhat of a buffoon on the subject but I've tried 
>> learning Python on my free time the past couple months and want to get 
>> in to Django. 
>
>In my opinion that confirms you are not a buffoon but rather you are 
>strategically right on the money. 
>
>> So after following the tutorial and trying to launch the server with: 
>> /python mange.py runserver /all i get is /Watching for files with 
>> StatReloader/ and it never moves in from there unless i terminate with 
>> ctrl+c. Feels like I'm missing something fundamental, can anyone shed 
>> some light? 
>
>Have you tried launching a browser and visiting http://localhost:8000/ 
>
>
>> 
>> 
>> -- 
>> You received this message because you are subscribed to the Google 
>> Groups "Django users" group. 
>> To unsubscribe from this group and stop receiving emails from it, send 
>> an email to django...@googlegroups.com 
>> <mailto:django-users+unsubscr...@googlegroups.com>. 
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/8670dcbf-c5ef-42be-8ece-9fc4f03a3ad3%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/django-users/8670dcbf-c5ef-42be-8ece-9fc4f03a3ad3%40googlegroups.com?utm_medium=email&utm_source=footer>.
>>  
>
>-- 
>You received this message because you are subscribed to the Google Groups 
>"Django users" group.
>To unsubscribe from this group and stop receiving emails from it, send an 
>email to django-users+unsubscr...@googlegroups.com.
>To view this discussion on the web visit 
>https://groups.google.com/d/msgid/django-users/599ad1e1-b380-4a36-b3f3-62cf4c69ada3%40googlegroups.com.

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

Reply via email to