Video site using Wagtail - django

Want to build a video site like YouTube or peer tube but on my lan completely private, basically I want to pretend my kids are online when their not... plus a good project to learn.

A video based website would be easy to make. You could do this quite easily with a few Wagtail Pages, uploading videos as Documents and using a DocumentChooserPanel to select a video on each page.
To get started you'll want to start in two places:
The wagtail docs, available at http://docs.wagtail.io/en/latest/getting_started/tutorial.html, and
For additional tutorials https://wagtail.io/course/
Take it slow at first, get your virtual environment setup. Then move on to creating your first Wagtail Home Page and adding a few custom fields, then make them show up in the home_page.html template.
For future reference, when you ask questions on StackOverflow (or anywhere else) make sure you add more detail to your question. Including what you've done/tried so far, your end goal, or any problematic code you're working on will help you get answers faster and it'll generate better answers than mine.

Related

Commenting / Forum type software for ColdFusion

We operate a ColdFusion site with a custom CSS acting as a directory of various companies. Depending on the type of company, we have a set of subpages containing specific information pulled from the CMS about the company, such as "location/directions". We're looking to add functionality enabling users to add comments to the existing content. I'm looking for suggestions on open source or other available ColdFusion software out there that could work for this. While we could write something custom, commenting tools have been done a thousand times and probably better than we can do it.
While what we're looking for sounds like a blog or forum, its more of a hybrid. We'd like to be able to add functionality enabling commenting on the content we post in the context we post it in. Seems like there must be something out there that can be easily modified and integrated with our CMS.
Does anyone know of anything out there we should look into?
I'm going to vote to close this too, as per the others, but here's an answer anyway.
If you just want to add commenting to existing content, perhaps use Disqus. It's not locally installable (and is not CFML-based; it's all JS), but it does handle most things one would need if just wanting to add comments to a site.
If you want a native, self-managed solution, unfortunately StackOverflow have deemed that sort of question "unworthy", so you'll need to ask elsewhere. Despite being an entirely reasonable question, for which the answers would be helpful to other people later on (which is - in theory - the raison d'etre of Stack Overflow. Although that's hard to tell, sometimes).

Beautifulsoup django integration

