GithubHelp home page GithubHelp logo

rizumu / django-podcasting Goto Github PK

View Code? Open in Web Editor NEW
85.0 85.0 35.0 310 KB

Audio podcasting functionality for Django sites.

Home Page: django-podcasting.rtfd.org

License: Other

Makefile 0.19% Python 90.95% HTML 8.86%

django-podcasting's People

Contributors

a8 avatar batisteo avatar beigna avatar boatcoder avatar djangolackey avatar kike721 avatar rizumu avatar urtzai avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

django-podcasting's Issues

feed categories and subcategories

At the moment 'Music' is hard wired.

Let try the solution of adding a category model, it can have a foreign key to itself to iteslf to implement the hierarchy.

class Category(models.Model):
    title = models.CharField(_("title"), max_length=255)
    slug = AutoSlugField(_("slug"), populate_from="title")
    parent = models.ForeignKey("self", blank=True, null=True, related_name="child")

Got exception after setting up first show

After I added one show and clicked save, I got the following error:

Exception at /admin/podcasting/show/
The property admin_thumb_sm is not defined on Show.

Any help for this noob to django would be greatly appreciated.

Publishing a show

Well, dunno if it's an issue really, but I don't know how to publish a Show or an Episode. I've no bool/date field to "publish" it from admin, any tip?

Django 1.10.2 ImportError: cannot import name PassThroughManager

After I installed all the dependencies, add to installed apps this message is shown.

Traceback (most recent call last):
  File "manage.py", line 22, in <module>
    execute_from_command_line(sys.argv)
  File "/home/fragmentado/.virtualenvs/papeonerd/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 367, in execute_from_command_line
    utility.execute()
  File "/home/fragmentado/.virtualenvs/papeonerd/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 341, in execute
    django.setup()
  File "/home/fragmentado/.virtualenvs/papeonerd/local/lib/python2.7/site-packages/django/__init__.py", line 27, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "/home/fragmentado/.virtualenvs/papeonerd/local/lib/python2.7/site-packages/django/apps/registry.py", line 108, in populate
    app_config.import_models(all_models)
  File "/home/fragmentado/.virtualenvs/papeonerd/local/lib/python2.7/site-packages/django/apps/config.py", line 199, in import_models
    self.models_module = import_module(models_module_name)
  File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
  File "/home/fragmentado/.virtualenvs/papeonerd/local/lib/python2.7/site-packages/podcasting/models.py", line 22, in <module>
    from model_utils.managers import PassThroughManager
ImportError: cannot import name PassThroughManager

site_base.html requirement missing

I'm trying to use django-podcasting but a site_base.html is required when I open /podcasts/ url.
What content site_base.html must contain (eg: {{ block podcasts }}, etc, etc) in order to that urls displays the content?
Thanks!

authors.all()[0]

Anywhere in the feed that this is used, is a hack to get the first author instead of explicitly choosing a person.

Maybe use the ManagingEditor in this case, and make the managing editor a FK to a user. Would be a nice way to give managing editor an email override. For example, we can use managing editor.email instead of a person's real email.

ValueError at /admin/podcasting/episode/add/

"<Episode: Now What?>" needs to have a value for field "id" before this many-to-many relationship can be used.

