This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ProfileView(LoginRequiredMixin, View): | |
def get(self, request, *args, **kwargs): | |
context = {} | |
# Redirect user if is_admin | |
if request.user.is_admin or request.user.is_staff: | |
return redirect('/admin/') | |
# Create context with factory | |
context = self.profile_factory(request) | |
return render(request, 'shared/content_profile.html', context) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Check rails version | |
$ rails -v | |
- To update rails | |
$ gem update rails | |
- Creating a new rails app using postgresql | |
$ mkdir rails_projects | |
$ cd rails_projects | |
$ rails new myapp --database=postgresql |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Option Explicit | |
Sub assign_MacroToShape() | |
' | |
' This macro assigns a macro to a given shape | |
' | |
'Set variables | |
Dim active_Book As Workbook | |
Set active_Book = ActiveWorkbook |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sub create_Table_BordersAnywhere() | |
'Get current range selected | |
Dim current_Selection As Range | |
Set current_Selection = Selection | |
'Set in range | |
Dim create_Table As Range | |
Set create_Table = Range(current_Selection.Address) | |
Dim elements(5) As String |
NewerOlder