Wagtail Page Reverse Error when trying to edit a page - django

I'm getting the following error:
Reverse for 'wagtail_serve' not found. 'wagtail_serve' is not a valid view function or pattern name.
This is a new install and I'm trying to edit the default landing page. I've never had this error before.
Django==2.2.1
wagtail==2.5
wagtail-condensedinlinepanel==0.5.2
wagtailmenus==2.13
Any ideas on what could be causing this? Did I miss a setting somewhere? Any suggestions?

Related

How can I add atribute to webpage in django

screenshotI'm following a tutorial to create a website using django. I keep getting this error when running the server.
path('page2',index.webpage2),
AttributeError: module 'website.index' has no attribute 'webpage2'. Did you mean: 'webpage1'?
Don't know what I'm missing, the tutorial ran the server without any problem. The only thing I noticed was that it also gave my a missing os error. I fixed this part.
Thank you for your help
You need to add two views correspoending to the url
def webpage2(request):
pass
def webpage3(request):
pass

How to create a default error decorator if a view fails in Django?

I am thinking of an Idea to implement. Usually, I just wrap my view function code in a try-catch block, so if the view fails, I render a default error page with error name. I am wondering, can I create a decorator or a similar one-liner code, in which I could do the same(if the code in function crashes, load the error page with error code).Note I am already using the #login_required decorator
There is no need to do this. Django captures all errors already. You should simply provide a custom 500.html template at the top level of your templates directory - see the docs.
Yes, Daniel is right, just adding links to the right posts. We can use a template processor, pointed out in the following answer, and pass the status code.
Django raising 404 with a message
or we can create a new default error page and pass in the error like they did in the following post.
How to return 404 page intentionally in django

OpenCart 2.2 error undefined when viewing order info

When I click the view button next to an order (whether from the dashboard or orders page) I get an "error undefined" alert as the page is loading.
I also get the same error when I try and change the order status from the same page and it yields no results.
It also produces no errors in the error log.
I can however change the order status from the edit order page but this is very inconvenient.
If anyone knows a common solution or maybe pointers as to how to start diagnosing the issue please post them here. I've been hunting for answers most of the day and have had no luck with any solutions.
ty in advance.
if you are using SSL Tyr this at upload/admin/controller/sale/order.php
After
$data['store_name'] = $order_info['store_name'];
Remove
$data['store_url'] = $this->request->server['HTTPS'] ? preg_replace("/^http:\/\//", "https://", $order_info['store_url']) : $order_info['store_url'];
Add
$data['store_url'] = $this->request->server['HTTPS'] ? HTTPS_CATALOG : HTTP_CATALOG;
Unfortunately OpenCart 2.2.0.0 is known to be a bit buggy.
Best thing would be to start using 2.3.0.2 (avoid 2.3.0.0 and 2.3.0.1) if possible.

What is the proper way to append view/component to existing view

I have been trying to add a component within a view, I could do it but I am getting some warning message as well like "DEPRECATION: Using the defaultContainer is no longer supported". There is a related post here : emberjs append works but raises Assertion Failed error but not sure what I am doing wrong. Here is my jsbin link : http://jsbin.com/tuwanava/1/
Your help will be very much appreciated. Thanks.
Use
sticky.pushObject(App.ConfirmDeleteComponent.create());

Django URLs not matching with GET variables

I have the following django URL:
url(r'^companies/$', 'companies', name='companies'),
If I go to http://localhost:8000/companies/ it works perfectly. However, if I try adding any GET variables to the URL django raises a 404. For example, if I go to http://localhost:8000/companies/?c=1 django raises a 404. What's strange, is that on the 404 it says:
The current URL, companies/, didn't match any of these.
Why am I not able to pass GET variables to my URLs?
I am using django 1.4.
The companies view is defined like:
def companies(request):
It shouldn't have to accept any additional parameters because they are GET variables, not URL parameters- correct? I swear I've done this hundreds of times and it always just works...
Okay. Figured out what was causing this very strange behavior. I have a custom context processor that is calling resolve(request.get_full_path()). Apparently that causes a 404 if there are any GET variables in the URL. Very strange.