integrating wmd editor with a django site - django

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.

Related

Video site using Wagtail

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.

How to use different IDE with Netsuite

I'm admittedly new to Netsuite, so this may be obvious, although I've been unable to find anything specific one way or the other. In fact, I don't even attend any training until next week, but I'm trying to get part of my development environment setup with one of the editors/IDEs I prefer. I know that Netsuite offers an Eclipse plugin, but I'm not an Eclipse fan. I'd prefer to use either WebStorm or TextMate. (I'm on MacOS Sierra)
I tried installing the WebStorm plugin, but it's throwing an exception and is not functional. I submitted a bug on GitHub, but what I'd really like to know is if it's possible for me to write my own script to upload/download files to the cabinet, so I could just roll my own feature in TextMate. Is this possible, and if so, how? (Just a link to the docs is perfectly fine)
In other words, is it possible via their API, to submit changes to a script I've been working on in another editor/IDE? Or interact with our cabinet? (Not sure if I'm using the proper NS verbiage, but hopefully you get my intent) I'm thinking about writing a Python script, that accepts a local script path as a parameter, that will then get submitted to our cabinet. Thanks for the help in advance.
I wrote a plugin for JetBrains IDEs (I use WebStorm specifically though) that mimics NetSuite's Eclipse plugin. Feel free to take a look. It is open source and has ~1500 downloads at the current moment.
https://plugins.jetbrains.com/plugin/8305?pr=
If you are the same person that opened this issue (https://github.com/Topher84/NetSuite-Tools-For-WebStorm/issues/7), it has been closed and was due to using an older version of WebStorm.
I don't like eclipse personally, so I just make my scripts in whatever and use Netsuite's script backend to upload the scripts as 'new' when I'm done. If I want to change them, simply use their backend again to 'edit' the script. You'll see a simple editor, where you can change things, or you just copy and paste what you have in there. It's a little more work than something integrated, but it does work..

confusions using zurb foundation

After many projects writing my own responsive design i got a bit tired of it, after researching popular responsive frameworks decided to go with Zurb Foundation.
First i went for the css ready to go download. Then i tried to use the GEM, where i got a bit of resistance in trying to figure out things on my own. It seems the docs are not explaining enough scenarios, they are just raw docs.
First what i miss is a search for all the classes to find explanations fast, something like jquery's website has.
Many googling and reading to figure out i need to install ruby on windows. Then i ended thinking that my webserver also needs ruby installed, but figured out that SASS is just a preprocesor so it is only helping me write and maintain better code on my side :)
Here are some other problems i just can't figure out easy, without searching google for each thing:
1) I have configured dreamweaver to open .scss files also. Then each day i'm developing, i need to open ruby-console, navigate to project dir and put: compass watch. Now each time i save every modifications (so i can test i the browser), dreamweaver pops out message box: "file has been modified outside of dreamweaver,..do you want to save..blabla" - very very enoying
2) app.scss only holds a lot #import statements. _settings.scss holds the code i can change the default looks (this was my primary reason to use the gem since not a SASS guru yet). Should i uncomment some statement and change themn to my needs inside _settings.scss and will i lose all these changes after one day i succesfully update zurb with: gem update zurb-foundation? If so, is it better practice to create a new scss which holds all my overrides?
3) how to create new .scss file which should override some defaults that _settings.scss listens.
4) should i override the app.css or the _settings.scss
5) when changing top-bar links hover colors, why aren't these applied??? example: $topbar-link-color-hover: #fff; (_settings.scss)
6) i did not have an /img or /images folder in my project after creating it. Hence, i created one myself "/images"
7) any books to buy on foundation 4 with a lot of best practices and tutorials???
I'm sorry but for me honestly it seems way to much time to spend learning the very basics for zurb. I have a lot of experience in c++ projects as in mobile and desktop web projects, so i realy don't feel like a newby but it's almost like i'm pushed to buy support
First I will start off by saying, if you are new to frameworks try something that has a ton more documentation like Twitter-Bootstrap. However since you decided to use Foundation here are the answers to your questions.
1) Setup compass to write the files to another directory that Dreamweaver does not watch. Use a proxy like Charles Proxy to proxy in the files when you are developing locally. This will get rid of the annoying do you want to save this file message. Make the compilation of the SCSS files part of your build process before you deploy your application somewhere other than local.
2) Yes, app.scss has all the import statements. Some of which you might want to comment out if you are looking for raw speed, just fyi. In terms of overrides one thing that you can do is use the Mixins that are provided to you in the other files. Button.scss for example has some fantastic button mixins that allow you to not only create your own flair but inherit most of the Foundation Awesomeness. Another thing, if you notice how all of the variables have a !default. That means that if they are declared somewhere else(read import your variable first), the Default value will be overridden.
3) just make the file and add it as an import before the _settings.scss
4) app.scss has a ton of imports for all the parts of foundation, some you are most likely using and some maybe not.
5) Would need to see the compiled CSS for this one, my guess though without seeing anything is that you missed a variable.
6) Created it because Compass was looking for it? Unless you are planning on using images or creating a sprite (compass can create sprites, which is AWESOME) you can just comment or remove that from the config.rb.
7) Have not seen any. Foundation has much less of a community at this time when compared to Bootstrap. However you can get a leg up by studying up on SASS and SCSS, there is a lot more available on that part.

