I'm trying to bring Django admin to front-end. The problem is in most cases I just have to write trivial model forms. Is there some way to use ModelAdmin forms outside of Django Admin?
I want to write a custom ValidationAttribute that checks if the given value is unique or not.
The problem is that in the edit screen, it is not guaranteed that the user actually changed the value, resulting in a false error.
Is there a way to check in my attribute whether the value actually changed? Or can I trigger the attribute only when the value has changed?
I'm getting the feeling this requirement maybe just doesn't belong in an attribute?
I keep getting 'warning: control reaches end of non-void function' with this code:
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
if (section ==0)
{
return [comparativeList count];
}
if (section==1)
{
return [generalList count];
}
if (section==2)
{
return [contactList count];
How can I get rid of this warning?
Thanks.
If I'm creating a C# wrapper for a stored proc, and that sp only returns/selects (not sure) 1 value, should I use return or select at the end of that sp?
This is for t-sql.
Hi, I have a problem commiting to svn server, Here's what I got,
File Can't read
'D:\SVNROOT\UC\db\txn-current'.: End
of file found
(It's traslation of Korean, so there's might be differ than what English error said..)
In previously, I shut down transaction when update from svn, cause some file was so big,
so I was shut down downloading for delete big files first, but after that, I got message
about 'txn-current',
does anybody can help me to solve this?
thank you for regarding this
Hi,
Its my 1st App using ZF. As our client requirement i have made separate admin and front panel. Without using Zend_Acl. I have problem when session expires it always takes me on front end log in page . I have tried to solve it by session but it's using single session for both admin anf front panel. I there any way so i can create separate session for both admin and front panel ?
Hello,
i just asked a question few minutes ago which led me to this one :
I want to know if there is any chance to use only the back-end of wordpress ?
I mean,
link my admin interface to post news
link my visitor interface on my website to the wordpress news so the visitor can access the news
So the visitor never find out that i'm using wordpress to generate the news and handle their comments and write my news ?
Maybe it's possible but there is no point by doing so ?
Thank you
I created an UITextField in my App. This text field display a long text.
The problem is that when I first open the view containing the UITextField, it is automaticaly show the end of my text. But I want it to show the begining.
I read the UITextFiled Class Reference on Apple dev center, but nothing seem to allow me to change it.
How can I do?
I am just starting out with ADO.net Entity Framework I have mapped two tables together and receive the following error:
Error 1 Error 11010: Association End 'OperatorAccess' is not mapped. E:\Visual Studio\projects\Brandi II\Brandi II\Hospitals.edmx 390 11 Brandi II
Not sure what it is I am doing wrong
Hello,
i just asked a question few minutes ago which led me to this one :
I want to know if there is any chance to use only the back-end of wordpress ?
I mean,
link my admin interface to post news
link my visitor interface on my website to the wordpress news so the visitor can access the news
So the visitor never find out that i'm using wordpress to generate the news and handle their comments and write my news ?
Maybe it's possible but there is no point by doing so ?
Thank you
Hi
what will be the regular expression to extract challenge var value
i am interested in this vlaue
03AHJ_Vut9LJLOJuCsjF9PbSSMncTyUe7Y4dHX11eRLae3LGfDZ0hSfDR7jZq2ZrKJxyC-LRSSppv72oHKaQMsd-EnoVNL6p7liTh7siN26zzTA_E2rcC_JQ15613Azz4qm8HjPtAyksUdc7QZydszwolk92hBPrAAig
this value changes every time we refresh it so the expression has to be generic enough to pick up what ever is the value
var RecaptchaState = {
site : '6LeKCL8SAAAAADV5Dr-lfY2eOEV8rubeN25BAKp2',
challenge : '03AHJ_Vut9LJLOJuCsjF9PbSSMncTyUe7Y4dHX11eRLae3LGfDZ0hSfDR7jZq2ZrKJxyC-LRSSppv72oHKaQMsd-EnoVNL6p7liTh7siN26zzTA_E2rcC_JQ15613Azz4qm8HjPtAyksUdc7QZydszwolk92hBPrAAig',
is_incorrect : false,
programming_error : '',
error_message : '',
server : 'http://www.google.com/recaptcha/api/',
timeout : 18000};
any help will be appreciated, or any method to extract this value in any server side lang
How can I order the nodes alphabetically in my Drupal back-end ?
I cannot sort the columns by clicking on the headers unfortunately. Should I hack the code or install any plugin ?
Using PHP how can I get week's start date and end date from any given date. For example 2010-05-13 is Thursday so how can I get 2010-05-09 (SUN) and 2010-05-15 (SAT)
I am attempting to set a value in a textarea field using jquery with the following code:
$("textarea#ExampleMessage").attr("value", result.exampleMessage);
The issue is, once this code executes, it is not altering the text in the textarea?
However when performing an alert($("textarea#ExampleMessage").attr("value")) the newly set value is returned?
I am looking for a way to insert javascript code block to end of ASP.NET page.
Page.ClientScript.RegisterClientScriptBlock(typeof(Page), "showVideo", sScript, true);
is appending to body but js codes are always requesting some js files didn't load or some functions are below of the script.
How can i append scripts that i generated dynamically to the bottom of body?
Thanks for your help.
I would like to calculate end date (and time) of an event. I know starting date and duration (in minutes). But:
I have to skip holidays - non-recurrent situation
I have to skip weekends - recurrent situation
I have to not count working time (e.g: from 8:00am till 5:00pm) - recurrent situation, but with finer granularity
Is there a simple way to achieve these cases using Joda time library?
Hi,
How can i copy a substring from a given string with start and end index or giving the start index and length of the string are given.
Thanks,
iSight
Hello all
I'm trying to find all the 6 digit numbers in a string that do not end in 00.
Something like that
/([0-9]{4})([^00])/ //i know this is wrong
so the string
asdfs dfg_123456_adsagu432100jhasj654321
will give me
results=[123456,654321] and not 432100
Thanks
Have a good day
Hi, my app presents a listview, from a database cursor and XML, that needs to replace the values in a column with various words based on the integer value contained in the cursor. For example, if the value is -1, replace it with the word "Invalid", but if the value is = 0 then just display the value.
I was under the impression this could magically be done via XML... TIA.
Hi peoples, I'm building a pdf document with reportlab, using the Paragraph class:
doc = SimpleDocTemplate(response, leftMargin=lateral_margin, rightMargin=lateral_margin,
topMargin=top_bottom_margin, bottomMargin=top_bottom_margin)
Document = []
Document.append(Paragraph("bla bla bla bla", my_style))
doc.build(Document)
Now I want to add at the end of every page a string, how can I do that??
I have a XML with 3 values, they are 'name', 'department', 'value'. I want to display a data grid with four columns like Name, department, credit and debit. When I have a value positive in 'value' column I want to enter the value in debit column and 0 in credit column and vice versa.
I have problem with validation such code
function show_help_tip(event, element) {
var $e = $(element);
var pos = $e.offset();
$('.body-balloon',$help_tip_div).html($(' <p> </p> ').html(element.getAttribute('title')));
$help_tip_div.css({position:'absolute',top:530,left:pos.left+$e.width()-20}).show();
}
end tag for element "P" which is not open
What's wrong?
does one create an admin front-end from scratch for every web application (not CMS sites)?
are there any tools for aiding this process?
some tutorials?
share your thoughts and experiences!
I have one node(ImageView) that displays an image and another node(rectangle) that resides on top of it. The behavior I need is that when the mouse is dragged(press-drag-release gesture) over the rectangle, both the nodes should move coherently. My thought process goes in the following direction:
• Move both the nodes by the same distance in the direction of the drag.
For this option(maybe there are more options) I need the distance between the start and end of the mouse drags. I tried capturing the start and end coordinates of the drag but have been unsuccessful. I think I am getting lost in which handlers to implement.
The code I have is below:
import javafx.event.EventHandler;
import javafx.geometry.Rectangle2D;
import javafx.scene.image.ImageView;
import javafx.scene.input.MouseEvent;
public class MyView
{
double mouseDragStartX;
double mouseDragEndX;
double mouseDragStartY;
double mouseDragEndY;
ImageView imageView;
public MyView()
{
imageView = new ImageView("C:\\temp\\test.png");
}
private void setRectangleEvents(final MyObject myObject)
{
myObject.getRectangle().setOnMousePressed(new EventHandler<MouseEvent>()
{
@Override
public void handle(MouseEvent mouseEvent)
{
mouseDragStartX = mouseEvent.getX();
mouseDragStartY = mouseEvent.getY();
mouseEvent.consume();
}
});
myObject.getRectangle().setOnMouseReleased(new EventHandler<MouseEvent>()
{
public void handle(MouseEvent mouseEvent)
{
mouseDragEndX = mouseEvent.getX();
mouseDragEndY = mouseEvent.getY();
myObjectDraggedHandler();
}
});
}
private void myObjectDraggedHandler()
{
Rectangle2D viewport = this.imageView.getViewport();
double newX = this.imageView.getImage().getWidth()
+ (mouseDragEndX - mouseDragStartX);
double newY = this.imageView.getImage().getHeight()
+ (mouseDragEndY - mouseDragStartY);
this.imageView.setViewport(new Rectangle2D(newX, newY, viewport.getWidth(), viewport
.getHeight()));
}
}
P.S: This code is just for indicating what I am trying to implement and will not compile correctly.
Or maybe my question should just have been:
How to capture the length or span of a mouse drag?