-
Notifications
You must be signed in to change notification settings - Fork 18
models mandatory video_data field #1
base: master
Are you sure you want to change the base?
Conversation
I had an issue with user just pasting url, e.g. https://www.youtube.com/watch?v=gDLKwTdurxg and then clicking "save" without anything else. It basically does not process the video and after save the plugin fails on: ``` Exception Value: type object argument after ** must be a mapping, not NoneType Exception Location: /usr/lib/python2.7/site-packages/djangocms_youtube/models.py in video, line 76 ``` Which really users `vide_data` as kwargs: ``` @Property def video(self): cls = Video(**self.video_data) return cls ``` It is enough for me to mark this field as mandatory. Probably updated migration is needed, but I have not idea how to do it here on GH.
Thanks for your pull request. Ans as you have mentioned, model changes requires migrations for for both djnago and south. I can't merge the the changes as it is, sorry! Please add migrations or I'll try to do it in the master branch as soon as I can. Regards Mishbah |
Can you give me hint how to actually do it? Do I need to copy the project Robert On Wed, Jan 20, 2016 at 4:25 PM, Mishbah Razzaque [email protected]
stereoIT s.r.o. |
You'll have to setup 2 projects (django 1.6.x with South and django >=1.7), fork this repo and pip install locally (see https://pip.pypa.io/en/stable/reference/pip_install/#editable-installs) |
Alternatively, please wait few days and I'll try to fix is as soon as I can. |
Hi, I've tried to setup local development, but installing the editable version, Regards, Robert On Wed, Jan 20, 2016 at 4:59 PM, Mishbah Razzaque [email protected]
stereoIT s.r.o. |
Caught me out, breaking projects. |
Ideally I would like to keep Unfortunately I'm super busy ... to make the suggested amends myself.. so pull requests are welcome! |
Just got the same error can the pull request be merged to master yet ? |
This merge request is not complete .. missing migrations for both django and south. |
Just a heads up to anyone experiencing this. I think the core problem might be that the google api responds really slowly and by the time people click on the save button, the video data has not been fetched (and video_data field is empty). In my case, my server was also timing out before the api request finished. Increasing nginx timeout and just waiting for the request helped. But, who has time to wait 2 minutes for the api request to finish everytime you add a youtube video... |
@jkaikko Its not getting as slow as that for me but making the video data field unique prevents the save and stops it from breaking the page you are adding it to. I have just created my own local version of the app without south migrations and made the required fix until it is updated on this git repo. |
I had an issue with user just pasting url, e.g. https://www.youtube.com/watch?v=gDLKwTdurxg and then clicking "save" without anything else. It basically does not process the video and after save the plugin fails on:
Which really users
vide_data
as kwargs:It is enough for me to mark this field as mandatory. Probably updated migration is needed, but I have not idea how to do it here on GH.