What is the most straightforward path to move a project from Pinax 0.5.1 to 0.7beta3?

I'm updating a 0.5.1 complete_project to 0.7beta3 + virtualenv + pip + fabric.
I have converted my project into multiple stand-alone applications and I have everything being pulled down by pip from a requirements.txt file.
I am now moving the code over and so far can get the Welcome page and perform a log-in, but then it breaks, due, it appears, to the introduction of Group support and the refactoring of Tribes into Tribes and Topics.
Has anyone successfully made this move? If you did, how did you handle migrating your data? What should I be looking out for? Anyone have a checklist or list of steps? What other exciting challenges do I have to look forward to?
The short answer as far as I'm aware (and I've been following Pinax development for some time now) is that there is no straightforward path to upgrade the project from 0.5.1 to 0.7beta3. I'm not sure how familiar you are with the code, but this is the process I would use based on my limited experience:
Start by using the social_project/ that ships with the latest version of Pinax. Copy into it any changes you made to the settings.py file as well as any custom apps you have.
The templates and media have moved to folders outside of the projects, but if you customized any of them (I'm sure you did) take the custom ones and drop them into the template folders in your project to override those in the default theme folders. You should compare them to those in the theme folders to see what changes may need to be made to keep up with changes in the apps.
The next step would be to do the same thing with urls.py copying any customizations over the one provided by the project.
Try getting it running at this point with a fresh DB. Hopefully any errors will point you in the right direction to stuff that you might have missed or not known about.
Once you gotten it running most of the DB tables should be the same (I believe) except as you mentioned the Tribes stuff. Migrating the data, though, is still beyond what I've had to deal with.
Disclaimer: I've been following development but never had to perform an upgrade quite this big. Good luck and (obviously) back up your work and data before trying to port it all over.
See the documentation and code ( http://github.com/pinax/pinax/tree/master ) for more details. The code is a convenient (though tedious) way to watch the evolution between 0.5.1 and 0.7beta3, for what that's worth.

Stand alone Django app for OS X

For school, I have made a CMS in django for my major assessment task for Software. My teacher has asked to get the source code and, if applicable, the program compiled.
Now, because i dont want my teacher to install django (Something might go wrong, he may get a different version, missing dependences), how can i package up my django app, plus the django source and make the whole thing runnable (on the development server) by running a single script?
He has python, so that does not need to be included and the target OS would be OS X, but Windows can do as well.
Pip and VirtualENV will make this task much easier. (not sure the support for windows though)
PIP will help with the requirements installation.
http://pypi.python.org/pypi/pip
VirtualENV provides an isolated python environment.
URL: http://pypi.python.org/pypi/virtualenv
Reading through this blog post on installing Pinax will give you a good understanding on how the two work together: http://uswaretech.com/blog/2009/03/create-a-new-social-networking-site-in-few-hours-using-pinax-platform-django/
Perhaps Instant Django will set you in the right direction. It's for windows, but it might be of help.
Without having actually tested it, you should be able to copy the main django directory (/usr/lib/python2.6/site-packages/django for me) over into your project directory, and archive the whole thing. This will continue to keep everything importable (from django import ...), and make it so there's just one archive to extract.
Now, I wouldn't say this is a good way, but it's simple, and I think it'll work. I think.
I belive this is what your looking for (it's not pretty but it gets the job done).
It describes how to package django, a web server, and everything else needed to make a stand alone django application. To make it work for osx you should just be able to substitue py2app (http://svn.pythonmac.org/py2app/py2app/trunk/doc/index.html) instead of py2exe and it should (cross your fingers) work, however I have not tested it. Hope this helps!
Ps: sorry for not hyperlinking py2app im a new user and cant post 2 links yet :(