still a newbie so I have a bunch of questions which might seem silly. However, here I go:
as a project to learn python, I decided I would start with something simple. The idea I had was to go to craigslist and find the prices of motorcycles, go through the first 10 pages of each city and give a mean, median and price trends. the result of that work can be found here (http://craigslistcompanion.co.nf/) as well as the codes.
now in order to make things better i decided that i should let the user input what they want (motorcycle/ car/ bikes) and from where (sfbay/ austin etc) and get the same results as shown in that page. as i started looking into it i was told that learning django would be a good place to start and i have been trying to do that for the last couple of days. however, what i have learn so far is mostly setting up databases and handling them.
I was wondering if there is a tutorial somewhere which will show me how to take input from the user and then manipulate it. i want to do this completely using python/ django.
for example lets say i want the user to input their first and last name and then try to play with that string and output something. how would i go about doing that?
thanks
First some clarification. Do you want to develop a web interface for your users? If so, then Django is a great start. The Django Book is a very good introduction to Django and teaches you with examples. The task of getting user information, validating it, manipulating it and saving it in a database is the most basic of task and it is explained well in the book.
The next thing is web scraping craigslist. From how you structured your question, it seams that you have solved that part of the problem. right?

integrating wmd editor with a django site

this is probably a really dumb question but im struggling to integrate it. im playing with a reusable app called brookie that uses wmd-editor.
in the install instructions it states to "Link admin_wmdeditor/media/admin-wmdeditor in your MEDIA_ROOT as admin-wmdeditor"
im assuming this is a symlink?
I've tried to create a symlink to point at the wmd folder in lib/python2.6/site-packages/wmd but i don't think it worked. i say that, as i cant see any symlink created in my folder.
so 1st question, is there a simple way to list symlinks so i can see if i've really created one? i know this is a noob question, im not a mac genius. i also know this should be covered by a quick google but do me a favour and do it, i can only find noise.
if anyone has some slightly more explicit instructions other than the ones on django-adminwmd_editors github page i'd love to see them. i can normally work this stuff out, but i've got an hour in just trying to hook this stuff up and its a wind up.
I'm not a Mac crack, but usually (on Linux) you can see a symlink, when you list the directory content.
I've played around with the brookie app some time ago and if I remember it right I have had some trouble with wmd also, after researching stackoverflow I changed to Markitup, which works fine.
Have a look here: WMD in Django Admin?
in the end i just commented out the lines referring to wmd and removed the class reference to it, forced it back to a std modeladmin.
will be adding tiny mce in if it needs it, nice n simple. not sure why this single text box needed something as complicated as wmdeditor.

How can I build a django homepage with updatable content?

I an building a kind of social network (think of it as last.fm, but gaming related). I want to have a homepage which will feature:
site news, announcements etc. in the main part
featured items in the right sidebar
player of the week in the right sidebar
I am trying to think of a way not to be hand coding these every time they need to change, which I understand is terrible design. However, I can't think of much.
I realize I need some kind of simple blog engine for the site news and such, but what about the featured content in the sidebar? Should there be a table in the database containing the featured items of the week? I think that will pollute my models.py with unnecessary stuff.
Please share any ideas.
There are lots of ready-to-go solutions ie.
Pinax - great package of reusable apps,
Django CMS - not so great, but could be useful.
Django's static pages - for basic stuff :)
I'd try pinax first - it has all of what you need.
As for your featured stuff - it all depends on what exactly you need, on your content.
If you need something special you'd probably finish up writing this stuff by yourself,
or overriding parts of ready-to-go solutions.
Featured Items and Player of the Week will depend (usually) on your project specific Player / Item models. It shouldn't take long to program these small pieces.
As far as news, there are quite a few different solutions out there. Here's one that I've created (because I can't think of a better one off hand):
http://github.com/monokrome/django-news/
The best bet with django is to find the smaller apps you might be able to leverage, and then write your own project with your custom wants/needs in mind.

Best way to integrate PHP forum into Django site?

Suppose you are running a Django site, and have a legacy PHP forum to support and integrate into your site, since current Django forum solutions are not mature enough.
What is the best way to do this?
Currently I have a simple view, which renders a very simple template which extends my site's base template, and the content area has nothing but an <IFRAME> which holds the forum as its src. A small jQuery function is used to maximize the <IFRAME>'s height (once it finishes loading) so as to contain 100% of the forum content.
But all of this sounds pretty awkward. How would you go about this?
There are a few options. None are ideal (but mixing two platforms never is!)
Use iframes as you've suggested (bad as the address in the address bar is always that of the django page and if somebody copes a link off the forum, it will be the PHP forum, not the django holder)
Use iframes but instead of using the same src all the time, parse the URL and append the relative bit onto the src of the iframe. ie if django sees /forum/this-url, set the src to http://forum-address/this-url and make sure all your links target parent. This has the advantage of showing the correct link in the address bar at all times (rather than it always being /forum/). You'll need to hack your forum for this to work.
Proxy the content and inject it into the page properly. You'll need to pass cookies and it might get really messy but in most terms, this is a great way to integrate things because your links will always be correct. You'll need to butcher your forum theme to strip out everything outside and including the <body> tags.
Theme your forum in the same way as the Django site. This would give best performance but you might have issues if you use dynamic stuff in your django template. An option to get around this is by having the django template cache things to memcache and using php-memcache to pull them out into your forum template.
I have done both 3 and 4 in the past. I used 3 for a very simple form (so didn't have to deal with cookies and sessions as you will). I used 4 for integrating a FluxBB forum into a Wordpress install. Both PHP but it would be uber bloat to load FluxBB inside Wordpress. I cached the dynamic template things into memcache and pulled them out in the forum template.
For this, I would probably suggest going with #4. It's a pain in the arse having to maintain two themes but it's by far the fastest performing solution.
When I read the question summary I immediately thought that you would need some kind of script, which could be linked to a signal via the Dispatcher in Django, to syncronize the user database from your Django site to the forum. This would keep the authentication side of things in check - but you still need to do one of the things that Oli has suggested, to make them look the same.
Themeing will probably be the least hassle-free route, but that's not to say it will be easy!