refresh

Django: login user and refresh on same page without defining a template?

回眸只為那壹抹淺笑 提交于 2019-12-06 07:33:46
I'm trying to use a bootstrap drop-down sign in form to have users login. I'm able to hard code my username and password and authenticate just fine but I'm trying to have a user login without going to a login screen. Here is my code: Template: I use action to call the logUserIn url so that the form can post to that view. <ul class="nav pull-right"> {% if user.is_authenticated %} <li><a> Welcome {{ user.first_name }} </a></li> <li class="divider-vertical"></li> <li><a href="{% url 'caesarWorkflowApp.views.logUserOut' %}">Log Out</a></li> <li class="divider-vertical"></li> {% else %} <li class=

Check for newer version of page, and if existing, reload

孤人 提交于 2019-12-06 07:16:47
Basically, I want my page (say page.html) to check if a newer version of page.html exists, and if so, refresh the page, and in doing so, bring up the newer version. I realize this happens automatically after some time- however, I want this to happen within the time of 30 seconds to 2 minutes. I'm not sure how this would be accomplished- perhaps some Javascript? if(/*newer version exists*/) { location.reload(); } The part I'm unsure about is how to detect if a newer version exists. I had an idea for a workaround- have a function that checks if some sort of "signal" has been sent (I'd send it

WPF listbox dynamically populated - how to get it to refresh?

本秂侑毒 提交于 2019-12-06 07:03:23
问题 I am new to WPF, so I thought this was simple. I have a form with a listbox and a button. In the click handler for the button I do something iteratively that generates strings, which I want to put in the listbox as I get them. The xaml for the list box is like <ListBox Height="87" Margin="12,0,12,10" Name="lbxProgress" VerticalAlignment="Bottom"> <ListBox.BindingGroup> <BindingGroup Name="{x:Null}" NotifyOnValidationError="False" /> </ListBox.BindingGroup> </ListBox> and the click handler is

How to avoid duplicate entry from asp.net on Postback?

一个人想着一个人 提交于 2019-12-06 05:33:34
I have a dropdown list that pulls data from template table. I have an Add button to insert new template. Add button will brings up jQuery popup to insert new values. There will be a save button to save the new data. On_Save_Click I enter the new data and close the popup. Here is the proplem: When I refresh the page, the page entering the values again. So, I get duplicate entries! Question: How can I avoid this issue? I check out Satckoverflow and Google, both they suggest to redirect to another page. I don't want to redirect the user to another page. How can I use the same form to avoid this

Refresh a connection in Excel to SQL Server (with password) using VBA

南笙酒味 提交于 2019-12-06 05:23:45
I have 10 Excel files that are connected to a SQL Server by OLEDB and I need to refresh them everyday one by one manually. When I refresh them I need to insert a password. I tried to make a macro to automate this process, but I didn't succeed. I did this function to automate one of my workbooks: Sub updateABC() Workbooks("Teste").Connections("SQL Server_Azure1").OLEDBConnection.Refresh End Sub And the Excel ask for the password to SQL Server logon. Is there any way to put this password automatically using vba? Thanks. King_nothing6 There is a way in Excel without VBA: You can go to Data then

How can I refresh a previous activity after the back button is pressed?

隐身守侯 提交于 2019-12-06 04:38:56
问题 I am building an alarm application. I currently have a ListActivity which display the list of alarms and another activity which changes the time of a particular alarm. My problem is, when I decide to enter into the activity to change the time of an alarm and then I press the back button, it does not refresh. However, I've implemented a button that redirects back to the ListActivity and if I press it, the list of alarms are refreshed. How can I, after pressing the back button, refresh the list

jQuery: Refresh div after another jquery action?

☆樱花仙子☆ 提交于 2019-12-06 03:54:04
问题 How do I refresh element (div, class whatever) after another jquery action? I have this action which is deleting a record from database and I need to refresh div which is fetching some other data from database as well... Well here's code: $(function() { $(".delete").click(function() { var commentContainer = $(this).parent(); var id = $(this).attr("id"); var string = 'id='+ id ; $.ajax({ type: "POST", url: "delete.php", data: string, cache: false, success: function(){ commentContainer.slideUp(

Refresh ASP.NET Role Provider

≯℡__Kan透↙ 提交于 2019-12-06 02:56:22
simple question... Given I have an ASP.NET site, which uses a [custom] RoleProvider, Is there any way in which I can somehow "refresh" the provider without forcing the user to log out of the site and log back in? I'm looking for something that would be akin to a fictional method Roles.Refresh() Specifically, I am looking at this for if an administrator changes a user's roles, the user sessions could maybe refresh themselves every 10 minutes or something. I assume you have something like this in your web.config : <roleManager enabled="true" defaultProvider="..." cacheRolesInCookie="true"> The

Delayed TitledBorder title update/refresh, why?

怎甘沉沦 提交于 2019-12-06 02:47:42
问题 I have a JPanel A with a title border inside a JPanel B of a JTabbedPanel C. I have a method refreshing the content of A and B which is called from time-to-time. Unfortunately, all the items of A and B are refreshed in time, but not the title of A. I explicitely have to switch to another tabbed panel and come back to C for A's title to be displayed properly. Why? The code I am using is the following: TitledBorder tmp = (TitledBorder) this.GroupingProfilePanel.getBorder(); // Resetting header

jQuery Waypoints Refresh with CSS Transition

送分小仙女□ 提交于 2019-12-06 02:37:18
I'm using waypoints to toggle a class which creates a CSS transition based on an offset. This is css transition decreases the height of an element. I've tried using the refresh function to recalculate the DOM once each waypoint is passed, but I'm not sure I'm doing it right or maybe I'm slightly restricted here. You can view the site here: http://dev.rostylesalon.com/ jQuery('#aboutwrap').waypoint( function() { jQuery('#aboutwrap .section-header').toggleClass('header-animate'); $.waypoints('refresh'); }, { offset: 300 }); jQuery('#servicewrap').waypoint( function() { jQuery('#servicewrap