rizumu / django-podcasting Goto Github PK
View Code? Open in Web Editor NEWAudio podcasting functionality for Django sites.
Home Page: django-podcasting.rtfd.org
License: Other
Audio podcasting functionality for Django sites.
Home Page: django-podcasting.rtfd.org
License: Other
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")
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.
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?
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
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!
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.
"<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.
Verify that the templates and any styles are in a good state out of the box.
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"?
django-podcasting/podcasting/migrations/0005_auto_20190617_1316.py
Lines 19 to 23 in 4f4ab90
django-podcasting/podcasting/migrations/0005_auto_20190617_1316.py
Lines 29 to 33 in 4f4ab90
Thanks,
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.