prihoda / golem

Open-source chatbot framework for python developers. Batteries included 🔋🔋
GNU General Public License v3.0
46 stars 12 forks source link

Generalize interface views #32

Closed prihoda closed 6 years ago

prihoda commented 6 years ago

All interfaces can be handled by the same two views - post and get, which can delegate the work to the corresponding interface class. The type of interface would be passed as argument to the view like so:

### url r'^golm/interface/a4f6a848a6g846a84g68a4/(?P<interface_name>[a-zA-Z0-9]+)/?$' 
def interface_get(request, interface_name):
    interface = create_from_name(interface)
    interface.get_request(request)
mzilinec commented 6 years ago

Sounds good, this is under the hood so we don't have to do this before the 1.0 release right?