|
Has anyone gotten a Django app working on Openshift? My app works locally, and on Heroku. I want Openshift, because this is a productivity enhancer at work; Heroku and unknown sites are blocked, but Openshift isn't. After modifying the directory structure and settings.py a bit, it mostly works on OS, but stylesheets and my database will not load. My project structure is Django standard, so all I should need to fix it is a working example to look at.
|
# ? Jan 19, 2014 21:00 |
|
|
# ? May 16, 2024 18:28 |
|
Suspicious Dish posted:
Thanks! I have another problem, though. Is there any situation that would cause part of a stylesheet to not load? Because I have this in my .css file: CSS code:
edit: Okay, so wait. I'm using Flask's message flashing functionality to load messages into an HTML template. This code: code:
code:
Pollyanna fucked around with this message at 21:14 on Jan 19, 2014 |
# ? Jan 19, 2014 21:11 |
Yup that sounds like a relative path issue like the one your form had. Double check the path to your stylesheet on the <link/> element. In the developer tools for your browser (F12) you can check the network tab to see if it is hitting a 404 trying to load your stylesheet on certain pages.
|
|
# ? Jan 19, 2014 21:25 |
|
No, I replaced those references with url_for rules a while back. The stylesheet itself loads just fine, it's just for some reason missing that one rule while keeping everything else. Since there's always going to be SOME sort of message flashing in my case, I just removed the if statement. When I do that, the rule is actually there when I check the stylesheet. There's a similar problem happening for the werkzeug validator message flashing, though, which irritates me to no end. edit: Wait, now the list-style-type rule displays fine, but text-align: center; doesn't. Pollyanna fucked around with this message at 21:37 on Jan 19, 2014 |
# ? Jan 19, 2014 21:30 |
|
glompix posted:Well, it doesn't matter about a back button anyway if the list implements infinite scrolling. Sure, you could hash nav on the page they're on and fast-forward to that on back navigation, but that's pretty inefficient compared to just opening in a new tab by default. You could still implement the other behavior too - you're just saving yourself some bandwidth using target="_blank". Ah, I'd completely agree with that. That was one of the NOT A GOOD REASON things in the article, said it is the designer's responsibility to implement something that allows users to back button their way to the exact point they left. Which will almost definitely gently caress up in certain situations no matter how carefully it's implemented, and as you say, is somewhat of a waste of bandwidth. Simple solution vs. overly complex one seems no contest, but hey ho
|
# ? Jan 20, 2014 00:06 |
|
cbirdsong posted:You could also tell him Windows XP is getting end of lifed in April: http://www.microsoft.com/en-us/windows/enterprise/endofsupport.aspx ...we have some servers that still run Win98 because he refuses to upgrade the software on them, and since the software is "essential" we go by the "if it aint broke, don't fix it" method of things. But I think I'll just design for chrome/firefox, show him the results on firefox and point out that most of our clients have probably upgraded alread, and those that havent, well, they'll still get all the info off the site, they just won't get pretty. I've at least resolved the "everything on the website is a giant table" problem. Now I'm just CSS'ing up the info. With banner ads, is using a carosel a no-no? I've got our banners on some hacked together carsoels, and they look all right, but I was wondering if there's a better way to do it. E. Also - easiest way to get an RSS feed to look pretty? I'm just using an rss feed reader app from google's app/widgets collection, and I've prettied up some of the css on it, but if there's a cool "professional" way to do it, I'm all ears. \/\/\/ Alternatives to using a carosel for banner ads? Prior implementation was just string them together in flash and loop em. Which I can certainly still do. They're not really "ads" coming from a 3rd party server, they're in-house promo banners for the shows we run. (although I'm trying to talk my boss into doing tradeout with one of the local ad firms to get the banner ads run on other sites...) Dr Jankenstein fucked around with this message at 14:47 on Jan 20, 2014 |
# ? Jan 20, 2014 14:11 |
|
AA is for Quitters posted:
http://shouldiuseacarousel.com/
|
# ? Jan 20, 2014 14:31 |
|
AA is for Quitters posted:With banner ads, is using a carosel a no-no? I've got our banners on some hacked together carsoels, and they look all right, but I was wondering if there's a better way to do it. A lot of the rules about usability/good design go out the window when you start talking about ads, imo. Carousels are probably fine, but know that 95% of people won't pay attention to it and the 5% that do won't pay attention past the first slide. If it's really something you'd like users to click you should try a completely different treatment other than ads. However judging by your boss's "if it ain't broke" attitude, I'd guess that isn't going to be possible. AA is for Quitters posted:E. Also - easiest way to get an RSS feed to look pretty? I'm just using an rss feed reader app from google's app/widgets collection, and I've prettied up some of the css on it, but if there's a cool "professional" way to do it, I'm all ears. You could try a JS RSS feed loader which you could then style with CSS. I've been using zRSSFeed on a project for lack of a better alternative. It works fine but has some annoying caching issues that, when overridden, result in pop-in. But it works. There are a bunch of PHP/ASP/[insert language of your choice] RSS tools out there in the world, but I'd rather load something like that asynchronously.
|
# ? Jan 20, 2014 15:04 |
|
kedo posted:A lot of the rules about usability/good design go out the window when you start talking about ads, imo. Carousels are probably fine, but know that 95% of people won't pay attention to it and the 5% that do won't pay attention past the first slide. Agreed. For actual content, carousels are awful, and should never be used. Ads, since nobody looks at them anyway, are fine in a carousel.
|
# ? Jan 20, 2014 15:25 |
|
I prefer http://www.modern.ie/ie6countdown when I'm trying to convince someone to stop caring about IE6. It's Microsoft's own countdown to its own hellspawn's irrelevance Actually, I guess that could backfire if you have a lot of customers in China, but eh
|
# ? Jan 20, 2014 17:05 |
|
Munkeymon posted:Actually, I guess that could backfire if you have a lot of customers in China, but eh We do
|
# ? Jan 20, 2014 17:08 |
|
kedo posted:A lot of the rules about usability/good design go out the window when you start talking about ads, imo. Carousels are probably fine, but know that 95% of people won't pay attention to it and the 5% that do won't pay attention past the first slide. Thanks! ...our website exists solely as something my boss can show clients as a "see, we exist" thing. I'm trying to make it pretty with a carosel in the middle showing our current decent shows, an RSS feed for the news org we've got a deal with since we're an indie that doesn't do our own news cast, and a little bit of info about us. No one actually pays any attention to our site to begin with. Running some analytics we've gotten 15 hits since the start of the year. 5 of those have been me or my boss testing things... \/\/ we're a TV station, we don't do a local newscast so there's no need to put local news/weather on our website, we don't sell anything via the website, and in the days of on-screen guides, there's no need for people to check out website to see what's on right now. so yeah, there's really no reason for people to check our website, and we could probably be served just as well with simply a facebook page, but my boss is a 60 year old man whos terrified of social media. (he's...eccentric. to say the least. have you seen UHF? I work in the real life version of that movie) Dr Jankenstein fucked around with this message at 19:06 on Jan 20, 2014 |
# ? Jan 20, 2014 17:17 |
|
AA is for Quitters posted:Thanks! What's the business? Depending on what you guys do, if you're only getting ~10 hits a month you might be better off spending your time working on improving your Yelp/Angie's List/social media pages. But that depends entirely on what you guys actually do. e: Also who gives a poo poo about IE 6 with so few visitors? Sounds like you're wasting your time with this site.
|
# ? Jan 20, 2014 18:18 |
|
Fellow web devs, what's your thoughts on the 12 factor app guidelines? I found a link to it in my "read later" bookmark folder and I finally read it the other day. Maybe I got the link from here? Anyway it seems like some good ideas are in there. But I do wonder about point 7, Port Binding. I don't see what the great advantage is of having a webapp be it's own webserver as opposed to using an existing system like Apache/nginx/Tomcat. All my backend stuff has been in PHP and at my current job runs through IIS and FastCGI, so I have no experience making a web app that does port binding. Anyone familiar with the pros & cons of such a setup?
|
# ? Jan 21, 2014 01:39 |
|
PlesantDilemma posted:Fellow web devs, what's your thoughts on the 12 factor app guidelines? I found a link to it in my "read later" bookmark folder and I finally read it the other day. Maybe I got the link from here? Anyway it seems like some good ideas are in there. But I do wonder about point 7, Port Binding. I don't see what the great advantage is of having a webapp be it's own webserver as opposed to using an existing system like Apache/nginx/Tomcat. All my backend stuff has been in PHP and at my current job runs through IIS and FastCGI, so I have no experience making a web app that does port binding. Anyone familiar with the pros & cons of such a setup? On the other hand, PHP was never designed with this model in mind, so I'm not sure what the options are for standalone execution besides FCGI and FPM binding. Vulture Culture fucked around with this message at 01:44 on Jan 21, 2014 |
# ? Jan 21, 2014 01:42 |
|
What's the deal with programs like Grunt, Bower, Node, etc.? Are they all independent things or is there something I can download that will take care of them all?
|
# ? Jan 21, 2014 03:19 |
|
Pollyanna posted:What's the deal with programs like Grunt, Bower, Node, etc.? Are they all independent things or is there something I can download that will take care of them all? Node is a webserver written in JavaScript. Node has packages that give it more functionality. Grunt is one such package that let's you create tasks, such as running a local development server with live reload, compiling scss, jade, near anything you need in the course of development. Bower is a poor mans package manager for JavaScript on the client side. It fetches dependencies like jquery, angular, ember, etc and puts them in a folder called 'components' by default. It's not particularly good and it doesn't handle things like customised builds of dependencies. Some package maintainers are really bad at semantic versioning too which can break your builds.
|
# ? Jan 21, 2014 05:38 |
|
Misogynist posted:When you're tightly coupled to the frontend webserver, it becomes much more difficult to run your app on something like Elastic Beanstalk or Heroku. Misogynist posted:PHP was never designed I'm just starting to try to transition out of the PHP world to the Java web world and it's a lot to take in. So much more to learn.
|
# ? Jan 21, 2014 09:29 |
|
PlesantDilemma posted:Sounds legit, if you are planning on going the PaaS route for hosting, or just want to keep it an option for your system. But isn't there a tradeoff? If my app is built for a specific frontend then won't I get some benefits? It seems like most Java web apps have to go through Tomcat. What does Tomcat provide that would make it a better choice over making my app listen to port 80? Or whatever the Tomcat equivalent for webdev is in ruby/lua/c#/perl? You should still be using Apache/Nginx to front your webapp containers. You can serve static files directly to your CDNs through them as well as allowing route rewrites for other pieces of your stack. SSL termination is also a good thing to have. You can also have zero downtime deploys without needing a specific Webapp container that does so using Apache/Nginx which should absolutely be a part of your server stack in today's architectures.
|
# ? Jan 21, 2014 09:53 |
|
Looking for general ideas about how to approach this problem. Throwing ideas against the wall to see what sticks. I'm working on a site that's really two sites designed to appear as one. One is running WordPress, the other is running Ambra, an open source "journal management and publishing system." Basically it's a CMS designed specifically for academic journals. My issues is delivering content from the WordPress site into the sidebar of the Ambra site. Right now I'm doing this with RSS and a JS RSS feed loader which works fine, but I'm worried about extensibility. I already had to hack something together to add support for <media:content> elements (which doesn't work with lte IE 8), but my client is also hinting at wanting to include video, slideshows and other more complicated content in the future. What I'm thinking about right now: creating a new page on the WP site that just spits out formatted content based on a URL query, grabbing that as a page fragment with ajax and popping it into the sidebar. However the client has already stated he's worried about content pop-in, so I'd probably need to cache stuff somewhere as well. Does this seem logical, or am I approaching this rear end backwards? Can anyone think of a better solution?
|
# ? Jan 21, 2014 15:41 |
|
Pollyanna posted:What's the deal with programs like Grunt, Bower, Node, etc.? Are they all independent things or is there something I can download that will take care of them all? What Maluco said, but to add - you need to get Node seperately (and then install NPM, though if you're mac Homebrew does them both at once now), but if you're just looking for scaffolding, then you can use something like Yeoman which wraps Bower and Grunt. Lineman is cool as well, doesn't specify Bower or wrap terminal commands and has some nice stuff attached. You'd be better off just doing npm install grunt and npm install grunt-cli and then learning how to use it, it's p easy and dead useful, though obviously YMMV. Bower's ok for some things, it does just about what it says on the tin depending on what you want. Here is an overview of the current landscape re package managers: https://github.com/wilmoore/frontend-packagers. Component is IMO the best, TJ Holowaychuk makes pretty good things, but it is more of a concept and have fun finding any documentation.
|
# ? Jan 21, 2014 16:01 |
|
My impression is that grunt is essentially make for the web and Bower is a good idea whose time is not quite here yet. Last time I tried Bower, I liked the idea of pulling in dependencies without seeking them out and downloading them manually, but I found that the packages were inconsistently named, with inconsistent directory structures and variable amounts of extra cruft inside, so I'd still have to go through and move things around / delete leftovers. Maybe it's gotten better since then, but at the time, it wasn't much better than manually downloading the files I needed.
|
# ? Jan 21, 2014 17:19 |
|
If you ever thought to yourself "I wish make was worse and depended on node-loving-js" then grunt is the tool for you.
|
# ? Jan 21, 2014 17:26 |
|
Kobayashi posted:My impression is that grunt is essentially make for the web and Bower is a good idea whose time is not quite here yet. Last time I tried Bower, I liked the idea of pulling in dependencies without seeking them out and downloading them manually, but I found that the packages were inconsistently named, with inconsistent directory structures and variable amounts of extra cruft inside, so I'd still have to go through and move things around / delete leftovers. Maybe it's gotten better since then, but at the time, it wasn't much better than manually downloading the files I needed.
|
# ? Jan 21, 2014 17:34 |
|
Kobayashi posted:My impression is that grunt is essentially make for the web and Bower is a good idea whose time is not quite here yet. Last time I tried Bower, I liked the idea of pulling in dependencies without seeking them out and downloading them manually, but I found that the packages were inconsistently named, with inconsistent directory structures and variable amounts of extra cruft inside, so I'd still have to go through and move things around / delete leftovers. Maybe it's gotten better since then, but at the time, it wasn't much better than manually downloading the files I needed. I had this impression of NuGet (Microsoft's package manager) when I used it the first time. I'm pretty sure it'd be true of any package manager that tries hard. In MSFT space though, everyone likes Content/Scripts folders for some reason so that kind of works a little. If you're in an ecosystem where there isn't a canonical framework for X then I can see how that'd be an even bigger problem. Just think about the process of bulk-updating your dependencies though. It's way too easy and naive. If you update a dependency, you have to test the change anyway. That's a lot more work than just downloading it and sticking it in there. For that reason I'm starting to prefer downloading from the package manager since it's easy and centralized when I'm starting a project, then arranging things the way I want and deleting the cruft. Then, I never use the package manager again unless I want a completely new component. It's okay that I can't update it through the package manager, since I won't be doing that lightheartedly anyway. However, I do get whatever extra bootstrapping the package manager gives me in terms of config file updates or whatever you need done. (this might just be a NuGet thing) So, the conclusion I'm coming to as I write this post is that package managers are lovely app stores that you can't effectively update from. I'd love someone to show me the light if this is wrong. glompix fucked around with this message at 17:41 on Jan 21, 2014 |
# ? Jan 21, 2014 17:35 |
|
Ethereal posted:You should still be using Apache/Nginx to front your webapp containers. You can serve static files directly to your CDNs through them as well as allowing route rewrites for other pieces of your stack. SSL termination is also a good thing to have. You can also have zero downtime deploys without needing a specific Webapp container that does so using Apache/Nginx which should absolutely be a part of your server stack in today's architectures. You're talking about sticking an Apache/Nginx caching proxy in front of the production servers, right? If so, how would that get you zero downtime for dynamic content?
|
# ? Jan 21, 2014 18:07 |
|
I give up. I open up the FTP properly rather than just dragging and dropping the same flash file that I just keep updating and resaving that has our weekly movies in it for the first time and... EVERY SINGLE FILE ANYONE HAS EVER CREATED EVER AT THIS PLACE IS ON THERE. Seriously, going back to 2008, there are random excel files (including our sales package), all kinds of old, outdated graphics...no one has performed any sort of cleanup on this thing ever. There's the .psd versions of all the graphics, i guess it was a dreamweaver thing to require the .psds or upload them along with the actual graphic? I don't know but oh my god, it's a horrible unorganized mess. I think whoever was "Webmaster" before me just uploaded the mydocs folder every single time and called it a day. ...I'm just dumping it all into a folder called "the horror" and being glad I'm redoing this from the ground up. And discovering the awesomeness of jcarousel to do the most annoying thing on the planet and NEST carousels! (It's pretty much just dumping a carousel in the middle that cycles through our various dayparts and shows what we air during those.)
|
# ? Jan 21, 2014 18:10 |
|
Maluco Marinero posted:Node is a webserver written in JavaScript. Node is not a web server. Node is a non-browser implementation of the Javascript programming language. It *can* run a web server, but it can also just be used for file management or anything else you want to do on a computer.
|
# ? Jan 21, 2014 18:49 |
|
Oh, is that what that is? I always wondered what the hell it was for, cause I knew it wasn't just a JavaScript file downloader.
|
# ? Jan 21, 2014 19:12 |
|
kedo posted:Looking for general ideas about how to approach this problem. Throwing ideas against the wall to see what sticks. Yeah at this point I'd just be looking at the Wordpress JSON Rest API.
|
# ? Jan 21, 2014 19:26 |
|
libcxx posted:If you ever thought to yourself "I wish make was worse and depended on node-loving-js" then grunt is the tool for you. This is kinda true, but it does work, and it's easy to use, and you're just being finickity. Get thee back to that rocking chair
|
# ? Jan 21, 2014 20:03 |
|
Misogynist posted:For larger applications in latency-sensitive environments (particularly mobile), you'll probably be integrating your Bower components with a build system that minifies and concatenates your scripts and stylesheets, so it doesn't end up being a real handicap in practice -- you'll never just deploy your whole directory of sources. Ahh OK, I can see that. I have a different use case: My job is to occasionally build prototypes that demonstrate design ideas, without worrying about things like latency, memory usage, performance, older browsers, etc. Because I'm not a real developer, I try to keep my environment as simple as possible. When I'm working on something, I run a super simple, Express-based Node server locally, with everything else as client-side Javascript. With LESS in watch mode, all I need is a text editor, a browser, and web server -- any web server -- to make changes. It doesn't matter what my client is running, I just need an FTP login and I can "deploy" my work for them to play with. Sure SASS is more powerful and concatenation/minimization is essential for real-world apps, but the scope of my work is such that I don't care about such things. With that in mind, I was hoping bower would let me say "bower jqeury" or "bower moment" or "bower handlebars" and it would go grab the scripts (and any dependencies), strip the version from the filename (if specified) and put them all in a standard, predictable location without any other cruft. I realize it's my own laziness holding me back from embracing a real build system, but I don't do anything complicated enough to force me to learn it right now. On the contrary, I'm actually being driven to try to learn something like require.js so that I can programmatically bring in random Javascript libraries. From what I can tell, this is highly discouraged, but it works for my needs (highly wasteful demos/prototypes).
|
# ? Jan 21, 2014 20:13 |
|
MonkeyMaker posted:Node is not a web server. Node is a non-browser implementation of the Javascript programming language. It *can* run a web server, but it can also just be used for file management or anything else you want to do on a computer. Yeah, sorry, you're right, I used my words very inaccurately.
|
# ? Jan 21, 2014 20:14 |
|
Edit: double post
|
# ? Jan 21, 2014 20:15 |
|
glompix posted:I had this impression of NuGet (Microsoft's package manager) when I used it the first time. I'm pretty sure it'd be true of any package manager that tries hard. In MSFT space though, everyone likes Content/Scripts folders for some reason so that kind of works a little. If you're in an ecosystem where there isn't a canonical framework for X then I can see how that'd be an even bigger problem. If you don't deviate from a lot of the conventions that Microsoft sets up in its frameworks, NuGet is wonderful. Also, if you installed a package initially through NuGet, it's so ridiculously easy to update it through NuGet that I don't understand why you would do something else. Though in my opinion, the best part about it is the Visual Studio integration for package auto-restore. You can pull down a copy of code with a packages.config file and no libraries, open it in Visual Studio, and try to build then VS will automatically grab all the dependencies before starting the build.
|
# ? Jan 22, 2014 14:56 |
|
libcxx posted:If you ever thought to yourself "I wish make was worse and depended on node-loving-js" then grunt is the tool for you. Node is basically the easiest runtime of any language to get up and running with. There's no virtual environments or bundler to worry about. The problem with Grunt is that its declarative nature makes it a poor fit for creating complex build pipelines, and it totally lacks any kind of partial rebuild support (i.e. I have ten ES6 files that get compiled through Traceur and concatenated, I change one, all of them have to rebuild). Also the problem with Bower is that it's based on loving Git and after years of telling people "don't check in your built assets to Git" you now have to tell devs "okay check in your built assets to an orphaned build branch or another repo," which is a pain in the rear end compared to npm publish. There's apparently a slow-rear end rewrite of Bower happening to add a real registry, but really we just need to use NPM for browser packages because it literally already does everything you'd want it to do except let you install to a folder not called node_modules Kobayashi posted:Ahh OK, I can see that. There's nothing discouraged about Require.js, except for the part where its documentation is unreadable. Just make sure to run it through the optimizer (probably via Grunt) before deploying. Please Use Modules. If you're writing more than one <script> tag in 2014, you're doing something wrong.
|
# ? Jan 22, 2014 15:22 |
|
Bognar posted:If you don't deviate from a lot of the conventions that Microsoft sets up in its frameworks, NuGet is wonderful. Also, if you installed a package initially through NuGet, it's so ridiculously easy to update it through NuGet that I don't understand why you would do something else. Though in my opinion, the best part about it is the Visual Studio integration for package auto-restore. You can pull down a copy of code with a packages.config file and no libraries, open it in Visual Studio, and try to build then VS will automatically grab all the dependencies before starting the build. This argument has been beat to death on these forums, but I think it's a better idea to package your binary dependencies with your code. Your software may need very long-term support, (the project I'm working on right now has been around 10 years and just will not die) and so it makes sense to not solely rely on external sources for that kind of thing. But yeah NuGet isn't so bad because of those conventions. "Update all" just isn't something you're going to ever do in a big project with many little front-end dependencies, so it kind of defeats some of the advantage of having the system past the initial bootstrapping. I think I'm splitting hairs at this point though. NuGet and Bower are great overall.
|
# ? Jan 22, 2014 15:42 |
|
Okay, I'm a bit lost on the whole Nodejs thing. What usually happens when you decide to make a new webapp? Is there an article that covers the typical development of a web app using not-necessarily-Node? Is Node necessary if I'm planning to use a framework like Flask?
|
# ? Jan 22, 2014 22:55 |
|
Pollyanna posted:Okay, I'm a bit lost on the whole Nodejs thing. What usually happens when you decide to make a new webapp? Is there an article that covers the typical development of a web app using not-necessarily-Node? Is Node necessary if I'm planning to use a framework like Flask? No, you don't have to use Node and Flask together. You could but they end up solving a lot of the same problems so you'd probably want to pick one or the other. As for guides or whatever, if you're going with Node, learning Express won't serve you wrong.
|
# ? Jan 22, 2014 23:23 |
|
|
# ? May 16, 2024 18:28 |
Pollyanna posted:Okay, I'm a bit lost on the whole Nodejs thing. What usually happens when you decide to make a new webapp? Is there an article that covers the typical development of a web app using not-necessarily-Node? Is Node necessary if I'm planning to use a framework like Flask? I'd say stay away from node for now, don't let it distract you from the python/flask stuff you are learning
|
|
# ? Jan 23, 2014 00:01 |