Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • May 16 2015 16:59
    olasitarska commented #362
  • May 16 2015 16:59

    olasitarska on master

    Making post_detail.html more co… Merge pull request #362 from ve… (compare)

  • May 16 2015 16:59
    olasitarska closed #362
  • May 16 2015 16:57
    kvbik commented #362
  • May 16 2015 16:51
    veuu opened #362
  • May 16 2015 15:20
    hjwp commented #361
  • May 16 2015 15:16
    hjwp synchronize #361
  • May 16 2015 15:15
    hjwp synchronize #361
  • May 16 2015 15:12
    bmispelon commented #361
  • May 16 2015 15:08
    hjwp opened #361
  • May 16 2015 14:58
    bmispelon opened #360
  • May 16 2015 13:15
    bmispelon commented #359
  • May 16 2015 13:15

    bmispelon on master

    Provide alternative runserver c… Merge pull request #359 from Al… (compare)

  • May 16 2015 13:15
    bmispelon closed #359
  • May 16 2015 13:14
    keimlink commented #359
  • May 16 2015 13:13
    olasitarska commented #359
  • May 16 2015 13:09
    bmispelon commented #359
  • May 16 2015 11:53
    Almad opened #359
  • May 15 2015 20:00
    bmispelon commented #358
  • May 15 2015 19:59

    bmispelon on master

    fixing broken github link Merge pull request #358 from gs… (compare)

Raphael Das Gupta
@das-g
Is that mysite/urls.py or blog/urls.py?
Ankit Kumar Pandey
@ankitkpandey1
blog/urls.py
image.png
this one mysite/urls.py...
Raphael Das Gupta
@das-g
Well, the error message seems to indicate that views is being used in C:\dev\myproject\v\Scripts\mysite\mysite\urls.py on line 22.
Ankit Kumar Pandey
@ankitkpandey1
image.png
urls.py in mysite doesn't use views directly...maybe its because it is importing blog.urls which has some problems?
image.png
this is full error
_init.py in mysite is empty and still it's getting dragged in this whole ordeal for some reason
sergeichukes
@sergeichukes

Hi!
I can't run my app on pythonanywhere.com (local app runs and works fine)

Error log from pythonanywhere:

2020-01-21 15:59:42,342: Error running WSGI application
2020-01-21 15:59:42,355: NameError: name 'BASE_DIR' is not defined
2020-01-21 15:59:42,355:   File "/var/www/sergeichukes_pythonanywhere_com_wsgi.py", line 15, in <module>
2020-01-21 15:59:42,355:     application = get_wsgi_application()
2020-01-21 15:59:42,355: 
2020-01-21 15:59:42,355:   File "/home/sergeichukes/sergeichukes.pythonanywhere.com/myenv/Lib/site-packages/django/core/wsgi.py", line 12, in get_wsgi_application
2020-01-21 15:59:42,355:     django.setup(set_prefix=False)
2020-01-21 15:59:42,356: 
2020-01-21 15:59:42,356:   File "/home/sergeichukes/sergeichukes.pythonanywhere.com/myenv/Lib/site-packages/django/__init__.py", line 19, in setup
2020-01-21 15:59:42,356:     configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)
2020-01-21 15:59:42,356: 
2020-01-21 15:59:42,356:   File "/home/sergeichukes/sergeichukes.pythonanywhere.com/myenv/Lib/site-packages/django/conf/__init__.py", line 79, in __getattr__
2020-01-21 15:59:42,356:     self._setup(name)
2020-01-21 15:59:42,357: 
2020-01-21 15:59:42,357:   File "/home/sergeichukes/sergeichukes.pythonanywhere.com/myenv/Lib/site-packages/django/conf/__init__.py", line 66, in _setup
2020-01-21 15:59:42,357:     self._wrapped = Settings(settings_module)
2020-01-21 15:59:42,357: 
2020-01-21 15:59:42,357:   File "/home/sergeichukes/sergeichukes.pythonanywhere.com/myenv/Lib/site-packages/django/conf/__init__.py", line 157, in __init__
2020-01-21 15:59:42,357:     mod = importlib.import_module(self.SETTINGS_MODULE)
2020-01-21 15:59:42,358: 
2020-01-21 15:59:42,358:   File "/home/sergeichukes/sergeichukes.pythonanywhere.com/myenv/Lib/site-packages/isort/__init__.py", line 25, in <module>
2020-01-21 15:59:42,358:     from . import settings  # noqa: F401
2020-01-21 15:59:42,358: 
2020-01-21 15:59:42,358:   File "/home/sergeichukes/sergeichukes.pythonanywhere.com/myenv/Lib/site-packages/isort/settings.py", line 359, in <module>
2020-01-21 15:59:42,358:     STATIC_ROOT = os.path.join(BASE_DIR, 'static')
2020-01-21 15:59:42,358: ***************************************************
2020-01-21 15:59:42,358: If you're seeing an import error and don't know why,
2020-01-21 15:59:42,359: we have a dedicated help page to help you debug: 
2020-01-21 15:59:42,359: https://help.pythonanywhere.com/pages/DebuggingImportError/
2020-01-21 15:59:42,359: ***************************************************