Internal Server Error: /admin/podcasting/episode/add/
Traceback (most recent call last):
  File "/opt/envs/laboren/lib64/python3.5/site-packages/django/core/handlers/exception.py", line 41, in inner
    response = get_response(request)
  File "/opt/envs/laboren/lib64/python3.5/site-packages/django/core/handlers/base.py", line 187, in _get_response
    response = self.process_exception_by_middleware(e, request)
  File "/opt/envs/laboren/lib64/python3.5/site-packages/django/core/handlers/base.py", line 185, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/opt/envs/laboren/lib64/python3.5/site-packages/django/contrib/admin/options.py", line 551, in wrapper
    return self.admin_site.admin_view(view)(*args, **kwargs)
  File "/opt/envs/laboren/lib64/python3.5/site-packages/django/utils/decorators.py", line 149, in _wrapped_view
    response = view_func(request, *args, **kwargs)
  File "/opt/envs/laboren/lib64/python3.5/site-packages/django/views/decorators/cache.py", line 57, in _wrapped_view_func
    response = view_func(request, *args, **kwargs)
  File "/opt/envs/laboren/lib64/python3.5/site-packages/django/contrib/admin/sites.py", line 224, in inner
    return view(request, *args, **kwargs)
  File "/opt/envs/laboren/lib64/python3.5/site-packages/django/contrib/admin/options.py", line 1508, in add_view
    return self.changeform_view(request, None, form_url, extra_context)
  File "/opt/envs/laboren/lib64/python3.5/site-packages/django/utils/decorators.py", line 67, in _wrapper
    return bound_func(*args, **kwargs)
  File "/opt/envs/laboren/lib64/python3.5/site-packages/django/utils/decorators.py", line 149, in _wrapped_view
    response = view_func(request, *args, **kwargs)
  File "/opt/envs/laboren/lib64/python3.5/site-packages/django/utils/decorators.py", line 63, in bound_func
    return func.__get__(self, type(self))(*args2, **kwargs2)
  File "/opt/envs/laboren/lib64/python3.5/site-packages/django/contrib/admin/options.py", line 1408, in changeform_view
    return self._changeform_view(request, object_id, form_url, extra_context)
  File "/opt/envs/laboren/lib64/python3.5/site-packages/django/contrib/admin/options.py", line 1442, in _changeform_view
    new_object = self.save_form(request, form, change=not add)
  File "/opt/envs/laboren/lib64/python3.5/site-packages/podcasting/admin.py", line 70, in save_form
    return form.save()
  File "/opt/envs/laboren/lib64/python3.5/site-packages/podcasting/forms.py", line 313, in save
    episode.save()
  File "/opt/envs/laboren/lib64/python3.5/site-packages/django/db/models/base.py", line 806, in save
    force_update=force_update, update_fields=update_fields)
  File "/opt/envs/laboren/lib64/python3.5/site-packages/django/db/models/base.py", line 836, in save_base
    updated = self._save_table(raw, cls, force_insert, force_update, using, update_fields)
  File "/opt/envs/laboren/lib64/python3.5/site-packages/django/db/models/base.py", line 922, in _save_table
    result = self._do_insert(cls._base_manager, using, fields, update_pk, raw)
  File "/opt/envs/laboren/lib64/python3.5/site-packages/django/db/models/base.py", line 961, in _do_insert
    using=using, raw=raw)
  File "/opt/envs/laboren/lib64/python3.5/site-packages/django/db/models/manager.py", line 85, in manager_method
    return getattr(self.get_queryset(), name)(*args, **kwargs)
  File "/opt/envs/laboren/lib64/python3.5/site-packages/django/db/models/query.py", line 1060, in _insert
    return query.get_compiler(using=using).execute_sql(return_id)
  File "/opt/envs/laboren/lib64/python3.5/site-packages/django/db/models/sql/compiler.py", line 1098, in execute_sql
    for sql, params in self.as_sql():
  File "/opt/envs/laboren/lib64/python3.5/site-packages/django/db/models/sql/compiler.py", line 1051, in as_sql
    for obj in self.query.objs
  File "/opt/envs/laboren/lib64/python3.5/site-packages/django/db/models/sql/compiler.py", line 1051, in <listcomp>
    for obj in self.query.objs
  File "/opt/envs/laboren/lib64/python3.5/site-packages/django/db/models/sql/compiler.py", line 1050, in <listcomp>
    [self.prepare_value(field, self.pre_save_val(field, obj)) for field in fields]
  File "/opt/envs/laboren/lib64/python3.5/site-packages/django/db/models/sql/compiler.py", line 1000, in pre_save_val
    return field.pre_save(obj, add=True)
  File "/opt/envs/laboren/lib64/python3.5/site-packages/django/db/models/fields/files.py", line 297, in pre_save
    file.save(file.name, file.file, save=False)
  File "/opt/envs/laboren/lib64/python3.5/site-packages/django/db/models/fields/files.py", line 94, in save
    name = self.field.generate_filename(self.instance, name)
  File "/opt/envs/laboren/lib64/python3.5/site-packages/django/db/models/fields/files.py", line 328, in generate_filename
    filename = self.upload_to(instance, filename)
  File "/opt/envs/laboren/lib64/python3.5/site-packages/podcasting/models.py", line 92, in get_episode_upload_folder
    if instance.shows.count() == 1:
  File "/opt/envs/laboren/lib64/python3.5/site-packages/django/db/models/fields/related_descriptors.py", line 510, in __get__
    return self.related_manager_cls(instance)
  File "/opt/envs/laboren/lib64/python3.5/site-packages/django/db/models/fields/related_descriptors.py", line 827, in __init__
    (instance, self.pk_field_names[self.source_field_name]))
