Re: Python manage.py runserver error

2020-08-25 Thread ROHINI PUNDE
Thank you so much,
run properly on server.

On Tue, Aug 25, 2020 at 8:22 PM RANGA BHARATH JINKA <
bharathjink...@gmail.com> wrote:

> Hi,
>
> Please create a virtual environment, activate it and install django
> and other packages inside that environment.
> All the best.
>
> On Wed, Aug 26, 2020 at 8:28 AM ROHINI PUNDE 
> wrote:
>
>> Hi,
>> while running "python manage.py runserver"  I got this type of error ,I
>> am not understand how to to solve this problem.please help me out.
>> find out on this attachment(error.png)
>>
>>
>> --
>> 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 view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CAO9_9ZZRDPCFb4FnGWNLxku8VTa0x3LNKvVtUFm%2BVT%3DJ2uTOvg%40mail.gmail.com
>> 
>> .
>>
>
>
> --
> Thanks and Regards
>
> J. Ranga Bharath
> cell: 9110334114
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAK5m3167biZ3WQVt4OBjDJX5Z0K%2Br%3DJLOXLP989UsZx1hmPOqg%40mail.gmail.com
> 
> .
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAO9_9Zbh7-F5b-Q5mnhuPfo3z6%2BktLcNUaOSbAAsCoDy_FjO2w%40mail.gmail.com.


Re: Python manage.py runserver error

2020-08-25 Thread RANGA BHARATH JINKA
Hi,

Please create a virtual environment, activate it and install django and
other packages inside that environment.
All the best.

On Wed, Aug 26, 2020 at 8:28 AM ROHINI PUNDE  wrote:

> Hi,
> while running "python manage.py runserver"  I got this type of error ,I am
> not understand how to to solve this problem.please help me out.
> find out on this attachment(error.png)
>
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAO9_9ZZRDPCFb4FnGWNLxku8VTa0x3LNKvVtUFm%2BVT%3DJ2uTOvg%40mail.gmail.com
> 
> .
>


-- 
Thanks and Regards

J. Ranga Bharath
cell: 9110334114

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAK5m3167biZ3WQVt4OBjDJX5Z0K%2Br%3DJLOXLP989UsZx1hmPOqg%40mail.gmail.com.


Re: Python Django Tutorial for absolute beginners

2020-08-25 Thread Madhav Nandan
Dear Balaji,

Recently I joined your session on google meet and it was nice to
experience. I'm good at python, databases and backend technologies. Can I
present a session on 'Using databases in python' to the fellow community?


Regards,
9170459494

On Mon, Aug 24, 2020 at 10:42 PM Balaji Shetty 
wrote:

> Dear Participants
>
>🌷*I am sharing you a video to learn Python Django with development
> of project and app. You can download source code of this video also from
> github link*
>
> https://www.youtube.com/watch?v=EY-XY2HDo_c
>
> 🌷 *Sourcecode*
> https://github.com/balaji-shetty/Django-Sample-Proj-With-CODE-For-Begineers
>
>
> Code to download source code is given in Video Description.
>
> We are uploading new videos every week useful for beginners and provide
> respective source code on GitHub
>
>
> Prof Shetty Balaji
> IT dept
> SGGS IET Nanded. MH
>
> https://youtu.be/EY-XY2HDo_c
>
>
> --
> Mr Shetty Balaji
> Asst. Prof.
> IT Department
> SGGS I&T
> Nanded. My. India
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAECSbOsR0b%3DjiFiXcbOmvvj69XH_kR3bKCLbug1sCqe24PnzEg%40mail.gmail.com
> 
> .
>


-- 
Madhav Nandan

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAGXYL6L0ERDTe99nSXsfECsdzRmYNMqV%2BSeEfEZkciXFwPL92A%40mail.gmail.com.


Python manage.py runserver error

