Entries in 'Django'

How To Give Text An Inner Shadow With Css

This is how I did it...  

color: #38738f;
color: rgba(17,59,88,0.8);
text-shadow: -1px -1px 3px #fff, 0px 0px 1px #000;
h2 {color: #38738f; color: rgba(17,59,88,0.8); text-shadow: -1px -1px 3px #fff, 0px 0px 1px #000;}   which produced...     notice: I gave the h2 a fallback color for when the browser doesn't support rgba values. But most do ...

How To Filter A Django Form's Multiple Choice Or Foreign Key Set With A Generic View

On an app I am working on I needed to relate a photo to a project. I created a model called Connection. It basically has two fields. "Photo" and "Project". They are both foreign keys back to the Photo and Project models. Well I ran into a problem. I wanted to be able to say okay associate photo A with project B. I could do ...

How To Make A Website Mobile Friendly And Responsive

This is how to make your website mobile friendly and what is known as responsive. Also known as Responsive Web Design.

How To Get The Next And Previous Object From A List Of Objects Or Queryset

With django's help, I made a photo app. Each photo can belong to multiple Projects. I can get a list of photos for a Project and display their thumbnails. When I click on a thumbnail it pops up the large version of the photo in a nice div on the screen. I wanted to be able to click "next" or "previous" and get the next or previous photo in the project, and not the next or previous photo from the entire list of photos that is returned by my manager.

Django Dumpdata To Fixture For Initial Data

A useful command for dumping database data to a data serialization format that I always seem to forget...