ValueError: "<Episode: Now What?>" needs to have a value for field "id" before this many-to-many relationship can be used.

Migrate doesn't work on python 3.6

I fixed it manually, but could you please push the latest version so others can get it using "pip install django-podcasting"?
Even the final version still has problem. "initial migration with photologue" hasn't been solved yet.

raise ValueError('Related model %r cannot be resolved' % self.remote_field.model)
ValueError: Related model 'photologue.Photo' cannot be resolved

these need to get under an "if"?

migrations.AlterField(
model_name='episode',
name='original_image',
field=models.ForeignKey(blank=True, default=None, help_text='\n A podcast must have 1400 x 1400 pixel cover art in JPG or PNG\n format using RGB color space. See our technical spec for\n details. To be eligible for featuring on iTunes Stores,\n choose an attractive, original, and square JPEG (.jpg) or\n PNG (.png) image at a size of 1400x1400 pixels. The image\n will be scaled down to 50x50 pixels at smallest in iTunes.\n For reference see the <a\n href="http://www.apple.com/itunes/podcasts/specs.html#metadata">iTunes\n Podcast specs</a>.<br /><br /> For episode artwork to\n display in iTunes, image must be <a\n href="http://answers.yahoo.com/question/index?qid=20080501164348AAjvBvQ">\n saved to file\'s <strong>metadata</strong></a> before\n enclosure uploading!', null=True, on_delete=django.db.models.deletion.PROTECT, to='photologue.Photo', verbose_name='image'),
),

migrations.AlterField(
model_name='show',
name='original_image',
field=models.ForeignKey(blank=True, default=None, help_text='\n A podcast must have 1400 x 1400 pixel cover art in JPG or PNG\n format using RGB color space. See our technical spec for\n details. To be eligible for featuring on iTunes Stores,\n choose an attractive, original, and square JPEG (.jpg) or\n PNG (.png) image at a size of 1400x1400 pixels. The image\n will be scaled down to 50x50 pixels at smallest in iTunes.\n For reference see the <a\n href="http://www.apple.com/itunes/podcasts/specs.html#metadata">iTunes\n Podcast specs</a>.<br /><br /> For episode artwork to\n display in iTunes, image must be <a\n href="http://answers.yahoo.com/question/index?qid=20080501164348AAjvBvQ">\n saved to file\'s <strong>metadata</strong></a> before\n enclosure uploading!', null=True, on_delete=django.db.models.deletion.SET_NULL, to='photologue.Photo', verbose_name='image'),
),

Thanks,

Architecture question; before I fork and start coding

Was there a specific reason that you chose to foreignkey the Enclosure->Episode->Show->Site as a one to one relationship going all the way up.

Ignore the below if you understand my question. I'm just thinking our situation requires the reuse of Enclosures and possibly Episodes on multiple Shows, which might be a rare case. Also since this isn't really an issue, but a Feature question. Feel free to close.

I would have thought that the association would be more like

Episode with a foreignkey relationship to Enclosure
Episode with a many-to-many relationship to Show
Show with a many-to-many for Site.

This would allow putting the same Episode multiple sites through different Shows, the same Show on multiple Sites, and the same Enclosure on multiple Episodes.

Say I have three podcasts (p1,p2,p3)
p1 is on site1.com
p2 is on site2.com
p3 is on site1.com and site2.com

I create Enclosure50
I create an Episode21 and attach it to Enclosure50 and Shows p1 and p2

This allows me to only enter Enclosure information one time and Episode information one time.
I could create a custom Episode22 and attach it to p2 if I needed to customize the description text, but there's no real reason to do that.

Thanks for your work.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.