2020-08-25 Thread ROHINI PUNDE
Hi,
while running "python manage.py runserver"  I got this type of error ,I am
not understand how to to solve this problem.please help me out.
find out on this attachment(error.png)

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAO9_9ZZRDPCFb4FnGWNLxku8VTa0x3LNKvVtUFm%2BVT%3DJ2uTOvg%40mail.gmail.com.


Re: two errors in Part 2 of tutorial

2020-08-25 Thread rbarh...@gmail.com
Well, think I got that worked out but I have this problem with timezone, 
and trying to set the time to current year...
FieldError: Cannot resolve keyword 'pub_date_year' into field. Choices are: 
choice, id, pub_date, question_text

This doesn't seem to work:
# Get the question that was published this year.
  >>> from django.utils import timezone 
>>> current_year = timezone.now().year

On Tuesday, August 25, 2020 at 3:28:30 PM UTC-7 rbarh...@gmail.com wrote:

> I think the first serious problem is the dash in the "return 
> self.pub_date..." line.  I don't understand at all and now I get a syntax 
> error when I try to restart the shell...
>
>
> On Tuesday, August 25, 2020 at 3:18:23 PM UTC-7 rbarh...@gmail.com wrote:
>
>> Here is my code from working on Part 2 of the first Django app
>> ~~~
>> from django.db import models
>> from django.utils import timezone
>> import datetime
>>
>> # Create your models here.
>>
>> class Question(models.Model):
>> question_text = models.CharField(max_length=200)
>> pub_date = models.DateTimeField('date_published')
>> def __str__(self):
>> return self.question_text
>> def was_published_recently(self):
>> return self.pub_date >= timezone.now() -
>> datetime.timedelta(days=1)
>>
>>
>>
>> class Choice(models.Model):
>> question = models.ForeignKey(Question, on_delete=models.CASCADE)
>> choice_text = models.CharField(max_length=200)
>> votes = models.IntegerField(default=0)
>> def __str__(self):
>> return self.choice_text
>> ~~~
>> I get the following error to the following questions:
>> ~~~
>>
>> In [9]: Question.objects.filter(question_text_startswith='What')   
>> FieldError: Cannot resolve keyword 'question_text_startswith' into field. 
>> Choices are: choice, id, pub_date, question_text
>>
>> In [12]: Question.objects.get(pub_date_year=current_year) 
>> FieldError: Cannot resolve keyword 'pub_date_year' into field. Choices 
>> are: choice, id, pub_date, question_text
>>
>>  q.was_published_recently()  
>> AttributeError: 'Question' object has no attribute 'pub'
>> ~~~
>> Plus, I don't understand the "-" in this line:
>> return self.pub_date >= timezone.now() -
>> datetime.timedelta(days=1)
>>
>> Help, please.  Thank you.
>>
>>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/3247bf50-bd0e-418a-a47d-889ab112e429n%40googlegroups.com.


Re: two errors in Part 2 of tutorial

2020-08-25 Thread rbarh...@gmail.com
I think the first serious problem is the dash in the "return 
self.pub_date..." line.  I don't understand at all and now I get a syntax 
error when I try to restart the shell...


On Tuesday, August 25, 2020 at 3:18:23 PM UTC-7 rbarh...@gmail.com wrote:

> Here is my code from working on Part 2 of the first Django app
> ~~~
> from django.db import models
> from django.utils import timezone
> import datetime
>
> # Create your models here.
>
> class Question(models.Model):
> question_text = models.CharField(max_length=200)
> pub_date = models.DateTimeField('date_published')
> def __str__(self):
> return self.question_text
> def was_published_recently(self):
> return self.pub_date >= timezone.now() -
> datetime.timedelta(days=1)
>
>
>
> class Choice(models.Model):
> question = models.ForeignKey(Question, on_delete=models.CASCADE)
> choice_text = models.CharField(max_length=200)
> votes = models.IntegerField(default=0)
> def __str__(self):
> return self.choice_text
> ~~~
> I get the following error to the following questions:
> ~~~
>
> In [9]: Question.objects.filter(question_text_startswith='What')   
> FieldError: Cannot resolve keyword 'question_text_startswith' into field. 
> Choices are: choice, id, pub_date, question_text
>
> In [12]: Question.objects.get(pub_date_year=current_year) 
> FieldError: Cannot resolve keyword 'pub_date_year' into field. Choices 
> are: choice, id, pub_date, question_text
>
>  q.was_published_recently()  
> AttributeError: 'Question' object has no attribute 'pub'
> ~~~
> Plus, I don't understand the "-" in this line:
> return self.pub_date >= timezone.now() -
> datetime.timedelta(days=1)
>
> Help, please.  Thank you.
>
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/0030a96d-a18b-4961-90a2-5d8398859230n%40googlegroups.com.


