views

sending email templates in with django

Hello, I want to send an email with a template like this. {% extends "base.html" %} {% block content %} <h2>Invoice Details</h2> <div id="horizontalnav"> <a href="/index/add_invoice">Add an Invoice</a> <a href="/index/work_orders">Add a Work Order</a> <a href="/index/add_payment">Add Payment</a> </div> <ul STYLE="border: 1px soli...

Error when wrapping the view of a 3rd-party Django app? (Facebook, django-socialregistration, django-profiles)

I'm using django-socialregistration to manage my site's connection with Facebook. When a user clicks the "Connect with Facebook" button, I am able to automatically create a new Django user and log them in. However, I also need to create a UserProfile (my AUTH_PROFILE_MODULE) record for them which contains their Facebook profile inform...

Drupal 6 Views: Multiple Dependent Navigation Displays

Assume a collection of nodes that we want to display in a view. Like all Drupal nodes, they have a published-on date. Assume that we want to organize them by that published-on date. Now, what I want is a page with TWO different navigation blocks. One that looks like this, where each year is a link to that years' posts: 2006 | 2007 |...

ASP.NET MVC 2 - Using EF4 with List scaffolding

I want to show a list of game reviews for editing. This is simple to do with VS' built-in scaffolding, but I'm running into issues with handling an entity's associated EntityCollections. My controller method is currently: public ActionResult ShowReviews() { var reviews = _siteDB.Games.Include("Genre").Include("Platforms").Include(...

How to draw a combination of views

Hello experts, I wanted to have a custom layout where I would have gallery on top, then below it to have a simple widget to show the picture when it is chosen from the gallery. I could not figure out how to compose that main.xml to achieve it, your advice will be greatly appreciated. The gallery layout xml is straight from the google tu...

Anyone have example code using switched Views instead of Activities inside a TabHost on Android ?

The Android developer guide (http://developer.android.com/resources/tutorials/views/hello-tabwidget.html) states: `You can implement your tab content in one of two ways: use the tabs to swap Views within the same Activity, or use the tabs to change between entirely separate activities. Which method you want for your application will dep...

ASP.NET MVC2 and EF4 - Creating checked checkboxes in an Edit view

I'm currently in the process of creating a shared Edit/Create view for my game review project and have hit a snag. Each game can be a title on a variety of platforms. I have this mapped as a many-to-many relationship in my EF4 model. For my view, I'd like to have a series of checkboxes with the names of each platform, and, for the Edi...

MVC - Multiple Strong Type object ...inside one view

After so many years using ASP.Net, I’m still trying to figure out how to achieve the same results using MVC. I have a materpage with a control that is strongly type to something. When I navigate to a view of a different strongly type model ...and click on the button to execute something, I get "The model item passed into the dictionary...

Rails How to escape and display the contents of a rendered view

I am trying to show a rails view file in a textarea. the view file contains a bunch of HTML, which I want to escape so that it does not interfere with on page html. here is an example: In this view we are going to display the contents of a partial <textarea> <%= html_escape render('partial') %> </textarea> and in partial.html.erb I ...

Can I make Visual Studio place curly braces on the same line as an if statement (in HTML)?

In Visual Studio while designing MVC views (in .aspx or .ascx files) I often use if statements. When I auto-format (Ctrl-K,D), VS wraps the braces in this really ugly and hard to read way: <% if (Model.UserIsAuthenticated) {%> (some HTML goes here...) <% }%> Is there any way to make Visual Studio auto-format like this instead:...

MySQL storing view data over time, how to reference

Tables: videoID (vidID, vidName, vidURL) etc. viewCount (vidID, views, timestamp) The main goal of this database is to calculate the slope between the most recent view and the previous one. Lets say I automatically store the view data in the database once everyday. This means all the view data for all videos is in one big table call...

Dealing with Large Bitmaps (tiling a small bitmap to create wallpaper)...

I'm having memory problems and think it might have to do with creating large bitmaps. The task at hand is to get a fairly small tile image and create a larger tiled image and set this as the phone wallpaper. The way I'm doing this is: 1) Create a view that is 2 * screen width, 1 * screen height 2) Set the view background to a ...

How to access a View by an ID of the android namespace

In hierarchy viewer there are several IDs as shown above, for example "id/timepicker_input". But I can't find a respective timepicker_input - ID when typing myNumberPicker.findViewById(android.R.id. ...? ); So how to access these Views by their ID? ...

Images patch relative to [custom] view directory

Hi, In my Rails application, user may have custom page templates (not for the application) which are stored in public/user_templates/user1/ the view .erb file is also stored there in the user template folder. There is an images folder inside every template folder. How can I use the relative paths of the images in the .erb file? For e...

ImportError when trying to import from module directory. (Django)

Imagine a classic Django directory structure. INSTALLED_APPS contains an entry pointing to "myApp". I have models, views, etc. in that directory and it works fine. I've created a file called decorators.py in that directory. In one of the views, I'm trying to import some of those decorators but I'm getting: ImportError at / No module na...

T4MVC MVC2 Views in Areas not generated

I just create an empty MVC2 project. Add an Area and a controller and a view to it. Include T4MVC files into the project and run the custom tool. Everything is generated except the ViewNames for the views in the Area. My tree structure: Areas MyArea Controllers MyTestController.cs Views MyTest MyTestView.aspx MySecondTestVie...

DB Design question regarding intersections

Of these two designs for a crossroad database #Street street_id | street_nm #Crossing crossing_id | x | y | street_id_1 | street_id_2 VS #Street street_id | street_nm #Crossing crossing_id | x | y #street crossing relationship street_id | crossing_id Assuming every crossing has only exactly two roads, is there a reason why one wou...

ViewData as a hyperlink

I an ASP.NET MVC we can pass some data via a ViewData and then show it on a page: <%: ViewData["Foo"]%> But how to make a hyperlink out of it? Something like following: <%: Html.ActionLink(ViewData["Foo"], "Index", "Home") %> ...

manage users views with different roles cakephp

Possible Duplicate: how should I render views when users habtm roles. cake hi i got users habtm roles the thing is when i login i dont know how to separate or mix the views for users that have more than one role... any help? how would you manage this issue? by letting the user select which role he wants to play? or mixing ...

How to insert a subview with xib?

Hello! I'm confused something fierce over having multiple views. I simply want to have a button on my main view that activates a new view, which in turn would have an (x) button which goes back to main view. For the life of me, I can't figure out how to do this with two separate .xib files. How might this be done? Thanks! ...