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
| # This is an auto-generated Django model module. | |
| # You'll have to do the following manually to clean this up: | |
| # * Rearrange models' order | |
| # * Make sure each model has one field with primary_key=True | |
| # * Make sure each ForeignKey has `on_delete` set to the desired behavior. | |
| # * Remove `managed = False` lines if you wish to allow Django to create, modify, and delete the table | |
| # Feel free to rename the models, but don't rename db_table values or field names. | |
| from __future__ import unicode_literals | |
| from django.db import models |
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
| from django import forms | |
| from django.forms import ValidationError | |
| class ChangePasswordForm(forms.Form): | |
| username = forms.CharField( | |
| label='Current Username', | |
| widget=forms.TextInput( | |
| attrs={ | |
| 'size': 40, |
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
| from django import forms | |
| from django.forms import ValidationError | |
| class ChangePasswordForm(forms.Form): | |
| username = forms.CharField(label='Current Username', required=True) | |
| old_pwd = forms.CharField(label='Current Password', required=True) | |
| new_pwd = forms.CharField(label='New Password', required=True) | |
| new_pwd_confirmation = forms.CharField(label='Confirm New Password', required=True) |
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
| NoMethodError in OpenprojectTodolist::TodolistsController#create | |
| undefined method `id' for #<Class:0x007f918592b1e8> | |
| Extracted source (around line #40): | |
| 38 | |
| 39 | |
| 40 | |
| 41 | |
| 42 | |
| 43 |
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 Article < ActiveRecord::Base | |
| belongs_to :user | |
| end |
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
| def show | |
| @blog.increment :views, 1 | |
| @blog.update(blog_params) | |
| end |
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
| brew install python3 | |
| ==> Downloading https://www.python.org/ftp/python/3.4.3/Python-3.4.3.tar.xz | |
| Already downloaded: /Library/Caches/Homebrew/python3-3.4.3.tar.xz | |
| ==> ./configure --prefix=/usr/local/Cellar/python3/3.4.3_2 --enable-ipv6 --datar | |
| ==> make | |
| ==> make install PYTHONAPPSDIR=/usr/local/Cellar/python3/3.4.3_2 | |
| import time | |
| ImportError: No module named 'time' | |
| make[2]: *** [Python Launcher.app] Error 1 | |
| make[1]: *** [install_PythonLauncher] Error 2 |
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
| <?php | |
| use Illuminate\Database\Schema\Blueprint; | |
| use Illuminate\Database\Migrations\Migration; | |
| class CreateArticlesTable extends Migration | |
| { | |
| /** | |
| * Run the migrations. | |
| * |
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
| <form action="/form/submit" method="POST"> | |
| <strong>I.Q.:</strong> | |
| <input type="text" name="IQ" /> | |
| <input type="submit" value="Send My IQ" /> | |
| </form> |
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
| from django.contrib import admin | |
| from django.contrib.flatpages.models import FlatPage | |
| # Note: we are renaming the original Admin and Form as we import them! | |
| from django.contrib.flatpages.admin import FlatPageAdmin as FlatPageAdminOld | |
| from django.contrib.flatpages.admin import FlatpageForm as FlatpageFormOld | |
| from django import forms | |
| from ckeditor.widgets import CKEditorWidget |