Re: passing data to template

2017-06-12 Thread ludovic coues
Try `{{ results | pprint }}` in your template. That will not solve your problems but that will give you a lot more information about what data have been passed to your template. On 13 Jun 2017 6:53 am, "sum abiut" wrote: > Hi, > I need some help, i am using Django as my web framework and sqlalc

passing data to template

2017-06-12 Thread sum abiut
Hi, I need some help, i am using Django as my web framework and sqlalchemy to query my database. When i pass data template its not showing on the template. can someone point me to the right direction. The post date is loaded on the template but the Net Balance is not loaded. Don't know what i am d

Re: Failed to load resource: the server responded with a status of 500 (INTERNAL SERVER ERROR)

2017-06-12 Thread Melvyn Sopacua
On Monday 12 June 2017 11:18:52 Akhi wrote: > def email_view(request, id): > course = get_object_or_404(CourseWare, pk=id) > user = UserProfile.objects.get(user__id=request.user.id) > myorder = MyOrder.objects.get_or_create(buyer=user, course=course) Return value for get_or_create()[1

Re: SelectDateWidget when DateField is not required

2017-06-12 Thread Melvyn Sopacua
On Monday 12 June 2017 03:28:29 Nonverbis M wrote: > There is that method clean_through_date and the break point in it. But > in case of incomplete set of month, day and year the program will not > even call this clean_through_date() method. This method is called in > two cases: > > 1) if the thr

Re: Multilingual site with Django 1.11 and Google Cloud Platform

2017-06-12 Thread Antonis Christofides
Two months ago Raphael Michel made an interesting presentation about it at the DjangoConEU. AFAIK the conference videos aren't out yet, but at least the slides are available at https://2017.djangocon.eu/schedule/data-internationalization-in-django/. On June 12, 2017 7:50:09 PM GMT+03:00, Mihai

Re: Multilingual site with Django 1.11 and Google Cloud Platform

2017-06-12 Thread Jani Tiainen
Hi We've been using django-modeltranslation very successfully. It's advantage is speed but drawback is that it creates colum per language 1per translated field. 12.6.2017 22.06 "Mihai Rusoaie" kirjoitti: > Hello! > > I have a website with content in Romanian. > > I would like to create an Eng

Failed to load resource: the server responded with a status of 500 (INTERNAL SERVER ERROR)

2017-06-12 Thread Akhi
*I'm running Html file from S3 bucket in that HTML file there is AJAX call when I run/open the HTML file I am getting below error* *Failed to load resource: the server responded with a status of 500 (INTERNAL SERVER ERROR)* My code from s3 bucket JS file

Multilingual site with Django 1.11 and Google Cloud Platform

2017-06-12 Thread Mihai Rusoaie
Hello! I have a website with content in Romanian. I would like to create an English version. For the interface I will use Django 1.11 Localization: https://docs.djangoproject.com/en/1.11/topics/i18n/translation/#how-to-create-language-files For translating automatically the content to english,

Re: Problems with migrations cleaning up a date field

2017-06-12 Thread Lee Hinde
On Sat, Jun 10, 2017 at 5:03 AM, Melvyn Sopacua wrote: > On Friday 09 June 2017 20:56:46 James Schneider wrote: > > > > > Quite honestly this sounds like a bug in the migration system if > > > that's the case. I'm pretty sure it should ask what value to use as a > > > filler value during the migr

Need help in calling dispatch on custom mixin for authorization

2017-06-12 Thread Ajat Prabha
Hi there, I'm learning django and creating a forum for this purpose, now I have a Topic model and I want to create an UpdateView for it, but what I want is that a user should be logged in and owner of that topic, only then the author can edit it. For login part, I'm using LoginRequiredMixin and

Re: Django Virtual Environment

2017-06-12 Thread Oladipupo Elegbede
Be sure, just double check you're inside the virtual environment. You should see something like (your_env)c/path/to/your/project: On Jun 12, 2017 8:50 AM, "Antonis Christofides" < anto...@djangodeployment.com> wrote: > If you have created the virtualenv with --system-site-packages, you need > t

Re: type error issue

2017-06-12 Thread Andréas Kühne
In your urls.py file you have to add the variable you want to add to the URL You currently have : url(r'^region', views.region, name='region'), But it should be: url(r'^region/(?P[\w-]+)/$', views.region, name='region'), Otherwise the url doesn't know where to get the cnty variable from an

Re: Django Virtual Environment

2017-06-12 Thread Antonis Christofides
If you have created the virtualenv with --system-site-packages, you need to tell it "pip install --upgrade django". See also https://djangodeployment.com/2016/11/01/virtualenv-demystified/. Regards, Antonis Antonis Christofides http://djangodeployment.com On 2017-06-12 16:41, yingi keme wrote:

type error issue

2017-06-12 Thread jon stan
So i keep getting this error every time i try to pass a variable in http. in my template i have a link that contains the variable of a county in a state: *template.html* {{ cnty }} when you click the link i guess it goes to the urls file: *urls.py* url(r'^region', views.region

Re: Django Virtual Environment

2017-06-12 Thread yingi keme
Okk. But then when i create a new virtual environment, and i try to install a seperate django. It says the django package already exist. Is it that i have to install another version of django? Yingi Kem > On 12 Jun 2017, at 2:22 PM, Russell Keith-Magee > wrote: > > Hi Yingi, > > Once you c

Re: Django Virtual Environment

2017-06-12 Thread Russell Keith-Magee
Hi Yingi, Once you create a virtual environment, it is an isolated sandbox. It doesn’t have access to the world outside that sandbox. That includes Django - your virtual environment will need to have Django installed separately, even if your “main” Python 3.5 install already has Django installe

Re: new to django

2017-06-12 Thread yingi keme
I recommend you buy the book 'django unleashed'. It is highly recommended for beginners. Some sites will help you, but not nearly as close to the book 'Django Unleashed' And hope you are proficient in python programming language? If not, i suggest you learn python first before diving into djang

Django Virtual Environment

2017-06-12 Thread yingi keme
Hello I have this issue i am trying to resolve. I installed django directly into my Python35 directory without creating a new virtual environment for my project. However, now i want to create a new virtual environment for a new project. If i make some modifications in django inside this new vi

Re: new to django

2017-06-12 Thread Jani Tiainen
Hi, And welcome to Django. Also more verbose tutorial can be found from Django Girls [1] [1] https://tutorial.djangogirls.org/en/ On 12.06.2017 14:12, Matthias Müller wrote: The tutorial in the documentation is a good start. cheers Matthias 2017-06-12 5:49 GMT+02:00 jlew921

Re: new to django

2017-06-12 Thread Oladipupo Elegbede
Take the Django tutorial on the official Django website. Take the Django tutorial on the Django girls website. Do something with what you've learnt. Come back with questions.. Welcome to Django. On Jun 12, 2017 6:05 AM, "jlew921" wrote: > hi guys new to django...and directions pls??? > > --

Re: new to django

2017-06-12 Thread Matthias Müller
The tutorial in the documentation is a good start. cheers Matthias 2017-06-12 5:49 GMT+02:00 jlew921 : > hi guys new to django...and directions pls??? > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from this group and

new to django

2017-06-12 Thread jlew921
hi guys new to django...and directions pls??? -- 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, s

SelectDateWidget when DateField is not required

2017-06-12 Thread Nonverbis M
*Django 1.11.2* I'd like to use SelectDateWidget. class FrameDate(models.Model): through_date = models.DateField(null=True, blank=True, verbose_name=_("through")) ... class FrameDateForm(ModelForm): def clean