And here's my mysite/settings.py:

https://github.com/sergeichukes/first-blog/blob/master/mysite/settings.py

AnonZebra
@AnonZebra
sergeichukes: What the error is saying is that for some reason, the BASE_DIR variable isn't defined. But the error is happening in a weird location, it seems to say that the error stems from "/home/sergeichukes/sergeichukes.pythonanywhere.com/myenv/Lib/site-packages/isort/settings.py". That seems to be an internal settings file for venv/virtual environment functionality. So that "settings.py" file should have nothing to do with your Django project's "settings.py" (the one in the "mysite" folder). Maybe I don't understand what's happening because I don't know how venv actually works. Anyway, I tried to replicate your error but I wasn't able to. I went to PythonAnywhere and 1. created an API token 2. started a new bash console 3. ran "pip3.7 install --user pythonanywhere" 4. ran "pa_autoconfigure_django.py --python=3.7 https://github.com/sergeichukes/first-blog.git". Everything seems to be working as it should, you can see the site at: http://arboc.eu.pythonanywhere.com/
AnonZebra
@AnonZebra
@sergeichukes I see now that the Django Girls tutorial specifies using python 3.6, whereas I specified python 3.7 in my commands, but I don't think that should make a difference, unless maybe you used 3.7 locally? Also: when uploading on a public github repo, you should omit or modify the SECRET_KEY variable in mysite/settings.py (line 23). Sharing the secret key harms your site's security (I don't know exactly why, but everyone makes this very clear). If you really want to keep the same secret key for some reason, you can set your github repo to be private when creating it.
Ghost
@ghost~5e2d3e6ad73408ce4fd7cb08
I can't activate virtualenv in git bash.... How do I?
image.png
is this activated?
Arkahm
@Arkahm
I've seen a lot of Django tutorials to make blogs but none to make other types of sites. Would using a button to activate a backend script be done like using a submit button on a blog post?
AnonZebra
@AnonZebra
@Arkahm Good question! I tried it out to learn myself. Here is the incredibly barebones project I made in the process, if you want to you can download/clone it and run >>>python manage.py runserver inside the project folder https://github.com/AnonZebra/backend_btn_project (I used python 3.8 and django 3.0.2) Then go to the home page at 127.0.0.1:8000. Like I mention in the home page text, here's a great tutorial for learning this stuff: https://www.youtube.com/watch?v=F5mRW0jo-U4
Carolina Moreira
@carollm
Hey girls, I need some help with a deploy. Someone here can help me?
matrixbot
@matrixbot
thisisshub where do you wanna deploy the app?
Adeoti Ayodeji
@Lord-sarcastic
@carollm I'm here
JalanshMunshi
@JalanshMunshi
image.png

Hey everyone! I'm new to Django. I followed the steps mentioned here - https://tutorial.djangogirls.org/en/django_start_project/

However, when I run it in locally, the following page shows up - The Connection has timed out.

What am I doing wrong? Any help is appreciated.

Raphael Das Gupta
@das-g

Hi @JalanshMunshi.

Have you followed the step to start the local web server for your project? See Starting the web server.

I.e., have you started the command

python manage.py runserver

and is it still running? That's required for seeing a website on http://127.0.0.1:8000/

JalanshMunshi
@JalanshMunshi
Yes, I executed that command. I followed the post meticulously. The webpage is not loading.
I am sorry for the late reply.
@das-g
Raphael Das Gupta
@das-g
Hmm ... then I don't know what the issue is. Could a personal firewall be blocking the request?
JalanshMunshi
@JalanshMunshi

I was trying to run it in Bash on Win10. There seems to be a problem with it.

I tried doing it on Linux. It is working fine. Thanks!

Rahimz
@Rahimz
I am deploying the tutorial on the PythonAnywhere and however I run the collectstatic but the css of the weblog does not load. Every things are good in local.
Kevin Cole
@ubuntourist_gitlab
Hi. Is there a "cheat" repo somewhere? I'm having a devil of a time finding a typo (I assume),
and would like to download a pristine copy of the completed beastie, test to make sure I have nothing outside
of the tutorial messing me up, and, if it displays correctly, compare bits and pieces to see where I messed up.
Pitrified
@Pitrified
@ubuntourist_gitlab I just finished the tutorial if you want to look it up: https://github.com/Pitrified/djangogirls-tutorial , there are some small differences in how python code is formatted but it's just aesthetics
I also did a mega-recap of all the useful things covered in the tutorial if that might help
@Rahimz my site refused to update until I tried the reload button under the web tab in PythonAnywhere, but I have no idea if that's actually related to that
Kevin Cole
@ubuntourist_gitlab
@Pitrified As it turns out, there was no error. For some reason, repeated reloads of my local site (as well as stopping and starting the server) were not refreshing the cache, and so, I was not seeing any of my static CSS changes and kept getting 404 errors for blog.css. This morning, after no changes, I tried again, and lo and behold, all is well. Damned if I know what was causing it to bollix up like that yesterday...
Prachi Bajaj
@prachibajaj
Following the tutorial, for the deploy step, all command line operations have to be executed in my virtual environment or out of it ?
matrixbot
@matrixbot
thisisshub gitter_prachibajaj: inside
Prachi Bajaj
@prachibajaj
Why does "git add --all" display the warning: LF will be replaced by CRLF in .idea/workspace.xml. The file will have its original line endings in your working directory
azarshab-saeed
@azarshab-saeed
How cab I bypass login page in django proxy server??
Rahimz
@Rahimz
@Pitrified I've pushed that button and the site works completely but it seems that the css and bootstrap does not work. I check the static folder and all of my css files are there but the PythonAnywhere server does not serve them correctly.
hardingn
@hardingn
Hi, I made a mistake in my .gitignore file (I had ds.sqlite3 not db.sqlite3) so I think my db file was being sent to github. I've made some changes as described in https://tutorial.djangogirls.org/en/django_templates/.
Now when I try and do git pull in pythonanywhere it gives me an error message: error: Your local changes to the following files would be overwritten by merge:
db.sqlite3
Please, commit your changes or stash them before you can merge. How do I fix this?
Kevin Cole
@ubuntourist_gitlab
Suggestion: Add a caveat about deploying too early. I was merrily adding code, then testing locally in the development environment. If everything looked good, I would git commit, git push, git pull at the PythonAnywhere console, and finally, test the "production" version.
This did not go so well when I got to the CSS step. It could not find theblog.css file. It is two pages after the CSS page that it tells you to deploy AND do the ./manage.py collectstatic which fixes the problem.
ItohGo
@ItohGo
This error has occurred.
Class 'Post' has no 'objects' member
mk1237
@mk1237
Hi, I am new for Django. When I run script "manage.py createsuperuser" on pythonanywahre,That has error occurred like "can't open file 'manage.py': [Errno 2] No such file or directory "". How I can fix it ?
khetpalharsh@gmail.com
@khetpalharshgm1_twitter
Hi guys I'm facing an issue regarding pyaudio , not able to install
Aaa
@Aaa25698420_twitter
Hi Guys, I am also new with Django. After installing Python 3.8 on my windows 10, I tried to open Python using the command line (cmd) by typing in Python 3.8 . Unfortunately it doesn't open. What am I doing wrong?
Aaa
@Aaa25698420_twitter
Never mind, I have solved it myself