Apache mod_wsgi error
175
I changed LogLevel warn
to LogLevel debug
in the apache conf file. Django now loads, no errors in the logs, only lines indicating where a python process has been started.
I guess it's not really a good idea to hide errors, but I would expect debug to log more errors. Anyway it worked, and that's what is important.
Related videos on Youtube
Author by
Jan
Updated on September 17, 2022Comments
-
Jan over 1 year
google was not very friendly about this.
I have a Service Model which saves also a relation to a Category Model.
class Service include Mongoid::Document has_and_belongs_to_many :categories, inverse_of: :service end class Category include Mongoid::Document has_and_belongs_to_many :services, inverse_of: :category end
services/_form.html.erb
<%= f.label "Category" %> <% @categories.each do |category| %> <%= check_box_tag "service[category_ids][]", category.id, @service.category_ids.include?(category.id), id: dom_id(category) %> <%= label_tag dom_id(category), category.name %><br> <% end %>
Can someone explain how to delete existing unchecked check_boxes?
class Pro::ServicesController < ApplicationController def update @service = Service.find(params[:id]) if params[:service][:category_ids] params[:service] ||= {} params[:service][:category_ids] ||= [] # no clue how to delete existing relations # params[:service][:category_ids] = ["1234567890","098765432"] end respond_to do |format| if @service.update_attributes!(params[:service]) format.html { redirect_to [:pro, @service], notice: 'Service was successfully updated.' } format.json { head :no_content } else format.html { render action: "edit" } format.json { render json: @service.errors, status: :unprocessable_entity } end end end end
many thanks!
-
Keyo over 13 yearsThat is what was in my apache log. Those 4 lines only. I have no idea why it isn't providing tracebacks. I can't seem to reproduce the problem from the python interpreter either.
-
Keyo over 13 yearsProvided traceback above. Looks like functools may not be installed?
-
-
Keyo over 13 yearsNope. I've chmodded all the directories correctly and I'm still getting this.
-
h3. over 13 yearsI believe it wont work without an __init__.py