Skip to content

Conversation

@HN23
Copy link
Contributor

@HN23 HN23 commented Feb 27, 2015

No description provided.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling 2a01a1b on HN23:new_upload into b969b37 on greyside:master.

@SeanHayes
Copy link
Member

Here's the error:
NoReverseMatch: Reverse for 'mesh_media_view' with arguments '()' and keyword arguments '{u'slug': u''}' not found. 1 pattern(s) tried: ['blog/media/(?P.+)/$']

The slug being passed in is an empty string, but the regex ".+" only matches one or more characters. Try changing the test to use a slug with more than one character.

This is happening in django_mesh/models.py, line 236, in get_absolute_url(). My guess is a slug was never set on the instance or the instance wasn't saved first. Get this working with a slug, then add another test for when there isn't a slug, returning an empty string instead of raising an error.

@HN23
Copy link
Contributor Author

HN23 commented Feb 27, 2015

right, i thought i changed all of it, it seems i missed one! i must have copied it over and accidentally put a + instead of a * in there at one point. Also, i accidentally had args= instead of kwargs= in the models as well

@SeanHayes
Copy link
Member

Yeah, looks like we use "" instead of "+" elsewhere, so stick with "".

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling bff5115 on HN23:new_upload into b969b37 on greyside:master.

@HN23
Copy link
Contributor Author

HN23 commented Feb 27, 2015

YESS! it seems its passing the tests now! this branch can replace upload, its pretty much a cleaned up version of upload with the file->media name change. When youre free and can check to make sure it includes everything you want, if everything is good, i can squash the commit and it should be ready to merge

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling 6e51ca4 on HN23:new_upload into b969b37 on greyside:master.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this needed?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just noticed that width and height are hardcoded here. I'll have to look at the oembed spec again to see how its best to handle this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about the dimensions in render for the Media class? Those are also hardcoded. should that be user adjustable at some point?

We can add some required dimesion fields and pass that in via string substitution?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, good catch.

Yeah, let's just add nullable width and height SmallIntegerFields and use that instead of the hardcoded values.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the embed tag is non-standard and doesn't work in all browsers. Typically is placed inside an tag.

Does work for non-videos? Was the intent to have the actual file in the index or just a thumbnail image?

@HN23
Copy link
Contributor Author

HN23 commented Mar 25, 2015

With regards to the media height and width fields, it didnt have a default set because we still have to figure out what the best/standard dimensions are for the oembed.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of using the "style" attribute, could you use "width" and "height" attributes? Normally we'd use CSS, but images are a special case and it helps speed up the webpage rendering.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this setting is needed, looks like it's part of this package: https://github.com/nai-central/django-mediafiles/

@SeanHayes SeanHayes force-pushed the master branch 3 times, most recently from 14805c1 to e3311ab Compare January 25, 2016 22:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants