This file contains 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
var box = {}; // created an empty object and stored it in a variable called box. |
This file contains 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
/* drag and drop module V2 */ | |
.drop-to{ | |
border: 1px dashed #ddd; | |
border-top-left-radius: 4px; | |
border-top-right-radius: 4px; | |
border-bottom-left-radius: 4px; | |
border-bottom-right-radius: 4px; | |
min-height: 310px; | |
padding: 5px; |
This file contains 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
if self.steps.current == 'step4': | |
form_asistente = FormStep4 | |
actividades = EventActivity.objects.all() | |
form_items = [ item.activityassist.all() for item in actividades ] | |
context['activity_form_items'] = zip(actividades, form_items) | |
# Sir Francis Drake Excercises |
This file contains 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.shortcuts import render | |
from django.contrib.formtools.wizard.views import SessionWizardView | |
from django.forms.formsets import formset_factory | |
from .forms import FormStep1, FormStep2, FormStep3, FormStep4, FormStep5, FormStep6, DetalleHotel, DetalleCustom | |
from .models import Registration | |
from apps.activities.models import EventActivity | |
FORMS = [ | |
("step1", FormStep1), |
This file contains 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 RegisterStepsWizard(SessionWizardView): | |
instance = None | |
# mi función para crear una instancia de ActivityAssist por cada instancia de Activity que exista | |
def activity_forms(): | |
activity_object = Activity.objects.all() | |
new_activity = FormStep4() | |
items = [] | |
for a in activity_object: |
This file contains 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
<h1>Dashboard</h1> | |
<h4>Hola {{ user }}</h4> | |
<form name ="offers_update_form" action="/dashboard/edit/" method="post"> {% csrf_token %} | |
{{offer_form.as_p}} | |
<input type="submit" value="Edit offer" /> | |
</form> |
This file contains 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
{% load url from future %} | |
<h1>Dashboard</h1> | |
<h4>Hola {{ user }}</h4> | |
<a href="/offers/logout/">Logout</a> | |
<h3>Mis ofertas</h3> | |
<ul> | |
{% for offer in offer_list %} | |
<li><a href="{% url 'edit' offer.pk %}">{{ offer.offer_title }}</a></li> | |
{% empty %} |
This file contains 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.conf.urls import patterns, include, url | |
# Uncomment the next two lines to enable the admin: | |
# from django.contrib import admin | |
# admin.autodiscover() | |
from offers.views import * | |
urlpatterns = patterns('', | |
# Examples: |
This file contains 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 ModelForm | |
from models import Offer, Consumer | |
# Login Form | |
#class LoginForm(forms.Form): | |
# username = forms.EmailField() | |
# password = forms.CharField(widget=forms.PasswordInput()) |
This file contains 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.http import HttpResponse | |
from django.views.decorators.csrf import csrf_exempt | |
from django.template import RequestContext | |
from django.shortcuts import render_to_response, render | |
from django.core.exceptions import ObjectDoesNotExist | |
from django.views.generic import ListView | |
from django.views.generic.edit import UpdateView | |
from django.core.urlresolvers import reverse | |
from forms import * |
NewerOlder