How do you get each item in the ForeignKey field in a list, for example:
class Delegate(models.Model):
excursion = models.ForeignKey(Excursion, limit_choices_to = {'is_activity': False}, related_name='excursion', null=True, blank=True)
Template:
{% for object in formset.excursion_set.all %}
{{ object.lable }}
etc
{% endfor %}
My reason is that I don't want the options to display as a dropdown, but in a custom way that I will style etc.
I have recently been working with a 3rd party API that I had to make so many custom quirky algorithms just to return the basic information that it has basically driven me nuts...
What is your worst experience with a 3rd Party API?
Trying to optimize my MUI 2 NSIS setup in which I do some ExecWait calls in the .onInstSuccess callback function, I was searching through the documentation to find a callback that is called:
after the files are all copied -and-
before the wizard page is being switched from the file copy page to the finish page.
Unfortunately, I found no such callback.
Therefore my question is:
Is it possible to do some custom processing after the files are copied and before the wizard page is being switched away from the file copy page?
So I put in in-place editing for one of my models.
One of the attributes is PRICE.
I used the to_currency method to format the value before it is displayed.
The problem I'm having is that with the in-place editor, I just can't figure out how to set a custom display value.
I'm trying to get the price to display as $20.00 until it is clicked, but the in place editor displays 20.0..
I'm looking for a complete list of security guidelines for programming and deploying PHP web sites and applications on an Apache (Linux) server. Basically, a "security check list" to run through before finishing a project. I.e.,
Cross Site Scripting
Cross Site Request Forgery
Sanitize form data that goes into database
Disable register globals and error reporting in custom php.ini
Upload files below web root
...(the list goes on)
I did some searching on the internet and in this forum, but couldn't find a comprehensive, succinct, and complete list of guidelines.
Thanks in advance.
I am developing a game with Unity 3D and want to use custom code to get strings in the various languages I will be supporting. I've read articles about using the Android "res/values-xx/" directories (such as this page: http://developer.android.com/training/basics/supporting-devices/languages.html). If I do not store my translated strings in this way is there a downside? My main concern is whether the Google Play store may not know what languages my app is localized for.
I have a custom tag in django, but i need use this functionality in a non-view, non-template stage without template engine, there is a way without repeat code?
I have a batch file with some commands that I need to run with my installer, but I'd rather a console not appear (in Windows). I'm executing the batch file from a WiX installer, via a custom action. I tried adding an @ECHO OFF to the top of the file, but that didn't seem to do anything.
Is there a way that I can run this batch file silently?
I am having a problem with the UITableview cell cutting off strings whose characters are more than 12 chars. Any ideas why this would occur? I have not made a custom cell at all. I cannot find any solution to this problem through a Google search. Any ideas?
Does it have any major effect on performance/ memory if my web.config is really huge (say, 1000+ entries in <appSettings>)? Is it a good idea to maintain a different custom xml config file for all business specific settings for my app? Thanks.
In our oroject we already have a lots of tables (100+). Some of them contains a lot of columns (50-100) and we are facing the need of adding more columns from time to time.
What do you think is best - from maintenance and performance point of view - to split these huge tables in smaller entities or to keep the tables the way they are ?
We are using an ORM tools, so we don't need to write custom request.
I've got a custom colour set in Visual Studio and one of the colours when debugging is making things a bit of a misery. Unfortunately I can't figure out which one it is, and when going through and changing all the light background ones, it still remains.
Can anyone point me in the right direction? In this screenshot the current line is yellow, and the caller is the white/cream sort of colour which is the one I want to change...
Thanks very much! :)
Hiya.
I have some MovieClips that act like buttons, how can i do that when the user hovers on the movieclip, the mouse cursor will change to a hand or the default cursor when it hovers a button.
i don't want to create my own custom cursor, i want to use the default set of cursors that come with flash. thanks
using flash cs4, action script 3
I've created a custom solution in WordPress that will generate a CSV file to be downloaded by clicking a simple hyperlink, linked directly to this file. Instead of being prompted to download the file to the computer; the CSV opens in the the browser window instead.
FWIW I'm on Media Temple using a vanilla install of WordPress.
I have downloaded ics 4.0.3 source code, want to modify native settings, what i have to do is
1) add custom modifications to the settings
2) recompile native settings with added modifications
3) build the source code
4) generate a customized build to work on all android devices.
How can I achieve the above thing?
Every suggestion is appreciated.
Thanks in advance.
FYI: Using win7,4gb ram, intel i5 processor. Installed cygwin,git.
Hello!
I have a UITableView with custom cells. The cells containing one UITextView each and the cell is resizing during user type text in the TextView. My problem is when user is on first row in a TextView autocorrection bubbles wont be visible in the current cell. Is there any workaround or can someone point me to another direction?
I need to create multiple /testcontainer: parameters to feed into a task that exec's MsTest.
I have the following :
<ItemGroup>
<TestFiles Include="$(ProjectPath)\**\UnitTest.*.dll" />
</ItemGroup>
for each match in TestFiles I would like to build a string like so:
"/testcontainer:UnitTest.SomeLibrary1.dll"
"/testcontainer:UnitTest.SomeLibrary2.dll"
"/testcontainer:UnitTest.SomeLibrary3.dll"
I am trying to use the internals of MSBuild without having to create a custom task, is this possible ?
TIA
We have a custom remote printer designed with GPRS module. We now need to communicate with the device over the web.
We have to send messages and receive messages from the remote printer, can i do this using Java or PHP.
How do i communicate through GPRS? Will socket communication work?
My layout is like this
Title Layout
Listview
BottomLayout.
I have an 150 item which i have custom layout which i want to add in listview.
So my main problem is i want to add slowly slowly one by one that customlayouts in listview.
So whenever the first screen is displayed i want load 10 items from server and add it to listview.then onscroll down i want to load the remaining 10 items from 150 cutom layouts.
So how can I do this activity?
I'm not sure what happened, but my installer is in a weird state--when I install my MSI, it doesn't seem to be running the current version of the code (I'm using Custom Actions). I verified it by placing some MessageBox.Shows and sure enough, they are not popping up.
It's possible I may have had a few unsuccessful installs previously which may have put the installer in a bad state...but how do I go about resolving this?
Thanks...
I'm doing custom-rolled view tracking on my website, and I just realize that I totally forgot about search bots hitting the pages. How do I filter out that traffic from my view tracking?
After another question about iterators I'm having some doubts about custom containers. In my container, iterator is a subclass of const_iterator, so that I get conversion from non-const to const "for free". But is this allowed or are there any drawbacks or non-working scenarios for such a setup?
Hi!
I would like to create some kind of open free "group" posting of photos with geotags
First I thought about Panoramio, but seems there is no API for photos upload.
By now I can see only two ways:
Flickr - there are groups but you have to approve group membership anyway, or use tags for grouping which is bad for maintenance
Custom server solution which will cost efforts and hosting
Can you suggest other free photo services with geotags functionality, or opensource solutions?
Thank you!