This is a bit strange issue (at least for me)

project/
       apache/ django.wsgi
       project/ __init__.py, settings.py, urls.py ..
       pages/
             __init__.py
             widgets.py
             website_views.py
       services/
               __init__.py
               apis/
                    __init__.py
                    fparser.py
                    googleData.py
                    wp.py
                    ...
               wservice.py
       ...

So, the wservice.py is wrap-up like class which lies over all classes of apis 
module. It even provides some common functionality to all classes that it 
inherit.


wservice.py

import feedparser
from bs4 import BeautifulSoup

class WidgetService(FParser):
    def post_content_summary(self, post_number):   
        content_soup = BeautifulSoup( self.content() ) # self.content comes 
from FParser.
        content_text = content_soup.get_text()

        ...

    def get_random_image(self, post_number):
        ...
        content_soup = BeautifulSoup(html_content)

        ...

FParser class is located at fparser.py

The methods in fparser.py use the above class in this way.

from services.wservice import WidgetService
def method1():
    obj = WidgetService()
    m1 = obj.foo1() # described in FParser class
    m2 = obj.foo2() # described in WidgetService class

*I am using this WidgetService() in pages/widgets.py. So, what I found is, when 
ever I start usingBeautifulSoup, the apache server is not loading.. Its not 
even showing any syntax error.*

*I don't even see any error in log file.*

*What might have possibly went wrong??? The interesting part is, I haven't 
faced this kind of error in development server, heroku (gunicorn)*
*I really don't understand why this is happening!!.. *

*
*

*I tried to debug the WidgetService() class and found that the statement* 
content_soup = BeautifulSoup( self.content() ) *is not running.*

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/r3eO2n87qC8J.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to