two errors in Part 2 of tutorial

2020-08-25 Thread rbarh...@gmail.com
Here is my code from working on Part 2 of the first Django app
~~~
from django.db import models
from django.utils import timezone
import datetime

# Create your models here.

class Question(models.Model):
question_text = models.CharField(max_length=200)
pub_date = models.DateTimeField('date_published')
def __str__(self):
return self.question_text
def was_published_recently(self):
return self.pub_date >= timezone.now() -
datetime.timedelta(days=1)



class Choice(models.Model):
question = models.ForeignKey(Question, on_delete=models.CASCADE)
choice_text = models.CharField(max_length=200)
votes = models.IntegerField(default=0)
def __str__(self):
return self.choice_text
~~~
I get the following error to the following questions:
~~~

In [9]: Question.objects.filter(question_text_startswith='What')   
FieldError: Cannot resolve keyword 'question_text_startswith' into field. 
Choices are: choice, id, pub_date, question_text

In [12]: Question.objects.get(pub_date_year=current_year) 
FieldError: Cannot resolve keyword 'pub_date_year' into field. Choices are: 
choice, id, pub_date, question_text

 q.was_published_recently()  
AttributeError: 'Question' object has no attribute 'pub'
~~~
Plus, I don't understand the "-" in this line:
return self.pub_date >= timezone.now() -
datetime.timedelta(days=1)

Help, please.  Thank you.

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/148e08da-6b2a-40b4-93a0-e69cccd6297an%40googlegroups.com.


Re: two errors in part 2

2020-08-25 Thread Максим

Hi, use double underscore before startswith and year:

In [9]: Question.objects.filter(question_text*__**startswith*='What')

In [12]: Question.objects.get(pub_date*__**year*=current_year)


26.08.2020 00:40, rbarh...@gmail.com пишет:
Towards the end of part 2, I have encountered two errors that I cannot 
resolve.


~~~

In [14]: Question.objects.get(pub_date=current_year)
---


FieldError: Cannot resolve keyword 'question_text_startswith' into 
field. Choices are: choice, id, pub_date, question_text



FieldError: Cannot resolve keyword 'pub_date_year' into field. Choices 
are: choice, id, pub_date, question_text

TypeError                   Traceback (most recent call last)
 in 
> 1 Question.objects.get(pub_date=current_year)
~~~

Here is my code that I added according to the instructions:
~~~
class Question(models.Model):
question_text = models.CharField(max_length=200)
pub_date = models.DateTimeField('date_published')
def __str__(self):
return self.question_text
def was_published_recently(self):
return self.pub.date >= timezone.now() #datetime.timedelta(days=1)
~~~
and here are the questions that invoked these errors:
~~~
In [9]: Question.objects.filter(question_text_startswith='What')
In [12]: Question.objects.get(pub_date_year=current_year)
~~~

I think these are accurate representations of the text instructions.

What is wrong?  Thank you.



--
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/ecc88bed-86a2-4d3b-a809-9ee588bdefd1n%40googlegroups.com 
.


--
Best regards,
Maxim Zemlyakov
Email: maxim.zemlya...@gmail.com
GSM: +79032703210

--
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/75635164-5e70-b584-213e-94176ce9adff%40gmail.com.


two errors late in Part 2

2020-08-25 Thread rbarh...@gmail.com
question_text = models.CharField(max_length=200)
pub_date = models.DateTimeField('date_published')
def __str__(self):
return self.question_text
def was_published_recently(self):
return self.pub.date >= timezone.now() - 
~~~
and here are the questions that invoked these errors:
~~~
In [9]: Question.objects.filter(question_text_startswith='What')   
In [12]: Question.objects.get(pub_date_year=current_year)  - 
datetime.timedelta(days=1)
~~~

I think these are accurate representations of the text instructions.  In 
line 12 above,, python doesn't like that date time (had to put a space in 
this comment or it kept filling in DateTimeField) word.  Plus I don't 
understand the. -  .

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/9245afb9-68c1-4b91-9125-e7ecb65c4094n%40googlegroups.com.


two errors in part 2

2020-08-25 Thread rbarh...@gmail.com
Towards the end of part 2, I have encountered two errors that I cannot 
resolve.

~~~

In [14]: Question.objects.get(pub_date=current_year)   


---


FieldError: Cannot resolve keyword 'question_text_startswith' into field. 
Choices are: choice, id, pub_date, question_text


FieldError: Cannot resolve keyword 'pub_date_year' into field. Choices are: 
choice, id, pub_date, question_text
TypeError Traceback (most recent call last)
 in 
> 1 Question.objects.get(pub_date=current_year)
~~~

Here is my code that I added according to the instructions:
~~~
class Question(models.Model):
question_text = models.CharField(max_length=200)
pub_date = models.DateTimeField('date_published')
def __str__(self):
return self.question_text
def was_published_recently(self):
return self.pub.date >= timezone.now() #datetime.timedelta(days=1)
~~~
and here are the questions that invoked these errors:
~~~
In [9]: Question.objects.filter(question_text_startswith='What')   
In [12]: Question.objects.get(pub_date_year=current_year)  
~~~

I think these are accurate representations of the text instructions.

What is wrong?  Thank you.



-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/ecc88bed-86a2-4d3b-a809-9ee588bdefd1n%40googlegroups.com.


Re: def__str__(self) not working properly

2020-08-25 Thread Aginjith G J
0


Do this.
def __repr__ (self): return self.title

restart the shell/session.

then check.

i had this issue. only after restarting the section it worked 

On Sunday, 16 September 2018 at 17:14:18 UTC+5:30 Daniel Herrera wrote:

> I was having the same issue, as mentioned above, it was a mere indentation 
> problem, make sure the def __str__ is properly indented inside of the class 
> and not at the same level.
>
>
> On Friday, July 1, 2016 at 5:52:12 PM UTC+8, gary719_list1 wrote:
>>
>> Hi all; 
>>
>> I am working on the official django tutorial 
>> (https//docs.djangoproject.com/en/1.9/intro/tutorial/02/) on the section 
>> that is adding the choices. Specifically: 
>>
>>
>> # Create three choices. 
>>  >>> q.choice_set.create(choice_text='Not much', votes=0) 
>>  
>>  >>> q.choice_set.create(choice_text='The sky', votes=0) 
>>  
>>  >>> c = q.choice_set.create(choice_text='Just hacking again', votes=0) 
>>
>> The "Not much" entry should return  but returns 
>>  instead. 
>>
>> This would seem to be a problem with the models.py def__str__(self) 
>> call, but I can't locate the problem. Question class works fine. The 
>> specific code is : 
>>
>> import datetime 
>>
>> from django.db import models 
>> from django.utils import timezone 
>>
>>
>> class Question(models.Model): 
>>  question_text = models.CharField(max_length=200) 
>>  pub_date = models.DateTimeField('date published') 
>>
>>  def __str__(self): 
>>  return self.question_text 
>>
>>  def was_published_recently(self): 
>>  return self.pub_date >= timezone.now()-  
>> datetime.timedelta(days=1) 
>>
>>
>> class Choice(models.Model): 
>>  question = models.ForeignKey(Question, on_delete=models.CASCADE) 
>>  choice_text = models.CharField(max_length=200) 
>>  votes = models.IntegerField(default=0) 
>>
>>  def __str__(self): 
>>  return self.choice_text 
>>
>> OS Debian Stretch 
>> KDE Desktop 
>> Django 1.9 
>> python 3.5 
>> Eclipse PyDev IDE 
>>
>> All migrations are up to date. 
>>
>> Any help will be sincerely appreciated. 
>>
>> Gary R. 
>>
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/685d0319-ecce-4ece-919c-ce6ea46a3cfan%40googlegroups.com.


Looking For Internship

2020-08-25 Thread Anirudh choudhary
Hello Everyone

I am Anirudh Malik BTech Mechatronics 4th Year Student. I am Currently
Looking For an internship in Good Company as a remote intern or developer.
I have attached my resume


 I have Worked With Technology like Django, React Js, Reach FrameWork,
AJax,  Electron js, HTML5, and css3 and Cloud platform Technology I Know
are Amazon Bucket, EC2, Google Storage, Cloud Run, VM instance

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAL8_rkEdnt3caG1%2Bmigwi5so1Fu4t6MgkWdERyrxaR81M5NmPg%40mail.gmail.com.


google Format resume for Delhi .pdf
Description: Adobe PDF document


Re: best book for learning django

2020-08-25 Thread 1 9 5 9 0 Aman kumar
2scoops of django

On Tue, 25 Aug 2020, 14:20 nAnDa KuMaR k,  wrote:

> hii friends
> i need your help
> "which is best book learn django"
> please help me friends.
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/4878f832-4c3c-40eb-a569-b38e1fdd8238n%40googlegroups.com
> 
> .
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAF77ry36C%2B_Vs-cst23GD-oz899Un8o55askeDEqReamm1vXpA%40mail.gmail.com.


RES: best book for learning django

2020-08-25 Thread Samuel Nogueira
Hi,A lot of people ask this question here. The best place to learn django is from the tutorials in the documentation. Books about tech often get outdated, so is not the best thing spend your money or time trying to look for a book. Link for the tutorials: https://docs.djangoproject.com/en/3.1/ -Samuel Nogueira Bacelar GitHub: https://github.com/SamuelNoB Linkedin: https://www.linkedin.com/in/samuel-nogueira-87800b1aa/ - De: nAnDa KuMaR kEnviado:terça-feira, 25 de agosto de 2020 05:49Para: Django usersAssunto: best book for learning django hii friends i need your help"which is best book learn django" please help me friends.-- 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 view this discussion on the web visit https://groups.google.com/d/msgid/django-users/4878f832-4c3c-40eb-a569-b38e1fdd8238n%40googlegroups.com. 



-- 
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 view this discussion on the web visit https://groups.google.com/d/msgid/django-users/A9870E5B-9E69-4DBF-BEC3-A4DFF78B2982%40hxcore.ol.


Many to many field does not save in the main object

2020-08-25 Thread Annick Sakoua
Hi all,
Please Help.
I have been on this problem for 2 weeks now :(
I have an object: customer  that has 1 manytomany relationship with another 
object: gp.
I created some gp instances in the admin page. When I select one gp in the 
select dropdown list of existing gp  in my addcustomer form and submit my 
form, the form is saved with all the information except the gp selected. I 
only get the this: app.GeneralPractitioner.None  
Here are bellow my different classes. 

Thank you for your help :)

*model.py*

class Customer(models.Model):
first_name = models.CharField(max_length=100)
last_name = models.CharField(max_length=100)
gp = models.ManyToManyField(GeneralPractitioner, help_text="Select your 
general practitioner", related_name="customer")


class GeneralPractitioner(models.Model):
name = models.CharField(
max_length=40,
help_text="Enter the gp name)"
)
contact= models.CharField(max_length=11)

def __str__(self):
return self.name

*in view.py*

@login_required
def add_customer(request):
if request.method == 'POST':

form = AddCustomerForm(request.POST)
if form.is_valid():
instance = form.save(commit=False)
for item in instance:
item.save()
form.save_m2m()
instance.author = request.user

messages.success(request, f'Your form has been created!')
return redirect('addcustomer')
else:
form = AddCustomerForm()
return render(request, 'app/addcustomer.html', {'form': form})

*customer_details.html*

{% extends "app/base.html" %}
{% load crispy_forms_tags %}
{% block content %}


Firstname: {{customer.first_name}}
Lastname: {{customer.last_name}}
General practitioner: {{customer.gp}}


-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/a40a8a68-b774-4b13-9306-a4939778329cn%40googlegroups.com.


Re: best book for learning django

2020-08-25 Thread Aayush Harwani
https://youtu.be/cRF7hIsIO10

This video will solve your problem , must watch.

ayush

On Tue, Aug 25, 2020, 2:20 PM nAnDa KuMaR k 
wrote:

> hii friends
> i need your help
> "which is best book learn django"
> please help me friends.
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/4878f832-4c3c-40eb-a569-b38e1fdd8238n%40googlegroups.com
> 
> .
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAHKG15HPDWgpxgZiY0C%2BCXULBM4GD1XeEMcPw_M-AZmvhW4HfQ%40mail.gmail.com.


Re: load static in css file

2020-08-25 Thread sapna Choudhary
The image which you want as background image has to be in static folder.

On Tue 25 Aug, 2020, 5:45 AM MAMADOU KANTE,  wrote:

> I did load static at the top of the file {% load static %}.
> Also I linked the CSS file named style.css. Part of the css file was
> working perfectly. I only had issues with the background image.
>
> On Mon, Aug 24, 2020 at 4:02 PM sapna Choudhary  wrote:
>
>> create a directory named 'static' in the current directory. This
>> directory is used to store images/css files, you can load static in
>> template using {%load static%}  this code block and link under image tag
>> like this {% static 'app_name/img.jpg' %}
>>
>> On Mon, Aug 24, 2020 at 6:16 PM 'Akash Sinha' via Django users <
>> django-users@googlegroups.com> wrote:
>>
>>>
>>> Hi
>>>
>>> Create a folder inside ur project as static and keep ur images,css and
>>> js files into that folder then in your settings.py file define static path.
>>> U need to run python manage.py collect static command on terminal and then
>>> you have to link that css file in HTML
>>>
>>>
>>> Hint: check for Managing static files in official django doc or try
>>> stack overflow.com you will get example to setup static path
>>>
>>>
>>> On Mon, 24 Aug 2020 at 5:37 pm, MAMADOU KANTE
>>>  wrote:
>>> Hi Everybody!
>>> I am trying to set a background image using the STYLE tag with django
>>> template as follows:
>>>  
>>> But when I open the HTML page and inspect the page I receive an image
>>> with width zero. Can anyone help?
>>> When I use the same syntax on a regular HTML without django templates it
>>> works.
>>>
>>> On Mon, Aug 3, 2020 at 10:02 AM Obodoma Uzondu Vincent <
>>> uobodoma...@gmail.com> wrote:
>>>
>>> Hello your have to follow the direction where you stored your file .
>>> Generally, in Django you create a static folder then maybe an image files
>>> where you store the images. You should link the image this way src= "{%
>>> static 'images/imag.png' %}"
>>>
>>> On Mon, 3 Aug 2020, 10:06 Yemin Sajid,  wrote:
>>>
>>> This may not work as intended if the CSS files are not rendered using
>>> the Django template engine. You have to put the style declaration where
>>> you'd need the image in the ** tag in your template
>>> code. From there you can use the *{% static “images/imag.png” %}*
>>> syntax.
>>> On Friday, July 31, 2020 at 5:58:48 PM UTC+6 Chander shekhar wrote:
>>>
>>> tried this buddy yet it is not working
>>>
>>> Regards
>>> Chander Shekhar
>>> (bestcsp)
>>>
>>>
>>> On Thu, Jul 30, 2020 at 6:11 PM Irfan Khan  wrote:
>>>
>>> {% static 'imag.jpg' %}   instead of this try
>>>
>>> {% static “images/imag.png” %}
>>>
>>> On Thu, 30 Jul 2020 at 6:07 PM, Chander shekhar 
>>> wrote:
>>>
>>> I am unable to fetch images from css file .
>>> I have used {% load static %}
>>> {% static 'imag.jpg' %}
>>> buti can't fetch.console is saying image not found.
>>>
>>> --
>>> 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...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/554cbaf1-3b94-40b4-a0f1-efe0bd3f24ceo%40googlegroups.com
>>> 
>>> .
>>>
>>> --
>>> 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...@googlegroups.com.
>>>
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/CALKGVio%3DAsCafgcd-zfjBb2of-RWbPaTwwGjf7sXbjstgFdM6Q%40mail.gmail.com
>>> 
>>> .
>>>
>>> --
>>> 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 view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/f0e45bd1-68ca-405f-a033-c808d6da53d5n%40googlegroups.com
>>> 
>>> .
>>>
>>> --
>>> 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 view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/CACsKspkUCWwQdO_nGB%3DoU61X9qta7_8bFoBJODSF5rZNoVhiyQ%40mail.gmail.com
>>> 

best book for learning django

2020-08-25 Thread nAnDa KuMaR k
hii friends 
i need your help
"which is best book learn django" 
please help me friends.

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/4878f832-4c3c-40eb-a569-b38e1fdd8238n%40googlegroups.com.


Re: why style.css is not read by my codes. i am using VScode for Django

2020-08-25 Thread Kenedi Novriansyah
test this STATIC_URL = "/static/"
STATIC_ROOT = os.path.join(BASE_DIR, "static")
url.py
urlpatterns += static(settings.STATIC_URL,
document_root=settings.STATIC_ROOT)


On Tue, Aug 25, 2020 at 12:45 PM RANGA BHARATH JINKA <
bharathjink...@gmail.com> wrote:

> Hi,
>
>I think it is not able to find the file. Please check whether it is the
> correct location of the files.
>   Add a static root in settings file like
> STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles')
>
> STATIC_URL = '/static/'
>
> STATICFILES_DIRS = [
> os.path.join(BASE_DIR, 'static')
> ]
>
> MEDIA_URL = '/images/'
>
> MEDIA_ROOT = os.path.join(BASE_DIR, 'static/images')
>
> All the best
>
> On Mon, Aug 24, 2020 at 10:03 PM Haris Ahmad  wrote:
>
>> Have you added whitenoise to the settings.py
>>
>> On Mon, 24 Aug 2020, 9:27 PM Amresh Giri, 
>> wrote:
>>
>>> Is is supposed to be "statics" ?
>>>
>>> On Mon, Aug 24, 2020, 9:49 PM alka reetesh 
>>> wrote:
>>>
 I have used python manage.py collectstatic, which gave
 error--FileNotFoundError: [WinError 3] The system cannot find the path
 specified: 'C:\dmform\myproject\statics'

 --
 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 view this discussion on the web visit
 https://groups.google.com/d/msgid/django-users/0dd03bb0-3c6c-4e7f-b7d7-9f6f55aae7bbn%40googlegroups.com
 
 .

>>> --
>>> 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 view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/CAJqzuMH9YfLHQnj3tESo8cZpYTRqf7uqXitZHdakfVt_2yRFTg%40mail.gmail.com
>>> 
>>> .
>>>
>> --
>> 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 view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CAG0UDYbWg9NQ6vHNdbWA0UNhb3Td1v7Mc4SxnxCeveywe6AMkg%40mail.gmail.com
>> 
>> .
>>
>
>
> --
> Thanks and Regards
>
> J. Ranga Bharath
> cell: 9110334114
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAK5m316v%2BgjgysVfK66Nrz4rG%2BUwYdV07u1y_QHB%3DMp-MhhU%2Bw%40mail.gmail.com
> 
> .
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CADA6z%3DR3-wjBM14Bg1DxjRQg1UPjSU9BHma9TdqLf98z%3DFrsUg%40mail.gmail.com.