Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: trying to display custom error message on form
Post: trying to display custom error message on form

Hi, I am trying to display a custom error message when the user enters a wrong password in a login form on my django app. Currently, when the user enters a wrong password, it displays an error messag...
mp3909 Web Scraping & Web Development 0 1,594 Nov-19-2020, 06:35 PM
    Thread: get_absolute_url function not working?
Post: RE: get_absolute_url function not working?

Actually, since changing my form to the below, it now no longer works even though I have enctype="multipart/form-data" {% extends 'music/base.html' %} {% block title %}Add a New Album{% endblock %} ...
mp3909 Web Scraping & Web Development 3 2,790 Jul-15-2020, 07:11 PM
    Thread: for field in form
Post: for field in form

How can I say if field is not "album_logo" then do this else do that? I have this code in my django form where I want to set the input for the field "album_logo" to be file and not text and to achieve...
mp3909 Web Scraping & Web Development 1 1,625 Jul-14-2020, 07:54 PM
    Thread: get_absolute_url function not working?
Post: RE: get_absolute_url function not working?

i found the solution to my own problem. i had to add enctype="multipart/form-data" in my form.
mp3909 Web Scraping & Web Development 3 2,790 Jul-12-2020, 02:23 PM
    Thread: get_absolute_url function not working?
Post: RE: get_absolute_url function not working?

I change my code to incorporate crispy_forms. Anyways, this is what my final code looks like so far: models.py: from django.db import models from django.urls import reverse # Create your models her...
mp3909 Web Scraping & Web Development 3 2,790 Jul-12-2020, 11:59 AM
    Thread: get_absolute_url function not working?
Post: get_absolute_url function not working?

Hi, So I am using django 2.2.7 and following videos on youtube for learning Python Django. My models.py file consists of a class for an Album object and a class for a Song object. Inside this models...
mp3909 Web Scraping & Web Development 3 2,790 Jul-11-2020, 07:03 PM
    Thread: css not working in Django
Post: RE: css not working in Django

thank you Snippsat, that thread helped solve the issue!
mp3909 Web Scraping & Web Development 3 3,777 Jul-06-2020, 02:34 PM
    Thread: css not working in Django
Post: RE: css not working in Django

ok, it seems like whenever I want to make changes to my css, i need to delete the existing file and create a new one and give it a different name. Then it works. But surely, I cannot continue on to ...
mp3909 Web Scraping & Web Development 3 3,777 Jul-01-2020, 01:54 PM
    Thread: css not working in Django
Post: css not working in Django

I am using django 2.2.7 I have a template called index.html (attached). Inside here, I have li tags for which I want to remove the bullet points. So in my style.css file (also attached), I write nav ...
mp3909 Web Scraping & Web Development 3 3,777 Jul-01-2020, 12:48 PM
    Thread: Importing modules issue
Post: RE: Importing modules issue

in command prompt, os.environ['PYTHONPATH'] prints 'C:\\Users\\mp88_\\OneDrive\\Desktop'
mp3909 General Coding Help 9 3,565 Jun-24-2020, 09:05 PM
    Thread: Importing modules issue
Post: RE: Importing modules issue

Yes, I have restarted my pc since adding PYTHONPATH
mp3909 General Coding Help 9 3,565 Jun-24-2020, 08:38 PM
    Thread: Importing modules issue
Post: RE: Importing modules issue

I set up my PYTHONPATH variable as follows: 1). Goto my pc 2). Properties 3). Advanced System settings 4). Then click on Environment Variables 5). Then click on New under "User Variables for mp88_"....
mp3909 General Coding Help 9 3,565 Jun-24-2020, 08:18 PM
    Thread: Importing modules issue
Post: RE: Importing modules issue

Hi, Sorry, I removed the ".py" from "import ImportingModules.py" so it now reads "import ImportingModules". Still get an error saying "No module named ImportingModules" I've also added __init__.py ...
mp3909 General Coding Help 9 3,565 Jun-24-2020, 08:02 PM
    Thread: Importing modules issue
Post: Importing modules issue

Hi, I have a python file called ImportingModules.py I have saved this file purposely on my desktop because I want to see how you can add an Environmental Variable called PYTHONPATH and set this eq...
mp3909 General Coding Help 9 3,565 Jun-24-2020, 07:48 PM
    Thread: classes
Post: RE: classes

Ok, thanks guys, much appreciated. I seen elsewhere that the property decorators are ditched and written like this sometimes: class C(object): def getx(self): return self._x def setx(s...
mp3909 General Coding Help 11 4,058 Jun-09-2020, 06:13 PM
    Thread: Operator Overloading issue
Post: RE: Operator Overloading issue

thanks buran, that did the trick though I have never stumbled across this concept radd.
mp3909 General Coding Help 4 2,274 Jun-07-2020, 05:36 PM
    Thread: Operator Overloading issue
Post: Operator Overloading issue

Why does my code give an error when i try to do dev_1 + dev_2 + dev_3? I have explicitly defined the __add__ method within my Employee class and since Developer class inherits this class, I imagine I ...
mp3909 General Coding Help 4 2,274 Jun-06-2020, 01:41 PM
    Thread: Visual studio shortcut key to add comments to python code
Post: RE: Visual studio shortcut key to add comments to ...

sorry my bad, I mean "now" got it working :)
mp3909 News and Discussions 15 9,429 Jun-06-2020, 01:15 PM
    Thread: classes
Post: RE: classes

There's nothing grammatically wrong with the spelling in my code. You pointed out that I need to declare self.fullname again in the method and then it works. Although you are correct, it just doesn't...
mp3909 General Coding Help 11 4,058 May-31-2020, 01:15 PM
    Thread: classes
Post: classes

So I am learning classes in python and I stumbled across something that did not make sense to me. In the code below, when I change the name of the student via calling the method changeName passing the...
mp3909 General Coding Help 11 4,058 May-31-2020, 12:46 PM

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020