[Solved] ‘NoneType’ object has no attribute ‘get’ when the object is not type None [closed]

Welcome to StackOverflow! It appears your variable: mf_json_data defined at: https://github.com/apalmesano2/assignment2_part2/blob/master/portfolio/models.py#L113 is failing to return a value, resulting in mf_request = None. I recommend you ensure your mf_json_data = requests.get(mf_url).json() is pulling appropriately. Try debugging with something like this: mf_request = requests.get(mf_url) print(‘MF Request:’, mf_request, ‘MF Request Type: ‘, type(mf_request)) if mf_request.status_code != 200: print(‘Bad … Read more

[Solved] I want to make an application to book a movie ticket. with master model-1) Screen,2)Movie. then other models 1)movie_screen_mapp,2)Time(with 4 show).

I want to make an application to book a movie ticket. with master model-1) Screen,2)Movie. then other models 1)movie_screen_mapp,2)Time(with 4 show). solved I want to make an application to book a movie ticket. with master model-1) Screen,2)Movie. then other models 1)movie_screen_mapp,2)Time(with 4 show).

[Solved] How to change object structure into array structure for highcharts

If you want to convert your list of dictionaries to a list of lists on the server side you can do it like so: >>> data = [{‘tahun’: ‘2010’, ‘apel’: 100, ‘pisang’: 200, ‘anggur’: 300, ‘nanas’: 400, ‘melon’: 500}, {‘tahun’: ‘2011’, ‘apel’: 145, ‘pisang’: 167, ‘anggur’: 210, ‘nanas’: 110, ‘melon’: 78}] >>> [[x[‘tahun’], x[‘apel’]] for … Read more

[Solved] How to setup CSS for multiple font choices? [closed]

Create a css selector for each theme: .theme-time { font-family: “Times New Roman”; } .theme-courier { font-family: “courier”; } .theme-verdana { font-family: Verdana, sans-serif; } Then, to give the ability to your user to change the theme and then the font-family, we will use Javascript. We will add one of this CSS class on the … Read more

[Solved] Please I’m new to python and I’m trying to do a recipe app using Django. I encountered an error which is “UnboundLocalError: local variable form [closed]

you only create form if your request is POST. so if you try to call your view with get method form variable is not created. this is your code I’m gonna walk you through it. def register(request): if request.method == “POST”: form = UserCreationForm(request.POST) if form.is_valid(): username = form.cleaned_data.get(‘username’) messages.success(request,f”{username}, your account has been created!”) … Read more

[Solved] My python manage.py runserver Not Working? [closed]

if it show ‘python’ is not recognized as an internal or external command, operable program, or batch file. it means that you do not have installed python in your pc. You can install it using the official page: https://www.python.org/downloads/ Don’t forget to check “Add python to environment variables”! 🙂 0 solved My python manage.py runserver … Read more

[Solved] Attempted relative import beyond toplevel package in django

Try this in your models: #Remove the import statement: from blog.models import sighinmodel #Then, inside your model user = models.ForeignKey(‘blog.sighinmodel’ , on_delete = None) Also, I would like to point out that this is not the correct way of importing other modules in your models.py . You should do like this: from appname.models import ModelName … Read more

[Solved] how do i start everything over with django?

Maybe your django project is using a different version than the one installed on your computer. This issue happened to me when I updated django using pip, only to find out that my django project is no longer compatible. I had to find out which version my project was using and I reinstalled it. First … Read more