django registration issues

2017-05-12 Thread farah_chaaban
I am trying to download registration application from github but i have 
some problems:
 - git clone https://github.com/macropin/django-registration.git
 - python install setup.py 
- i copied the registration folder to my project folder Than :

*Url.py*

from django.conf.urls import *
from django.contrib import admin
from registration.views import*


urlpatterns = ['',
url (r'^accounts/', include('registration.backends.default.urls')),]


Than:


*Setting.py:*

INSTALLED_APPS = 
(

'django.contrib.admin',

'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.staticfiles',
# additional external apps
'registration',
'social.apps.django_app.default',

)

SITE_ID=1

ACCOUNT_ACTIVATION_DAYS = 7

REGISTRATION_AUTO_LOGIN = True

When I type python manage.py sqlall **the result is this error :

manage.py sqlall: error: Enter at least one application label.

I guess that my project can't read the application registration and 

when i write : python manage.py runserver

the error is The current URL, accounts/, didn't match any of these.

Please any help ?

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/65d5c582-74b0-48af-8d0c-a1f447b0a1a4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: TemplateDoesNotExist for django-registration (but it does)

2017-05-13 Thread farah_chaaban
Hello i have the same problem. please help me

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/2a204311-cd54-426d-8593-b9e14f1d1319%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Please help two dependent list check boxes

2017-05-29 Thread farah_chaaban
I am a beginner with django.
I don't have any idea how to create a two dependent list of check boxes. I 
mean when i check a box a second list on checkbox appears.
When I click on a second checkbox a new list of checkbox appears. 
I didn't find anything related on google. 
I don't know how to create the models.py in this case or anything related.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/f9802a16-4750-49f0-b01c-cea513d0cfe3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


value of checkbox aren't saved in the form

2017-05-31 Thread farah_chaaban
i am a beginner with Django. I don''t know what the problem with the value 
of checkbox. When i enter to the saved form the value of checkbox aren't 
save.The image is here  . Please I 
need your help, I loose too much time on this.

This is my forms.py:

*class BacktestForm(forms.ModelForm):*

* period_start = forms.DateField(initial=datetime.datetime.today().date() - 
datetime.timedelta(days=365+16), 
widget=forms.widgets.DateInput(format="%Y/%m/%d"), 
input_formats=["%Y/%m/%d"])*
* period_end = forms.DateField(initial=datetime.datetime.today().date() - 
datetime.timedelta(days=16), 
widget=forms.widgets.DateInput(format="%Y/%m/%d"), 
input_formats=["%Y/%m/%d"])*

*market = 
forms.MultipleChoiceField(required=False,widget=CheckboxSelectMultiple, 
choices=MARKET_CHOICES)*
*sector = 
forms.MultipleChoiceField(required=False,widget=CheckboxSelectMultiple, 
choices= MEDIA_CHOICES)*
* class Meta:*
* model = Parameters*

*This is my models.py:*










*class Parameters(models.Model): user = models.ForeignKey(User) title = 
models.CharField('title', max_length=100, default='', blank=True, 
help_text='Use an indicative name, related to the chosen parameters') type 
= models.CharField('forecast type', choices=FORECAST_TYPES, max_length=20, 
default="backtest") #input characteristics price_1_min = 
models.FloatField('1. Price, min', default=0.1, 
validators=[MinValueValidator(0.1), MaxValueValidator(2)])def 
get_backtest_url(self): return reverse('saved_backtest', kwargs={'pk': 
self.pk})The save function in views.py: if request.method == 
'POST': if form.is_valid(): if 'save' in request.POST: obj = 
form.save(commit= False) obj.user = request.user obj.type = "backtest" 
obj.save() messages.info(request, 'Saved!') return 
redirect(obj.get_backtest_url())The template for the saved form is :  
{% if user.is_authenticated %} {% if user.profile.is_active %}  
     Saved from "Backtesting"  {% for param in 
user.parameters_set.all %} {% if param.type == "backtest" %}   
 

Saved File 
Created at 
   

  {{param.title}}   
{{param.created_at}}   
 {% endif %} {% endfor %} *

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/55e259b4-8986-41d0-849e-4fe809001ff0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.