Maintaining state across multiple views

2021-12-17 Thread Amit Karnam


Hey all,

I am working on a web app using django where in the first view i.e the 
landing page I collect a piece of info around which the web app revolves. I 
need this piece of info to be saved across different views.

GOAL : Instead of the drop down in the diseaseName I want the disease 
entered in the previous view saved and transmitted to the next views.


MODELS : 

```

class Disease\_Profile(models.Model): """ Disease Profile Model with 
One to One mapping with diseaseName , for the Author to fill. 0""" id = 
models.UUIDField(primary\_key=True, default=uuid.uuid4, editable=False) 
Disease\_Name = models.OneToOneField(diseaseName,on\_delete=CASCADE) 
Condition= models.CharField(max\_length=250,) description  = 
models.CharField(max\_length=1000)

```

```

class Physician(models.Model): """Physician Model to capture the best 
physician to be consulted for a particular disease""" 
Disease\_Name=models.ForeignKey(diseaseName,on\_delete=models.CASCADE) 
physician\_category=models.ForeignKey(PhysiciansList,on\_delete=models.CASCADE) 
rating  = models.IntegerField(choices = Rating\_model.points,help\_text='1 
: Beign the Best Choice AND 10 : Being the least favorable choice.') 

```

VIEWS : 

```

def diseaseProfile(request): form = diseaseProfileForm() context = 
{'form':form} if request.POST: form = diseaseProfileForm(request.POST) if 
form.is_valid(): form.save() Disease_Name = 
form.cleaned_data.get('Disease_Name') print(Disease_Name) return 
redirect('/physicianCare/')

```

```

def PhysicianCare(request): form = PhysicianCareForm() context = 
{'form':form,} return render(request,'physicianCare.html',context)  

```


-- 
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/ff3a693a-fa88-4054-b9af-f2eee828df71n%40googlegroups.com.


webpack

2021-08-25 Thread Amit Vaghani
How to use webpack in our django project

-- 
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/fd6ca7c9-1120-4d04-8c8d-3b83acca5f04n%40googlegroups.com.


scss

2021-08-18 Thread Amit Vaghani
How to use scss in our django project

-- 
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/9a8d5442-a95e-4c27-9db2-ec635f942e6dn%40googlegroups.com.


Role And Permission

2021-08-17 Thread Amit Vaghani
Handling Role From Frontend side 
like:- 
add role
delete role
update role 
then Handling Permissions
Assign permission
remove permissions from frontend side

So finally I want to Customise role and permission 
any one guide me for this?
  

-- 
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/c9f040b6-5983-4626-b3c2-d05cfad0cc7an%40googlegroups.com.


roles and permissions

2021-08-13 Thread Amit Vaghani
I want develop Custom Roles And Permission 
Any one guide 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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/8a8babc1-445c-416a-9abd-de75bec61a38n%40googlegroups.com.


Re: Job related query

2021-02-19 Thread Amit prasad Gupta
Dear madam,
I am Amit Prasad Gupta and currently I am working
as a python developer. I have 3 yr experience in python.  PFA

Thanks & Regards
Amit Prasad Gupta

On Fri, Feb 19, 2021, 10:31 AM neha bhurke  wrote:

> Hello everyone,
>
> We are looking for a python Django web app developer should have the total
> knowledge about python Django and should be experienced person at least for
> 2-3 years..
> If anyone  interested …
>
> --
> 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/c8e7ef0a-c72f-405f-94ce-00d953a77c52n%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/c8e7ef0a-c72f-405f-94ce-00d953a77c52n%40googlegroups.com?utm_medium=email_source=footer>
> .
>

-- 
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/CALGO601AsxDAU_SS94kZdV%2BAXmO5f5n_YMHx5658aqeeNNN4yA%40mail.gmail.com.


Amit_Gupta.pdf
Description: Adobe PDF document


Re:

2020-07-28 Thread Amit Singh
can you send me the website link

On Tue, 28 Jul 2020, 14:43 Anupriya Nishad,  wrote:

> I hosted my web app on a free hosting site pythonanywhere.com
> But it is taking too long to respond.
> What could be the reason?
>
> --
> 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/CAGcPrqTyvKaAnsU1sp%3DorX8RsoZKO4W9xvvGsKuJ3y2E0MyHnw%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/CAJrddaDru6cAa-kkaZwbboqHjZcpqPo6KwNTzREGCLC_ZES7fw%40mail.gmail.com.


Re: App Dev wanted

2020-04-30 Thread Amit Gupta
Hii
I wish your project will be completed soon
If wanna help u can contact me and send the details about remaining work I
would try to help

Regards
Amit Gupta

On Wed, 29 Apr, 2020, 7:38 PM Arne Bollinger, 
wrote:

> Hey,
> We came with a project out of a Covid-19 Hackathon that we could not
> finish. Now we want to launch as fast as possible as long as people are
> still in need of social contact.
> https://devpost.com/software/corona-circles
>
> We want to develop an Open-Source Django App that creates Jitsi Meet
> Sessions and sends out Emails to participants. Pretty simple. 3 volunteer
> backend devs have left us with unfinished code, so now we want to pay
> somebody from our pockets, to get it online asap!
>
> Here is a head start, the frontend is almost ready:
> https://github.com/CoronaCircles/coronacircles-django
> I estimate roughly maximum 10 hours needed. We have a Budget of at least
> 1000€.
> Anybody wants to help us?
>
> Cheers,
> Arne
>
>
> --
> 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/81f7a052-7366-45b7-b2dc-ffe23a6c5050%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/81f7a052-7366-45b7-b2dc-ffe23a6c5050%40googlegroups.com?utm_medium=email_source=footer>
> .
>

-- 
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/CAGCPjY8Q_6g67jHxEyyHW%3D8F3%2Br1ymb8M7kyvTLEsEJiq0zs%2BA%40mail.gmail.com.


Re: sphinx inside

2020-04-30 Thread Amit Gupta
Hii
If u want to just add your file in your django project u can probably copy
and paste the file in your project file and after that you can successfully
use your file in the project by just writing the name of  your file with
correct extension

On Fri, 1 May, 2020, 1:29 AM Kai Kobschätzki, 
wrote:

> Hi,
>
> I installed sphinx and I get an documentation in
> project_main/docs/_build/html, starting with html/index.html. In so far
> - fine.
>
> Now I want to present this documents inside my project so I can see in
> the nav-bar a "doc" where I can see them. But I have no idea how to
> start it. I tried it with a simple function in a view inside an app, but
> then I need a symbolic-link for getting the index.html, but then I can't
> get the rest of the documentation.
>
> I tried to google it but I only find tutorials for using sphinx to make
> a documentation for the django-project but I didn't find a tip how I can
> realize it.
>
> Could anyone give a kick-off for it or a link for a tutorial? Perhaps I
> have only the wrong keywords..
>
> Greetings
>
> bengoshi
>
>
>
> --
> 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/17689333-b06c-1dfc-1f18-341689914c42%40gmail.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/CAGCPjY-tNBKxj%3Dk-e9ew_6DtySK%2BDPE1QJyyMsXi%2Bjt4f-qA4g%40mail.gmail.com.


Re: Inventory management system

2019-11-22 Thread amit sharma
hi there kindly accept my invitation from snv.amitsharma .

On Fri, Nov 22, 2019 at 1:30 PM Motaz Hejaze  wrote:

> Lets start working on it togather ..
> Contact me on skype..
>
> Skype : m3tz-hjze
>
> On Fri, 22 Nov 2019, 9:33 am amit sharma,  wrote:
>
>> Hi there , if you want I can work for you.And make inventory management
>> as per your needs.work will be as per guidelines provided by you plus
>> that would be very cost  efficient.
>>
>> On Fri, Nov 22, 2019 at 4:36 AM Ibrahim Abdelaty <
>> ibrahimabdela...@gmail.com> wrote:
>>
>>> Hello guys,
>>>
>>> Iam in urgent need for help with building an inventory management system
>>> with a specific requirement if you are interested please contact 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 view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/3792837a-a8c3-4990-8aae-7f9ea88b95c6%40googlegroups.com
>>> <https://groups.google.com/d/msgid/django-users/3792837a-a8c3-4990-8aae-7f9ea88b95c6%40googlegroups.com?utm_medium=email_source=footer>
>>> .
>>>
>> --
>> 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/CAM%2BzG3OHbMVSQTDRcE1y8Jaa8%2Bqo0idfUDi7TfapTj6fk0iqbA%40mail.gmail.com
>> <https://groups.google.com/d/msgid/django-users/CAM%2BzG3OHbMVSQTDRcE1y8Jaa8%2Bqo0idfUDi7TfapTj6fk0iqbA%40mail.gmail.com?utm_medium=email_source=footer>
>> .
>>
> --
> 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/CAHV4E-eOwNvarN2Y6sewuzp4g4Abox5WM%3DhEwz_gsQt%3DCO370w%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAHV4E-eOwNvarN2Y6sewuzp4g4Abox5WM%3DhEwz_gsQt%3DCO370w%40mail.gmail.com?utm_medium=email_source=footer>
> .
>

-- 
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/CAM%2BzG3O1KcqWfdb3KXyCfF3oefzRW7rDGSUEL9MMwu3mcdU-%3Dw%40mail.gmail.com.


Re: Inventory management system

2019-11-21 Thread amit sharma
Hi there , if you want I can work for you.And make inventory management as
per your needs.work will be as per guidelines provided by you plus that
would be very cost  efficient.

On Fri, Nov 22, 2019 at 4:36 AM Ibrahim Abdelaty 
wrote:

> Hello guys,
>
> Iam in urgent need for help with building an inventory management system
> with a specific requirement if you are interested please contact 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/3792837a-a8c3-4990-8aae-7f9ea88b95c6%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/CAM%2BzG3OHbMVSQTDRcE1y8Jaa8%2Bqo0idfUDi7TfapTj6fk0iqbA%40mail.gmail.com.


Violation settimeout handler took 65ms

2019-11-08 Thread Amit Agarwal
Hi, i am making an http request to Django server through angular, I am
rcvng  violation settimeout handler took 65ms.

I have just written code http call in angular and displaying the response
in console.log


If I hit the URL to server directly from web browser, it works fine

Plz guide

-- 
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/CAEHyEspViy9xhffGU3FgUKQAh06U3yQNRO1hf-n%2B0N3VfpVaMA%40mail.gmail.com.


Djongo and mongodb

2019-11-07 Thread Amit Agarwal
Hi friends,
I am using Djongo to connect to MongoDB.

But I am not able to connect it to existing collection.

Can u all plz guide how to do this, or guide me with a useful link.

Also is Djongo good or are there any better framework to use

Thanks

-- 
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/c632867c-4863-4fe4-8853-7aabf731ab6b%40googlegroups.com.


read multiple document in create function of viewset

2019-11-07 Thread Amit Agarwal
I am passing a more than one JSON document in post request, in create
method of viewset, when I validate it, it raises an error "



"detail": "JSON parse error - Extra data: line 5 column 6 (char 74)"

How can i handle it?

-- 
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/CAEHyEsoFyELjey0yGQp_qJp6sZEZJ5C2ppWFTbUbngNftsVxGw%40mail.gmail.com.


How to use session in django

2019-11-02 Thread Amit Agarwal
Helo everyone,

I am making a post request to the server from client.py. I am getting error 
forbidden csrf cookie not set.

What is the correct way to use session?
 

-- 
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/703a7b26-dbeb-43ba-83c8-66dab79afb1b%40googlegroups.com.


Re: Entire Application in Django shuts down with single error

2019-10-03 Thread Amit Sharma
Hi , 
I agree with your point and i do follow same. But what my main concern here 
is :--

Can we have in django that if one page has got some error than other page  
do not stop working. This was only thing i want to know. Kindly help.




On Wednesday, October 2, 2019 at 1:19:49 PM UTC+5:30, Andréas Kühne wrote:
>
> Hi,
>
> You shouldn't use runserver in production - that's not what it's for. So 
> first read how to deploy django in production. When in production, you 
> don't deploy code that doesn't work - so that means that you won't get this 
> issue.
>
> You shouldn't work on live working websites - that's not how you do it 
> professionally. You should work locally on your machine and then update the 
> production server WHEN everything works. Allowing someone to work live on a 
> production server is a major issue. Like you said, you will probably crash 
> the server when doing that. 
>
> Django development is very friendly - as long as you work in the correct 
> way:
>
> 1. Work on a development machine - update the changes and run your tests 
> to make sure that everything works as expected.
> 2. Create a package for the website somehow (git archive, create a docker 
> image or something like that).
> 2a. Test your code on a staging server.
> 3. Update your production server with the working code.
> 4. Restart the application server on the production server.
>
> If you follow that mindset it won't be a problem when working  - and this 
> is basically the way you should be working REGARDLESS of what framework you 
> are using. Otherwise you will get changes done in several places - you 
> won't know what is the latest code and so on.
>
> The list above is a minimal list - you could of course expand on that as 
> well.
>
>
> Regards,
>
> Andréas
>
>
> Den tis 1 okt. 2019 kl 13:13 skrev Amit Sharma  >:
>
>> I am new to Python and django , I worked on C# and php as developer 
>> earlier. My problem here is Entire Application in Django shuts down with 
>> single error.
>>
>> for example i start my website with "python3 manage.py runserver 
>> 0.0.0.0:8000" example:-- i have two pages home and register
>> 1) if i make error in register page code(register.py) , It shuts down 
>> home page too. Is there a way to prevent that as in php and C# in both one 
>> page do not effect other.
>> 2) how to work in django with team one errors full team hangs.
>>
>> 3) How to work with live working websites things may become too risky.
>>
>> 4) can we make django development as friendly as C#, PHP  . and 
>> other programming language
>>
>> also i am not able to find article related to this. kindly 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...@googlegroups.com .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/7d81706a-2f84-4f55-a25c-1bae726a8879%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/django-users/7d81706a-2f84-4f55-a25c-1bae726a8879%40googlegroups.com?utm_medium=email_source=footer>
>> .
>>
>

-- 
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/807cd268-aecc-45db-84b9-6d3371bb5d49%40googlegroups.com.


Entire Application in Django shuts down with single error

2019-10-01 Thread Amit Sharma
I am new to Python and django , I worked on C# and php as developer 
earlier. My problem here is Entire Application in Django shuts down with 
single error.

for example i start my website with "python3 manage.py runserver 
0.0.0.0:8000" example:-- i have two pages home and register
1) if i make error in register page code(register.py) , It shuts down home 
page too. Is there a way to prevent that as in php and C# in both one page 
do not effect other.
2) how to work in django with team one errors full team hangs.

3) How to work with live working websites things may become too risky.

4) can we make django development as friendly as C#, PHP  . and 
other programming language

also i am not able to find article related to this. kindly 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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/7d81706a-2f84-4f55-a25c-1bae726a8879%40googlegroups.com.


Django ORM

2019-09-09 Thread Amit Samanta
Hi,

Please help
 i have models

[image: Capture.JPG]

here

there will be env under which there will be deployment to many component 
and also i component multiple times

now i want a output like 

(env name   - (component (recent updated in detail table)
deploy_dtls according to the recent component )per component)per environment


Please please 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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/fd1e5153-0908-4753-a2d2-b8e6b660d4bb%40googlegroups.com.


Query into Django ORM

2019-09-05 Thread Amit Samanta
Hi,

I am facing a challenge please help me.

[image: Query.PNG]


output:

[image: output.PNG]

Here one env_name can have many comp name and one env with one comp_name 
there will be many deploy_details which is in green colour (latest).

in deploy_detail if there is two deploy in one component we will take the 
latest deploy_date. 


Now please can anyone help me in converting this query into Django ORM and 
the models 

Thanks in advance



-- 
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/db10af4c-ef4c-47cb-82fd-a442d3b381ab%40googlegroups.com.


Re: Please help me in views.py

2019-09-05 Thread Amit Samanta
Hi everybody thank you for helping me throughout...

lastly do anyone know how to group by in django orm


 or if i give a db query can anyone help me in changing it to django orm??
please
Thank you in advance
Amit Samanta

On Wed, 4 Sep, 2019, 7:50 PM Amit Samanta,  wrote:

> Its done now.. thank u everybody
>
> Now i want to do that it will show only the latest book with detail of a
> author
>
>
>
> On Wed, 4 Sep, 2019, 6:07 PM Amit Samanta, 
> wrote:
>
>> i get all thank you for your help..
>> the actuall funda is
>> i have to show author name with related to that i have to show books name
>> of the same author now the detail related to the books
>> this is wht i need
>> :-(
>>
>> On Wed, 4 Sep, 2019, 6:01 PM Devdutt Bhati, 
>> wrote:
>>
>>> if you created table in models.py. you can import table at view file
>>> like : from  appname .models import table/class name .
>>> when you got the table data at views file then use it as
>>> *variable=Tablename.objects.all()* now get all values in variable. it
>>> can render in render function and use values at html page.
>>> use for loop.
>>>
>>> On Wed, Sep 4, 2019 at 12:58 AM Amit Samanta 
>>> wrote:
>>>
>>>> I want try is...
>>>> there will be a dashboard
>>>>
>>>> which will show
>>>>
>>>> Author name
>>>>
>>>> all the books which the author written
>>>>
>>>> details of the book published date , avout the book in the above format
>>>>
>>>>
>>>> On Wed, 4 Sep, 2019, 12:08 PM Anirudh Jain, 
>>>> wrote:
>>>>
>>>>> Could you please elaborate/be more clear about what you are really
>>>>> trying to do ?
>>>>>
>>>>> On Wed, 4 Sep 2019, 10:26 Bhoopesh sisoudiya, 
>>>>> wrote:
>>>>>
>>>>>> Hi Amit,
>>>>>>
>>>>>> You can use
>>>>>> =≠=
>>>>>> Book.objects.select_related(FK).select_related(FK). values (select
>>>>>> column name which you want).all()
>>>>>>
>>>>>>
>>>>>> Thanks
>>>>>> Bhoopesh sisoudiya
>>>>>>
>>>>>> On Wed, Sep 4, 2019, 9:38 AM Amit Samanta 
>>>>>> wrote:
>>>>>>
>>>>>>> Hi,
>>>>>>>
>>>>>>> I need help i am not understanding the keywords of joining and fetch
>>>>>>> value in veiw.py
>>>>>>> i have three tables in model.py
>>>>>>>
>>>>>>> Table 1(Author) :
>>>>>>>
>>>>>>> Table 2(books):
>>>>>>>
>>>>>>> Table 3 (details):
>>>>>>> FK of table1
>>>>>>> FK of table2
>>>>>>>
>>>>>>> Fk = foreign key
>>>>>>>
>>>>>>> I have to just show
>>>>>>>
>>>>>>> Author (author name) Books (dynamic) Books(author 2nd book)
>>>>>>>  ...
>>>>>>> details(dynamic)
>>>>>>>  details(dtl of author 2nd book) ...
>>>>>>>
>>>>>>> I have created the template
>>>>>>>
>>>>>>> now in views.py i an confused
>>>>>>>
>>>>>>> book=books.object(i do not get what to do)
>>>>>>> Author= (same )
>>>>>>> details = (same)
>>>>>>>
>>>>>>> Please can anybody help that will be very greatfull.
>>>>>>> Thank you in advance
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Thanks and Regards
>>>>>>> Amit Samanta
>>>>>>>
>>>>>>> --
>>>>>>> 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/

Re: Please help me in views.py

2019-09-04 Thread Amit Samanta
Its done now.. thank u everybody

Now i want to do that it will show only the latest book with detail of a
author



On Wed, 4 Sep, 2019, 6:07 PM Amit Samanta,  wrote:

> i get all thank you for your help..
> the actuall funda is
> i have to show author name with related to that i have to show books name
> of the same author now the detail related to the books
> this is wht i need
> :-(
>
> On Wed, 4 Sep, 2019, 6:01 PM Devdutt Bhati, 
> wrote:
>
>> if you created table in models.py. you can import table at view file
>> like : from  appname .models import table/class name .
>> when you got the table data at views file then use it as
>> *variable=Tablename.objects.all()* now get all values in variable. it
>> can render in render function and use values at html page.
>> use for loop.
>>
>> On Wed, Sep 4, 2019 at 12:58 AM Amit Samanta 
>> wrote:
>>
>>> I want try is...
>>> there will be a dashboard
>>>
>>> which will show
>>>
>>> Author name
>>>
>>> all the books which the author written
>>>
>>> details of the book published date , avout the book in the above format
>>>
>>>
>>> On Wed, 4 Sep, 2019, 12:08 PM Anirudh Jain, 
>>> wrote:
>>>
>>>> Could you please elaborate/be more clear about what you are really
>>>> trying to do ?
>>>>
>>>> On Wed, 4 Sep 2019, 10:26 Bhoopesh sisoudiya, 
>>>> wrote:
>>>>
>>>>> Hi Amit,
>>>>>
>>>>> You can use
>>>>> =≠=
>>>>> Book.objects.select_related(FK).select_related(FK). values (select
>>>>> column name which you want).all()
>>>>>
>>>>>
>>>>> Thanks
>>>>> Bhoopesh sisoudiya
>>>>>
>>>>> On Wed, Sep 4, 2019, 9:38 AM Amit Samanta 
>>>>> wrote:
>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> I need help i am not understanding the keywords of joining and fetch
>>>>>> value in veiw.py
>>>>>> i have three tables in model.py
>>>>>>
>>>>>> Table 1(Author) :
>>>>>>
>>>>>> Table 2(books):
>>>>>>
>>>>>> Table 3 (details):
>>>>>> FK of table1
>>>>>> FK of table2
>>>>>>
>>>>>> Fk = foreign key
>>>>>>
>>>>>> I have to just show
>>>>>>
>>>>>> Author (author name) Books (dynamic) Books(author 2nd book)
>>>>>>  ...
>>>>>> details(dynamic)
>>>>>>  details(dtl of author 2nd book) ...
>>>>>>
>>>>>> I have created the template
>>>>>>
>>>>>> now in views.py i an confused
>>>>>>
>>>>>> book=books.object(i do not get what to do)
>>>>>> Author= (same )
>>>>>> details = (same)
>>>>>>
>>>>>> Please can anybody help that will be very greatfull.
>>>>>> Thank you in advance
>>>>>>
>>>>>>
>>>>>>
>>>>>> Thanks and Regards
>>>>>> Amit Samanta
>>>>>>
>>>>>> --
>>>>>> 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/54483cc3-eadd-4559-8c61-c179cfbab933%40googlegroups.com
>>>>>> <https://groups.google.com/d/msgid/django-users/54483cc3-eadd-4559-8c61-c179cfbab933%40googlegroups.com?utm_medium=email_source=footer>
>>>>>> .
>>>>>>
>>>>> --
>>>>> 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.goog

Re: Please help me in views.py

2019-09-04 Thread Amit Samanta
i get all thank you for your help..
the actuall funda is
i have to show author name with related to that i have to show books name
of the same author now the detail related to the books
this is wht i need
:-(

On Wed, 4 Sep, 2019, 6:01 PM Devdutt Bhati, 
wrote:

> if you created table in models.py. you can import table at view file like
> : from  appname .models import table/class name .
> when you got the table data at views file then use it as
> *variable=Tablename.objects.all()* now get all values in variable. it can
> render in render function and use values at html page.
> use for loop.
>
> On Wed, Sep 4, 2019 at 12:58 AM Amit Samanta 
> wrote:
>
>> I want try is...
>> there will be a dashboard
>>
>> which will show
>>
>> Author name
>>
>> all the books which the author written
>>
>> details of the book published date , avout the book in the above format
>>
>>
>> On Wed, 4 Sep, 2019, 12:08 PM Anirudh Jain, 
>> wrote:
>>
>>> Could you please elaborate/be more clear about what you are really
>>> trying to do ?
>>>
>>> On Wed, 4 Sep 2019, 10:26 Bhoopesh sisoudiya, 
>>> wrote:
>>>
>>>> Hi Amit,
>>>>
>>>> You can use
>>>> =====≠=
>>>> Book.objects.select_related(FK).select_related(FK). values (select
>>>> column name which you want).all()
>>>>
>>>>
>>>> Thanks
>>>> Bhoopesh sisoudiya
>>>>
>>>> On Wed, Sep 4, 2019, 9:38 AM Amit Samanta 
>>>> wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> I need help i am not understanding the keywords of joining and fetch
>>>>> value in veiw.py
>>>>> i have three tables in model.py
>>>>>
>>>>> Table 1(Author) :
>>>>>
>>>>> Table 2(books):
>>>>>
>>>>> Table 3 (details):
>>>>> FK of table1
>>>>> FK of table2
>>>>>
>>>>> Fk = foreign key
>>>>>
>>>>> I have to just show
>>>>>
>>>>> Author (author name) Books (dynamic) Books(author 2nd book)
>>>>>...
>>>>> details(dynamic)
>>>>>  details(dtl of author 2nd book) ...
>>>>>
>>>>> I have created the template
>>>>>
>>>>> now in views.py i an confused
>>>>>
>>>>> book=books.object(i do not get what to do)
>>>>> Author= (same )
>>>>> details = (same)
>>>>>
>>>>> Please can anybody help that will be very greatfull.
>>>>> Thank you in advance
>>>>>
>>>>>
>>>>>
>>>>> Thanks and Regards
>>>>> Amit Samanta
>>>>>
>>>>> --
>>>>> 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/54483cc3-eadd-4559-8c61-c179cfbab933%40googlegroups.com
>>>>> <https://groups.google.com/d/msgid/django-users/54483cc3-eadd-4559-8c61-c179cfbab933%40googlegroups.com?utm_medium=email_source=footer>
>>>>> .
>>>>>
>>>> --
>>>> 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/CAAk3c1OzGXKSQg8GK1C8_5Ck-iQ%2B1WjsYMdD%2B%2B0_q3inb94jyw%40mail.gmail.com
>>>> <https://groups.google.com/d/msgid/django-users/CAAk3c1OzGXKSQg8GK1C8_5Ck-iQ%2B1WjsYMdD%2B%2B0_q3inb94jyw%40mail.gmail.com?utm_medium=email_source=footer>
>>>> .
>>>>
>>> --
>>> 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.
>>>

Re: Please help me in views.py

2019-09-04 Thread Amit Samanta
by the above it is not giving any error but it is not showing the
correspondence names and also it is showing all the fields in detail :-((

please help

On Wed, 4 Sep, 2019, 4:10 PM Anirudh Jain, 
wrote:

> Then simply use {{ obj.book_name.name }} in template where again, I am
> assuming 'name' is the column name you have give to book name in Books model
>
> On Wed, Sep 4, 2019 at 3:25 PM Amit Samanta 
> wrote:
>
>> You have gussed correctly..
>> but i have taked book id as fk but i need the book name
>>
>> On Wed, 4 Sep, 2019, 2:41 PM Anirudh Jain, 
>> wrote:
>>
>>> This can be done easily if you make a proper view function and render
>>> data from it in template properly.
>>> A view function can be written like this :-
>>>
>>> Here I am assuming that you want get the details of all the
>>> books/auuthors at one page. If you want details of a particular book, then
>>> the following function will be different.
>>>
>>> from .models import Details, Author, Books
>>> from django.shortcuts import render
>>>
>>> view.py :-
>>> def getdetails(request):
>>> template_name = 'showDetails.html'
>>> objs = Details.objects.all()
>>> context = {'objs; : objs}
>>> return render(request, template_name, context}
>>>
>>>
>>> showDetails.html :-
>>> (use this block in your html code wherever you want to show this data)
>>>
>>> {% if objs %}
>>>
>>> 
>>> 
>>> Author
>>> Book
>>> 
>>>
>>> {% for obj in objs %}
>>> 
>>>   {{ obj.author_name }} 
>>>   {{ obj.book_name }} 
>>> 
>>> {% endfor %}
>>> 
>>>
>>> {% endif %}
>>>
>>> (In above html code, I have assumed that author_name and book_name are
>>> the FK in your Details table. Also, I am not sure
>>>
>>>
>>> On Wed, Sep 4, 2019 at 1:34 PM Lim Kai Wey  wrote:
>>>
>>>> Hey Amit,
>>>>
>>>> I suggest you to follow this tutorial to build your project,
>>>>
>>>> https://developer.mozilla.org/en-US/docs/Learn/Server-side/Django/Tutorial_local_library_website
>>>>
>>>> It teaches you all the basics that you need to know from scratch, which
>>>> in my opinion will answer all the questions you're asking.
>>>> The tutorial is about building a local library webpage which I believe
>>>> is very similar to what you are doing now.
>>>>
>>>> Hope this helps.
>>>>
>>>> Regards,
>>>> Kai Wey
>>>>
>>>> On Wed, Sep 4, 2019 at 3:59 PM Amit Samanta 
>>>> wrote:
>>>>
>>>>> now how can i get the name for author and details??
>>>>>
>>>>> On Wed, 4 Sep, 2019, 10:25 AM Bhoopesh sisoudiya, <
>>>>> bhoop23...@gmail.com> wrote:
>>>>>
>>>>>> Hi Amit,
>>>>>>
>>>>>> You can use
>>>>>> =≠=
>>>>>> Book.objects.select_related(FK).select_related(FK). values (select
>>>>>> column name which you want).all()
>>>>>>
>>>>>>
>>>>>> Thanks
>>>>>> Bhoopesh sisoudiya
>>>>>>
>>>>>> On Wed, Sep 4, 2019, 9:38 AM Amit Samanta 
>>>>>> wrote:
>>>>>>
>>>>>>> Hi,
>>>>>>>
>>>>>>> I need help i am not understanding the keywords of joining and fetch
>>>>>>> value in veiw.py
>>>>>>> i have three tables in model.py
>>>>>>>
>>>>>>> Table 1(Author) :
>>>>>>>
>>>>>>> Table 2(books):
>>>>>>>
>>>>>>> Table 3 (details):
>>>>>>> FK of table1
>>>>>>> FK of table2
>>>>>>>
>>>>>>> Fk = foreign key
>>>>>>>
>>>>>>> I have to just show
>>>>>>>
>>>>>>> Author (author name) Books (dynamic) Books(author 2nd book)
>>>>>>>  ...
>>>>>>> details(dynamic)
>>>>>>>  details(dtl of author 2nd book) ...
>>>>>>>
>>>>>>> I have crea

Re: Please help me in views.py

2019-09-04 Thread Amit Samanta
You have gussed correctly..
but i have taked book id as fk but i need the book name

On Wed, 4 Sep, 2019, 2:41 PM Anirudh Jain, 
wrote:

> This can be done easily if you make a proper view function and render data
> from it in template properly.
> A view function can be written like this :-
>
> Here I am assuming that you want get the details of all the books/auuthors
> at one page. If you want details of a particular book, then the following
> function will be different.
>
> from .models import Details, Author, Books
> from django.shortcuts import render
>
> view.py :-
> def getdetails(request):
> template_name = 'showDetails.html'
> objs = Details.objects.all()
> context = {'objs; : objs}
> return render(request, template_name, context}
>
>
> showDetails.html :-
> (use this block in your html code wherever you want to show this data)
>
> {% if objs %}
>
> 
> 
> Author
> Book
> 
>
> {% for obj in objs %}
> 
>   {{ obj.author_name }} 
>   {{ obj.book_name }} 
> 
> {% endfor %}
> 
>
> {% endif %}
>
> (In above html code, I have assumed that author_name and book_name are the
> FK in your Details table. Also, I am not sure
>
>
> On Wed, Sep 4, 2019 at 1:34 PM Lim Kai Wey  wrote:
>
>> Hey Amit,
>>
>> I suggest you to follow this tutorial to build your project,
>>
>> https://developer.mozilla.org/en-US/docs/Learn/Server-side/Django/Tutorial_local_library_website
>>
>> It teaches you all the basics that you need to know from scratch, which
>> in my opinion will answer all the questions you're asking.
>> The tutorial is about building a local library webpage which I believe is
>> very similar to what you are doing now.
>>
>> Hope this helps.
>>
>> Regards,
>> Kai Wey
>>
>> On Wed, Sep 4, 2019 at 3:59 PM Amit Samanta 
>> wrote:
>>
>>> now how can i get the name for author and details??
>>>
>>> On Wed, 4 Sep, 2019, 10:25 AM Bhoopesh sisoudiya, 
>>> wrote:
>>>
>>>> Hi Amit,
>>>>
>>>> You can use
>>>> =≠=
>>>> Book.objects.select_related(FK).select_related(FK). values (select
>>>> column name which you want).all()
>>>>
>>>>
>>>> Thanks
>>>> Bhoopesh sisoudiya
>>>>
>>>> On Wed, Sep 4, 2019, 9:38 AM Amit Samanta 
>>>> wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> I need help i am not understanding the keywords of joining and fetch
>>>>> value in veiw.py
>>>>> i have three tables in model.py
>>>>>
>>>>> Table 1(Author) :
>>>>>
>>>>> Table 2(books):
>>>>>
>>>>> Table 3 (details):
>>>>> FK of table1
>>>>> FK of table2
>>>>>
>>>>> Fk = foreign key
>>>>>
>>>>> I have to just show
>>>>>
>>>>> Author (author name) Books (dynamic) Books(author 2nd book)
>>>>>...
>>>>> details(dynamic)
>>>>>  details(dtl of author 2nd book) ...
>>>>>
>>>>> I have created the template
>>>>>
>>>>> now in views.py i an confused
>>>>>
>>>>> book=books.object(i do not get what to do)
>>>>> Author= (same )
>>>>> details = (same)
>>>>>
>>>>> Please can anybody help that will be very greatfull.
>>>>> Thank you in advance
>>>>>
>>>>>
>>>>>
>>>>> Thanks and Regards
>>>>> Amit Samanta
>>>>>
>>>>> --
>>>>> 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/54483cc3-eadd-4559-8c61-c179cfbab933%40googlegroups.com
>>>>> <https://groups.google.com/d/msgid/django-users/54483cc3-eadd-4559-8c61-c179cfbab933%40googlegroups.com?utm_medium=email_source=footer>
>>>>> .
>>>>>
>>>> --
>>>> You received this message because you are subscribed to the Google
>>>> Groups &quo

Re: Please help me in views.py

2019-09-04 Thread Amit Samanta
i just need the veiw.py after this done i will try your tutorial

On Wed, 4 Sep, 2019, 1:34 PM Lim Kai Wey,  wrote:

> Hey Amit,
>
> I suggest you to follow this tutorial to build your project,
>
> https://developer.mozilla.org/en-US/docs/Learn/Server-side/Django/Tutorial_local_library_website
>
> It teaches you all the basics that you need to know from scratch, which in
> my opinion will answer all the questions you're asking.
> The tutorial is about building a local library webpage which I believe is
> very similar to what you are doing now.
>
> Hope this helps.
>
> Regards,
> Kai Wey
>
> On Wed, Sep 4, 2019 at 3:59 PM Amit Samanta 
> wrote:
>
>> now how can i get the name for author and details??
>>
>> On Wed, 4 Sep, 2019, 10:25 AM Bhoopesh sisoudiya, 
>> wrote:
>>
>>> Hi Amit,
>>>
>>> You can use
>>> =≠=
>>> Book.objects.select_related(FK).select_related(FK). values (select
>>> column name which you want).all()
>>>
>>>
>>> Thanks
>>> Bhoopesh sisoudiya
>>>
>>> On Wed, Sep 4, 2019, 9:38 AM Amit Samanta 
>>> wrote:
>>>
>>>> Hi,
>>>>
>>>> I need help i am not understanding the keywords of joining and fetch
>>>> value in veiw.py
>>>> i have three tables in model.py
>>>>
>>>> Table 1(Author) :
>>>>
>>>> Table 2(books):
>>>>
>>>> Table 3 (details):
>>>> FK of table1
>>>> FK of table2
>>>>
>>>> Fk = foreign key
>>>>
>>>> I have to just show
>>>>
>>>> Author (author name) Books (dynamic) Books(author 2nd book)
>>>>...
>>>> details(dynamic)
>>>>  details(dtl of author 2nd book) ...
>>>>
>>>> I have created the template
>>>>
>>>> now in views.py i an confused
>>>>
>>>> book=books.object(i do not get what to do)
>>>> Author= (same )
>>>> details = (same)
>>>>
>>>> Please can anybody help that will be very greatfull.
>>>> Thank you in advance
>>>>
>>>>
>>>>
>>>> Thanks and Regards
>>>> Amit Samanta
>>>>
>>>> --
>>>> 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/54483cc3-eadd-4559-8c61-c179cfbab933%40googlegroups.com
>>>> <https://groups.google.com/d/msgid/django-users/54483cc3-eadd-4559-8c61-c179cfbab933%40googlegroups.com?utm_medium=email_source=footer>
>>>> .
>>>>
>>> --
>>> 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/CAAk3c1OzGXKSQg8GK1C8_5Ck-iQ%2B1WjsYMdD%2B%2B0_q3inb94jyw%40mail.gmail.com
>>> <https://groups.google.com/d/msgid/django-users/CAAk3c1OzGXKSQg8GK1C8_5Ck-iQ%2B1WjsYMdD%2B%2B0_q3inb94jyw%40mail.gmail.com?utm_medium=email_source=footer>
>>> .
>>>
>> --
>> 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/CAP4hbAY%3DvOB%2BEs6hZ77jcAU_-LuuG51LkqEPU3eB5nrgqS48ow%40mail.gmail.com
>> <https://groups.google.com/d/msgid/django-users/CAP4hbAY%3DvOB%2BEs6hZ77jcAU_-LuuG51LkqEPU3eB5nrgqS48ow%40mail.gmail.com?utm_medium=email_source=footer>
>> .
>>
> --
> 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/CAPcVkjg11EAf-rYFvoz85Y5BLKBisD4FJQSOCzonzi0TFC91ZQ%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAPcVkjg11EAf-rYFvoz85Y5BLKBisD4FJQSOCzonzi0TFC91ZQ%40mail.gmail.com?utm_medium=email_source=footer>
> .
>

-- 
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/CAP4hbAbE21Cz1rfPohvhUbZ6DRO_5QHQTdVDZWotOU%3DjkjioDA%40mail.gmail.com.


Re: Please help me in views.py

2019-09-04 Thread Amit Samanta
now how can i get the name for author and details??

On Wed, 4 Sep, 2019, 10:25 AM Bhoopesh sisoudiya, 
wrote:

> Hi Amit,
>
> You can use
> =≠=
> Book.objects.select_related(FK).select_related(FK). values (select column
> name which you want).all()
>
>
> Thanks
> Bhoopesh sisoudiya
>
> On Wed, Sep 4, 2019, 9:38 AM Amit Samanta  wrote:
>
>> Hi,
>>
>> I need help i am not understanding the keywords of joining and fetch
>> value in veiw.py
>> i have three tables in model.py
>>
>> Table 1(Author) :
>>
>> Table 2(books):
>>
>> Table 3 (details):
>> FK of table1
>> FK of table2
>>
>> Fk = foreign key
>>
>> I have to just show
>>
>> Author (author name) Books (dynamic) Books(author 2nd book)
>>  ...
>> details(dynamic) details(dtl
>> of author 2nd book) ...
>>
>> I have created the template
>>
>> now in views.py i an confused
>>
>> book=books.object(i do not get what to do)
>> Author= (same )
>> details = (same)
>>
>> Please can anybody help that will be very greatfull.
>> Thank you in advance
>>
>>
>>
>> Thanks and Regards
>> Amit Samanta
>>
>> --
>> 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/54483cc3-eadd-4559-8c61-c179cfbab933%40googlegroups.com
>> <https://groups.google.com/d/msgid/django-users/54483cc3-eadd-4559-8c61-c179cfbab933%40googlegroups.com?utm_medium=email_source=footer>
>> .
>>
> --
> 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/CAAk3c1OzGXKSQg8GK1C8_5Ck-iQ%2B1WjsYMdD%2B%2B0_q3inb94jyw%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAAk3c1OzGXKSQg8GK1C8_5Ck-iQ%2B1WjsYMdD%2B%2B0_q3inb94jyw%40mail.gmail.com?utm_medium=email_source=footer>
> .
>

-- 
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/CAP4hbAY%3DvOB%2BEs6hZ77jcAU_-LuuG51LkqEPU3eB5nrgqS48ow%40mail.gmail.com.


Re: Please help me in views.py

2019-09-04 Thread Amit Samanta
I want try is...
there will be a dashboard

which will show

Author name

all the books which the author written

details of the book published date , avout the book in the above format


On Wed, 4 Sep, 2019, 12:08 PM Anirudh Jain, 
wrote:

> Could you please elaborate/be more clear about what you are really trying
> to do ?
>
> On Wed, 4 Sep 2019, 10:26 Bhoopesh sisoudiya, 
> wrote:
>
>> Hi Amit,
>>
>> You can use
>> =≠=
>> Book.objects.select_related(FK).select_related(FK). values (select
>> column name which you want).all()
>>
>>
>> Thanks
>> Bhoopesh sisoudiya
>>
>> On Wed, Sep 4, 2019, 9:38 AM Amit Samanta 
>> wrote:
>>
>>> Hi,
>>>
>>> I need help i am not understanding the keywords of joining and fetch
>>> value in veiw.py
>>> i have three tables in model.py
>>>
>>> Table 1(Author) :
>>>
>>> Table 2(books):
>>>
>>> Table 3 (details):
>>> FK of table1
>>> FK of table2
>>>
>>> Fk = foreign key
>>>
>>> I have to just show
>>>
>>> Author (author name) Books (dynamic) Books(author 2nd book)
>>>  ...
>>> details(dynamic) details(dtl
>>> of author 2nd book) ...
>>>
>>> I have created the template
>>>
>>> now in views.py i an confused
>>>
>>> book=books.object(i do not get what to do)
>>> Author= (same )
>>> details = (same)
>>>
>>> Please can anybody help that will be very greatfull.
>>> Thank you in advance
>>>
>>>
>>>
>>> Thanks and Regards
>>> Amit Samanta
>>>
>>> --
>>> 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/54483cc3-eadd-4559-8c61-c179cfbab933%40googlegroups.com
>>> <https://groups.google.com/d/msgid/django-users/54483cc3-eadd-4559-8c61-c179cfbab933%40googlegroups.com?utm_medium=email_source=footer>
>>> .
>>>
>> --
>> 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/CAAk3c1OzGXKSQg8GK1C8_5Ck-iQ%2B1WjsYMdD%2B%2B0_q3inb94jyw%40mail.gmail.com
>> <https://groups.google.com/d/msgid/django-users/CAAk3c1OzGXKSQg8GK1C8_5Ck-iQ%2B1WjsYMdD%2B%2B0_q3inb94jyw%40mail.gmail.com?utm_medium=email_source=footer>
>> .
>>
> --
> 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/CAC3mK7faT1yOHZXdHXc0DyeDYRtTpD_Pke39AJYmXRQW%2BOi09Q%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAC3mK7faT1yOHZXdHXc0DyeDYRtTpD_Pke39AJYmXRQW%2BOi09Q%40mail.gmail.com?utm_medium=email_source=footer>
> .
>

-- 
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/CAP4hbAbWFvE0CRoeX45psThD7yWbKHR16aJXH866-dCFdHSfZw%40mail.gmail.com.


Please help me in views.py

2019-09-03 Thread Amit Samanta
Hi,

I need help i am not understanding the keywords of joining and fetch value 
in veiw.py
i have three tables in model.py

Table 1(Author) :

Table 2(books):

Table 3 (details):
FK of table1
FK of table2

Fk = foreign key

I have to just show 

Author (author name) Books (dynamic) Books(author 2nd book)
   ...
details(dynamic) details(dtl of 
author 2nd book) ...

I have created the template

now in views.py i an confused

book=books.object(i do not get what to do)
Author= (same )
details = (same)

Please can anybody help that will be very greatfull.
Thank you in advance



Thanks and Regards
Amit Samanta

-- 
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/54483cc3-eadd-4559-8c61-c179cfbab933%40googlegroups.com.


Re: Django with mysql

2019-08-23 Thread Amit Samanta
On Friday, August 23, 2019 at 8:25:47 PM UTC+5:30, Amit Samanta wrote:
> Hi,
> 
> 
> I am facing issue while downloading mysql client
> Here i am using linux server and i do not have internet connection
> Also downloaded all the packages from https://www.pypi.org
> We have created user,password and database for django in a different mysql 
> server 5.6
> 
> 
> Things i have done:
> First of all i do not have internet connection in linux server where i have 
> installed django
> 
> 
> 
> 
> i am using python 3.6.8
> django 1.11
>  dependencies -> pytz
>                         ->sqlparse
> 
> 
> then i started the server and it started.
> installed python3-devel and mysql-devel from rhel repo
> 
> 
> Then installed through pip3 install mysql-connector-python.whl
> dependencies -> protobuf >=3.0.0
>                        ->six >=1.9
> 
> 
> from setting.py
> I configured the databases
> 
> 
> tried to runserver
> ERROR:mysqldb console
> 
> 
> Now found no mysql client
> thought install mysql client 5.6 from os level but no luck
> 
> 
> got mysql client 1.4.4 in pypi but all in windows os
> 
> 
> googled and search many site but everywhere it is "pip install mysql client" 
> but no internet.
> 
> 
> Please help! As now the goal is change django from sqllite3 to mysql.
> 
> 
> 
> 
> Thanks and Regards
> Amit Samanta

@Gobo Lato
Sir with searching mysqlclient all are for windows not in linux

@khalifa gueye
sir where can i get the version? pypi?

@Ahlam
sir i am working on my office network that is the issue.


i have tried pymysql it worked xan anyone help me with the differents between 
pymysql and mysqlclient

-- 
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/72e3d542-1877-44f4-b7ab-8f40c0c14848%40googlegroups.com.


Django with mysql

2019-08-23 Thread Amit Samanta
Hi,

I am facing issue while downloading *mysql client*
Here i am using linux server and i do not have internet connection
Also downloaded all the packages from *https://www.pypi.org*
We have created user,password and database for django in a different mysql 
server 5.6

Things i have done:
First of all i do not have internet connection in linux server where i have 
installed django


i am using python 3.6.8
django 1.11
 dependencies -> pytz
->sqlparse

then i started the server and it started.
installed python3-devel and mysql-devel from rhel repo

Then installed through pip3 install mysql-connector-python.whl
dependencies -> protobuf >=3.0.0
   ->six >=1.9

from setting.py
I configured the databases

tried to runserver
ERROR:mysqldb console

Now found no mysql client
thought install *mysql client 5.6* from os level but no luck

got mysql client 1.4.4 in pypi but all in windows os

googled and search many site but everywhere it is "pip install mysql 
client" but no internet.

Please help! As now the goal is change django from sqllite3 to mysql.


Thanks and Regards
Amit Samanta







-- 
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/bb37fac6-f9a7-4c1b-b563-a7557222b6a4%40googlegroups.com.


Installation of django

2019-08-20 Thread Amit Samanta
Hi,

I want to install django in linux server for python 2.7.2.
i am not able install django
Please help with the installation step for django in linux.


Thanks and Regards
Amit Samanta

-- 
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/1972eeeb-da5d-4146-94a6-5ba8551a92ea%40googlegroups.com.


Re: Job Request

2019-01-24 Thread amit pant
why all non IT and cs student be in IT and cs?

On Thu, Jan 24, 2019 at 11:28 PM RETAIL CYBER  wrote:

> They can I'll be looking for more jobs soon I'd personally if u get it
> learned I'd go-to Fiverr
>
> On Thu, Jan 24, 2019, 9:35 AM Motaz Hejaze 
>> Hi all ,
>>
>> Is there any remote job regarding Django , i am a beginner to mid-level
>> in Django ..
>>
>> Thanks all ..
>>
>> --
>> 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/CAHV4E-eipXC8kxPcWg%2BhOBeiL0jw3b82Sohv%3D-S5s9F%2BimvO_A%40mail.gmail.com
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
> --
> 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/CAGNKn_C_u7afXm0%3DGm66GwwoXS2USUXp9vzXHNasFrFhuumgKQ%40mail.gmail.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CAF2Ah_F-bUqzhfRzdJvxNLLYwamOSkuTV6Abw4YhYHT-U%3DKyFQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Foreign key data saving issue

2018-11-13 Thread amit pant
could you share your progress then we can find what exactly you want.


On Tue, Nov 13, 2018 at 6:14 PM mohit basantani <
mohitbasantani1...@gmail.com> wrote:

> Hello I am new to django i have two tables namely Mastertable and Partlist
>
> Partlist columns:
>
> 1. id
> 2. partlist_name
>
> I am using the imort-export plugin to import the data in the mastertable
> where i have created a foreign key referred to partlist table, I want
> whenever i import any xls file first data would save to the partlist table
> and i will get the id of the inserted row and then the data should be saved
> in the mastertable. Please 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/fd74c2ec-9969-493e-b0c9-2aa05f6f1cc2%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CAF2Ah_GKp4V9omg3sGWt3ucYv7SqEv_OokejB3QpqfEeZzA3RA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: using a foreign key with multiple choices

2018-11-13 Thread amit pant
use dict in  * LISTE_CHOIX.*

On Tue, Nov 13, 2018 at 6:14 PM 'Christian' via Django users <
django-users@googlegroups.com> wrote:

> Hello
>
> I need to use a model form to create a new instance of Recette,  using
> multiple choices list instead of the foreign_key
>
> *class Recette(models.Model):*
> *  ..*
> *categoriederecette = models.ForeignKey(Categorie,
> on_delete=models.CASCADE) *
>
> *class Categorie(models.Model):*
> *SOUPE = 'SP'*
> *DESSERTS ='DS'*
> *PLATUNIQUE ='PU'*
> *LISTE_CHOIX =  ((SOUPE,'Soupe'), (DESSERTS,'Desserts'),
> (PLATUNIQUE,'Plat unique'),)*
> *   .*
> *categorierecette = models.CharField(db_column='Categorierecette',
> max_length=15, choices=LISTE_CHOIX, blank=True, null=True)  # Field name
> made lowercase*
>
> I use a Modelform
> * : *
>
> *class RecettesForm(forms.ModelForm):*
> *categoriederecette = forms.ChoiceField(choices =
> Categorie.LISTE_CHOIX)*
>
> *class Meta:*
> *model = Recette*
> *fields = (..** ,'categoriederecette')*
>
>
> The form is displayed correctly,  but cannot be saved. In the test *if
> form.is_valid():*  I get a value error -
>
> * ValueError: Cannot assign "'SP'": "Recette.categoriederecette" must be a
> "Categorie" instance.*
>
> Any help would be greatly appreciated.
>
> --
> 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/524c62ab-2454-7746-ec6a-9c7daeed775d%40yahoo.fr
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CAF2Ah_E2UnvGgt2G%3DZ1ECc2wvnaWPH32da5h%2BXxZhsgtjprHpA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: I'm new in Django. please help me out

2018-11-13 Thread amit pant
 sometimes

On Tue, Nov 13, 2018 at 3:23 PM PASCUAL Eric  wrote:

> > hey, you need to pay for that.
>
>
> Seen quite frequently : some of the visitors of community groups such as
> this one confuse them with "do_my_job_for_free.com" or "do_my_homework.com"
> 
>
>
> Eric
> --
> *From:* django-users@googlegroups.com  on
> behalf of amit pant 
> *Sent:* Tuesday, November 13, 2018 10:27:13 AM
> *To:* django-users@googlegroups.com
> *Subject:* Re: I'm new in Django. please help me out
>
> hey, you need to pay for that.
>
> On Tue, Nov 13, 2018 at 2:55 PM  wrote:
>
> Hi All,
>
> can you please solve this.
>
> 1) Create a simple Category model using DRF with following fields :
> Id,name,parent,is_featured,image,is_active,description
> 2) Create CRUD APIs for the same.
> 3) Validate input at every event/API.
> 4) Implement ordering and filtering.
> 5) GET API should take params to return :
> Ex. /abc.com?params=id|name|is_featured
> <http://abc.com?params=id%7Cname%7Cis_featured> : this should return
> Array of JSON
> object with specified keys, along with an authenticated key mentioning user
> authentication status.
>
> Thanks
>
> --
> 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/dfdb2b20-66a3-4e56-b548-45c0f59a48ee%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/dfdb2b20-66a3-4e56-b548-45c0f59a48ee%40googlegroups.com?utm_medium=email_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>
> --
> 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/CAF2Ah_FcL0UEGVFhJBE_nCdCHXFTQyWbzmqPbPV5v13k04r_6A%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAF2Ah_FcL0UEGVFhJBE_nCdCHXFTQyWbzmqPbPV5v13k04r_6A%40mail.gmail.com?utm_medium=email_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>
> --
> 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/VI1P193MB043255EC430059412851527A8CC20%40VI1P193MB0432.EURP193.PROD.OUTLOOK.COM
> <https://groups.google.com/d/msgid/django-users/VI1P193MB043255EC430059412851527A8CC20%40VI1P193MB0432.EURP193.PROD.OUTLOOK.COM?utm_medium=email_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CAF2Ah_Et%3DhoYJnBVhzXCaHRO%2B_iyRS4x1-6vrPaOYPUGTxjS2Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: I'm new in Django. please help me out

2018-11-13 Thread amit pant
hey, you need to pay for that.

On Tue, Nov 13, 2018 at 2:55 PM  wrote:

> Hi All,
>
> can you please solve this.
>
> 1) Create a simple Category model using DRF with following fields :
> Id,name,parent,is_featured,image,is_active,description
> 2) Create CRUD APIs for the same.
> 3) Validate input at every event/API.
> 4) Implement ordering and filtering.
> 5) GET API should take params to return :
> Ex. /abc.com?params=id|name|is_featured
>  : this should return
> Array of JSON
> object with specified keys, along with an authenticated key mentioning user
> authentication status.
>
> Thanks
>
> --
> 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/dfdb2b20-66a3-4e56-b548-45c0f59a48ee%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CAF2Ah_FcL0UEGVFhJBE_nCdCHXFTQyWbzmqPbPV5v13k04r_6A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Why I can't pass anything to my html? Django 2.1

2018-11-12 Thread amit pant
you need to make dictionary for display variables using html

On Mon, Nov 12, 2018 at 6:57 PM Cuneyt Mertayak  wrote:

> vvv Typo: read "context" instead of "content" vvv
>
> On Monday, November 12, 2018 at 5:26:48 AM UTC-8, Cuneyt Mertayak wrote:
>>
>> The content for the `render` method is supposed to be a dictionary:
>> https://docs.djangoproject.com/en/2.1/topics/http/shortcuts/#optional-arguments
>>
>> So change it to this render(requset, "FrounterWeb/body.html",{'tank':
>> tank})
>>
>> Also in the template file you want to display the properties of the ORM
>> (tank_system) object I guess, change them to {{tank.EC}}, 
>> {{tank. temp}}, respectively.
>>
>> Hope it helps!
>>
>> On Monday, November 12, 2018 at 4:13:21 AM UTC-8, Rookies DJ wrote:
>>>
>>> I been trying 2 weeks on trying to pass variables form Django views into
>>> html, but every time I run my code, it works but it doesn't display the
>>> variable I see
>>>
>>> from django.shortcuts import render
>>> from zigview.models import tank_system
>>>
>>> def index(request):
>>> return render(request,'FrounterWeb/includes.html')
>>>
>>> def login(requset):
>>> return render(requset, 'FrounterWeb/login.html')
>>>
>>>
>>> def timedex(requset):
>>> tank = tank_system.object.get(id(5))
>>> print(tank)
>>> return render(requset, "FrounterWeb/body.html",tank)
>>>
>>>
>>> Here my models
>>>
>>> from django.db import models
>>>
>>>
>>> class user(models.Model):
>>> username = models.CharField(max_length=50)
>>> password = models.CharField(max_length=50)
>>>
>>>
>>> class tank_system(models.Model):
>>> Ph = models.DecimalField(max_digits=2, decimal_places=1)
>>> EC = models.DecimalField(max_digits=2, decimal_places=1)
>>> temp = models.DecimalField(max_digits=2, decimal_places=0)
>>> level = models.IntegerField(primary_key=True, default=0)
>>> data = models.DateTimeField(auto_now=True)
>>>
>>>
>>> Here my HTML that i try pass variable in
>>>
>>> 
>>> 
>>>   Time
>>>   Tank level
>>>   EC
>>>   pH
>>>   room temptures
>>>   Water temptrure
>>> 
>>> 
>>>   22.30
>>>   900 lits
>>>   {{tank}}
>>>   7.3
>>>   {{tank}}
>>>   24
>>> 
>>>
>>> 
>>>
>>>
>>> My HTML body structures
>>>
>>> Web
>>>
>>> ├── templates
>>> │   ├── index.hmtl
>>> │   │   └── includes
>>> │   ├── body.hml
>>> │   ├── header.html
>>>
>>>   This my urls files;
>>>
>>> from django.contrib import admin
>>> from django.urls import include, path
>>> from django.views.generic.base import TemplateView
>>>
>>> urlpatterns = [
>>> path(r'^admin/$', admin.site.urls),
>>> path('account', include('django.contrib.auth.urls')),
>>> path('', include('zigview.urls')),
>>> path(r'', TemplateView.as_view(template_name='index.html'), name = 
>>> 'myapp'),
>>> ]
>>>
>>> --
> 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/0ccdcf5d-1d90-41e4-be33-f3684dace2b1%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CAF2Ah_H%3DP7sJDXYPsg2SMiqVKUFe9cUFRkej%3DQ-rn_2XdkgSRQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Deploy django project using gunicorn

2018-11-12 Thread amit pant
check your models, might be there is some spelling error.
if you share your models.py file then we could do more help.

On Mon, Nov 12, 2018 at 8:28 PM Yohandy Chiaawanda 
wrote:

> Hello
>
> I am currently following this guide
> https://www.digitalocean.com/community/tutorials/how-to-set-up-django-with-postgres-nginx-and-gunicorn-on-ubuntu-16-04
> to set up django into digitalocean, and I kinda stuck at one point when I
> want to use gunicorn
> Whenever i type 'gunicorn --bind 0.0.0.0:8003 myproject.wsgi' ,there's
> always an ImportError showing up
> Here's the screenshot showing the error
> [image: error01.PNG]
> And here's the file __init__.py looks like
> [image: error02.PNG]
>
> Any suggestion and help is really appreciated
>
>
>
> --
> 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/a8e3098f-465e-4986-aca3-f4f196645423%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CAF2Ah_F%2BGR9F7WQVKtvEV7-R_v49HwAVOaeAkRggDjn-buRjzA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Re-Order rendering of input fields of django-contact-form?

2018-11-09 Thread amit pant
can we use clean method instead of __init__

On Mon 5 Nov, 2018, 4:47 PM Aashutosh Rathi, 
wrote:

> Yes, this works for me.
> Make sure
>
>
> super(AddLabForm, self).__init__(*args, **kwargs)
>fields_keyOrder = ['id', 'date', 'start_time', 'end_time']
>if 'keyOrder' in self.fields:
>self.fields.keyOrder = fields_keyOrder
>else:
>self.fields = OrderedDict((k, self.fields[k]) for k in
> fields_keyOrder)
>
>
>
>
> On Thursday, January 22, 2015 at 1:06:59 AM UTC+5:30, Tobias Dacoir wrote:
>>
>> It still complained about the request, but I was finally able to get it
>> to work using this code:
>> def __init__(self, request, *args, **kwargs):
>> super(CustomContactForm, self).__init__(request=request, *args,
>> **kwargs)
>> fields_keyOrder = ['name', 'reason', 'email', 'body']
>> if (self.fields.has_key('keyOrder')):
>> self.fields.keyOrder = fields_keyOrder
>> else:
>> self.fields = OrderedDict((k, self.fields[k]) for k in
>> fields_keyOrder)
>>
>>
>> However it still does not re-order the fields, I searched stackoverflow
>> again and found this for Django 1.7:
>> https://github.com/pennersr/django-allauth/issues/356#issuecomment-24758824
>> But it still does not work. The order doesn't change it all. sigh :(
>>
> --
> 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/67309700-3cfc-4199-a789-8bc8653b1022%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CAF2Ah_HQqXkmMectBBUJkwJdYZLfbe8Qr6FBqQKwPxJ2Ln6MWg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Migrating a flask app to Django

2018-11-05 Thread amit pant
According to my knowledge both are different framework so you need to
implement again.

On Sat 3 Nov, 2018, 6:09 PM oganga chantal,  wrote:

> Hi,
> i have a front end in django and the back end in flask.
> i need help in combining the two
>
> --
> 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/fdab12ff-0381-4179-97d9-e489838e47f3%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CAF2Ah_EXQrVoOQYtq4Sk788%3DS6Aw27tCqJbs4j9iUDmNfEpw7w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Cannot get Django test migrations to detect test models.py

2018-11-05 Thread amit pant
can you register your model in admin.py?
If not then go for it.

On Sun 4 Nov, 2018, 12:10 AM ,  wrote:

> Hi folks, I'm trying to build a test suite for a django plugin for a
> field. To test the field I need to have a test model, but since my django
> app does not provide models, and I have the model in the /tests/models.py
> it's not detecting the model when the test db migrations are applied. I saw
> some suggestions on stack overflow to add the test app to the
> INSTALLED_APPS in the test app, however that causes an
> django.core.exceptions.AppRegistryNotReady: Apps aren't loaded yet. error,
> which I imagine is caused by the tests app not being a full blown app.
> What's the proper solution for Django 2.0+ ? I'd prefer not to use the fake
> models solution as I plan to open source the module and want the field
> tested against a real db on Django 2.0 and 2.1.
>
> Source is here: https://gitlab.routh.io/open-source/django-bleachfields
>
> Test failures and attempted configurations can be seen in the CI pipeline
> and commit history.
>
> Hoping someone can lend their insights.
>
> --
> 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/d525bd73-0db8-4d17-b5b8-254461a9a533%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CAF2Ah_E4d96VrDsnamQ1DJk9tzBgFG7EgpH7RNsEjKm-B-vG9Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: problem in pattern matching in urls.py and redirecting to another page after few secs

2018-11-02 Thread amit pant
yes, you can use javascript and for url we need to see what you want to do.
Would be good if you provide screenshot.
Thanks


On Fri 2 Nov, 2018, 6:42 PM Manjunath,  wrote:

> you can easily use java script set_timeout method for redirection after
> certain time.
>
> Elaborate your second question. Provide relevant screenshots if possible.
>
> On Friday, November 2, 2018 at 5:11:40 PM UTC+5:30, praveen bhuvi wrote:
>>
>> Now my 1st problem is in views.py i have a function , now in that
>> function when certain condition is met i have to redirect to another page
>> after 10 sec or 20 sec.
>> my 2nd problem is i dont know how to set (or) match the pattern in
>> [application]/urls.py
>>
> --
> 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/e8b5803f-1b14-4523-ac0c-2cfc9508eca7%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CAF2Ah_GZN3ofsjOphKZ4%2B1YTpbiyBgbqOqZjxT1FhoGeX44ajg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


difference between id and pk

2018-11-02 Thread amit pant
I want to know, what is main difference between pk and id on django.
Would appreciate if any one could help me.
Thanks

-- 
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/d8f5be26-2319-4a81-82d0-97c5ddfcb048%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Error : MultiValueDictKeyError

2018-11-02 Thread amit pant
Anytime...

On Fri 2 Nov, 2018, 11:37 AM PRATEEK SHARMA,  wrote:

> Thanks a lot for your help, it works now
>
> On Fri, Nov 2, 2018, 10:01 AM amit pant 
>> hey,
>> you can use request.POST.get('username')
>>
>> --
>> 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/CAF2Ah_HdpoX7DysJyVvty0susfqA6%3DZPSHmxYW68ZW%2BBmyAotg%40mail.gmail.com
>> <https://groups.google.com/d/msgid/django-users/CAF2Ah_HdpoX7DysJyVvty0susfqA6%3DZPSHmxYW68ZW%2BBmyAotg%40mail.gmail.com?utm_medium=email_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
> --
> 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/CA%2B3Tvphjh%2BL-jDSmBZDktPoGt9oE3Xr45h8DASoiPACv0vEFOw%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CA%2B3Tvphjh%2BL-jDSmBZDktPoGt9oE3Xr45h8DASoiPACv0vEFOw%40mail.gmail.com?utm_medium=email_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CAF2Ah_ETtKVPwFiy2nH2gkDQ%3DHGHxXhXrb5mBjfQF%3DoN%2BF3YeQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: foreign key is not working

2018-11-01 Thread amit pant
i used all method which is on docs but still it's not working properly.
 i am using django 2 with pyhton 3


On Wed, Oct 31, 2018 at 5:28 PM Paras Patidar 
wrote:

> Use:
> on_delete = models.CASCADE
> In Foreign Key
>
> On Wed 31 Oct, 2018, 5:15 PM amit pant,  wrote:
>
>> i used foreign key for make relationship between two model class but it
>> does not work properly, i used this for make subscription and on first
>> model their is choices for subscription.
>> help me why it is not working
>>
>> --
>> 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/ccb94b40-2c2d-4202-bfb9-37459770b99a%40googlegroups.com
>> <https://groups.google.com/d/msgid/django-users/ccb94b40-2c2d-4202-bfb9-37459770b99a%40googlegroups.com?utm_medium=email_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
> --
> 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/CAK-hKekN4hsqHexxoWww2Y%3DzsJukwx2PfH02D%2B%3DAF_qqfYQYyg%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAK-hKekN4hsqHexxoWww2Y%3DzsJukwx2PfH02D%2B%3DAF_qqfYQYyg%40mail.gmail.com?utm_medium=email_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CAF2Ah_HxAmfDAVnJdFDRz548ouD-FiFOH7iXDKbCK%2Bh-C%2BKEOg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Error when I use python manage.py makemigrations polls

2018-11-01 Thread amit pant
It's seems you could not add app on settings.py INSTALLED APPS list.
you should firstly add there then you can do makemigrations


On Fri, Nov 2, 2018 at 6:57 AM ALLAN NJOROGE 
wrote:

> Hey, I am a newbie in Django and am trying to learn by following the
> official documentation, I am stuck on writing your first code part 2, I
> have followed every step but keeps getting this error when I use python
> manage.py makemigrations polls, below is my code attached, please 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/438e8bb9-f71f-4df2-936e-2444cf4b8e4f%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CAF2Ah_F4c%3DA%3DLre6Mn3MkNYT3eMhPJxWLO7waOagLuW6G5%3DyGQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Error : MultiValueDictKeyError

2018-11-01 Thread amit pant
hey,
you can use request.POST.get('username')

-- 
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/CAF2Ah_HdpoX7DysJyVvty0susfqA6%3DZPSHmxYW68ZW%2BBmyAotg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


foreign key is not working

2018-10-31 Thread amit pant
i used foreign key for make relationship between two model class but it 
does not work properly, i used this for make subscription and on first 
model their is choices for subscription.
help me why it is not working

-- 
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/ccb94b40-2c2d-4202-bfb9-37459770b99a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Administration with Django 2

2018-08-13 Thread Amit Malik
hey vinod , can you share your email?
i have some django work and i am looking to outsource it.

On Mon, Aug 13, 2018 at 3:57 PM, vinod.kumar via Django users <
django-users@googlegroups.com> wrote:

> you can create a superuser for django project. Django admin is too much
> flexible, you can write your own template, view , urls and much more,so
> you have to modify admin penal.
>
>
> On Friday, August 10, 2018 at 5:20:22 PM UTC+5:30, t.m...@icloud.com
> wrote:
>>
>> Hi,
>>
>> I want to add a administration at my django project, this admin part is
>> writen by me, not admin app.
>> I want to know the good method to build this, the god way is to create a
>> app admin with new views, model etc... or just create a other views in my
>> apps ? Blog, etc...
>>
>> Thx
>>
>
> 
>
> *This e-mail and all attachments are intended solely for use by the
> intended recipient and may contain confidential / proprietary information
> of KiwiTech, LLC, subject to important disclaimers and conditions including
> restrictions on the use, disclosure, transfer or export of such
> information.* *If you have received this message in error or are not the
> named recipient(s), please immediately notify the sender at the telephone
> number stated above or by reply e-mail and delete this e-mail from your
> computer*
>
> --
> 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/cda24d1c-f09f-4ff1-9e06-4f420368ec03%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/cda24d1c-f09f-4ff1-9e06-4f420368ec03%40googlegroups.com?utm_medium=email_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Amit Malik

-- 
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/CAEb2bytR55oVS%2B2MvSon70ah8b6Uvgh4z7ift924ZMjF-jOoVw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


app.yaml for simple django application for GCP

2018-05-13 Thread Amit kumar
Please help me with configuring my app.yaml for my a simple django app 
which i want to deploy on GCP.
Thanks
Regards
Amit Kumar

-- 
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/8350c47d-8aca-40c8-8b92-222cc5365355%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


How to fetch data from sql server and display on django web pages

2018-02-10 Thread Amit Kadivar
Please Help me.
How to fetch data from sql server and display them on django web pages 
through nginx web server..



-- 
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/b5577524-e67d-465f-bb49-e54bca92c88b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


'WSGIRequest' object is not callable error generate

2018-01-19 Thread Amit Kadivar
Hello..

I am making a signup page in django 2.0. generate the error " 'WSGIRequest' 
object is not callable ".
please give me a solution for that .
error show in following line 

return request(request,'signup.html',{'form':form})

-- 
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/9a822b59-f3cb-4024-955a-11c8e9ca8a9e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


SystemCheckError: (admin.E111)

2017-09-13 Thread Amit Mishra
Hey,

I am using python=  3.5 and
Django=  1.10.2

If I am running for the makemigrations --$  python3 manage.py 
makemigrations

OR 

Starting server --   $ python3 manage.py runserver 0.0.0.0:8000

Its returning errors for SystemCheckError

.../mydjangoproject# python3 manage.py makemigrations
SystemCheckError: System check identified some issues:

ERRORS:
: (admin.E111) The 
value of 'list_display_links[0]' refers to 'None', which is not defined in 
'list_display'.
: (admin.E111) The 
value of 'list_display_links[0]' refers to 'None', which is not defined in 
'list_display'.


And same errors for the runserver.

Please help How can I resolve this. 

-- 
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/a14ca186-079a-4cf3-808f-f8442b6353bf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


multiple file upload from image filed in django admin

2017-02-04 Thread Amit Pathak
Hi Guys,

I have to upload multiple images from single ImageField and i have tried 
everything however i am able to select only single image .

Please help how can i do this?

Thanks in advance 

-- 
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/2a0b425b-bba2-4a1f-a279-98e645e5f862%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Alternatives to Django REST Framework

2015-04-09 Thread Amit Prahesh
Hi,

while Django REST Framework seems wonderful to me, it is a heayweight
option for a little project of mine. I wonder if there are simpler
alternatives for publishing a simple API?

TIA,
AP.

-- 
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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAEH4rCRLGSjfi1G1ToKSPwcAUmsa38vyxp5s%3DnzDgbNqAg4Z1w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Should I use any ecommerce Django package for a Price Alert Website?

2014-06-24 Thread amit barik


I am trying to build a price tracking/alert website (like 
https://hukkster.com ). This website is not entirely a ecommerce website. 
Because there are so many Django ecommerce packages (like Oscar) out there, 
I was wondering if I should use one of them or just develop one inhouse?

My requirements are simple:

   - User can track the price of products from other ecommerce sites (like 
   amazon, ebay).
   - User will get notified when price drops a certain threshold
   - User will have an account
   - User can view all of its own tagged products and also view the top 
   tags (like top hukks in hukkster).

Before I try to reinvent the wheel here, I would like to know which (if 
any) Django package(s) will support my requirements?

Thanks,

Amit

-- 
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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/d155b09b-55d7-455c-82e5-3c1150b80293%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Django Model Primary Key help please...

2014-01-22 Thread Amit Masaun
Hi,

I am trying to port over something to Django/Postgresql that I built on 
Asp.Net/MSSQL and I was hoping someone could give me some direction on 
manual creation of Primary Key key columns in Django models.  What I would 
like is to have a BIGINT Primary Key value that is unique across all my 
models (which is what I am currently doing in Microsoft stack).  I have 
been researching for the last day and I dont see obvious pattern anywhere. 
 The closest thing I have found to what I need is django-ticketing:

https://github.com/streeter/django-ticketing

Unfortuantely it is very MySql-centric.

Are there any "best practices" for generating bigint primary keys which are 
unique accross multiple models? 

Thank you very much in advance.

--Amit

-- 
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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/00652711-4efa-4064-9423-086c32dab2f5%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: implement gmail type address adding functionality in django

2013-08-05 Thread Amit Yadav
I think what you are looking for is named as AUTOCOMPLETE.
You can search jquery-ui autocomplete

On Monday, August 5, 2013 3:42:05 PM UTC+5:30, roopas...@gmail.com wrote:
>
> Hi,
>
>   What is the name of that technology i want to search in google.
>
> Cheers!
>
>
> On Monday, August 5, 2013 3:29:21 PM UTC+5:30, JirkaV wrote:
>>
>> (not on a PC now)
>>
>> You're looking for quite common functionality - search you favourite 
>> search engine for combination of Django, Ajax and "typeahead"
>>
>> HTH
>>
>> Jirka
>> --
>> *From: * roopas...@gmail.com 
>> *Sender: * django...@googlegroups.com 
>> *Date: *Mon, 5 Aug 2013 00:50:06 -0700 (PDT)
>> *To: *
>> *ReplyTo: * django...@googlegroups.com 
>> *Subject: *implement gmail type address adding functionality in django
>>
>> I want to implement the functionality available for adding email address 
>> in gmail in my application.
>>
>> In gmail,in compose mail if we type the 1st character of the email 
>> address,it will show the list of suggested email address.The same concept,i 
>> want to implement in django for contact name.The list of names are saved in 
>> database,so typing any letter of the name,it should show the list of 
>> suggested names and from that user can select the name.
>>
>> I need some post or blog to get an idea to do this.
>>
>>
>> Cheers!
>>
>> Roopa 
>>
>> -- 
>> 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 post to this group, send email to django...@googlegroups.com.
>> Visit this group at http://groups.google.com/group/django-users.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>  
>>  
>>
>

-- 
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 http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.




ANNOUNCE: importd 0.2.0 released

2013-08-05 Thread Amit Upadhyay
Hello everyone,

I am pleased to announce I have released 0.2.0 of importd. 

Documentation: http://pythonhosted.org/importd/.

ChangeLog <https://github.com/amitu/importd/blob/master/ChangeLog.rst>:

   - BACKWARD INCOMPATIBLE: remove atexit magic, d.main() is the replacement
   - gunicorn cleanly exits now
   - tests, support django 1.4.3 and 1.5.1 for each of python 2.6, 2.7 and 
   3.3
   - less magic, no more sys.modules tweaking
   - runserver now reloads when any file changes
   - added auto generated MANIFEST.in (using check-manifest)
   - added support for mounting urls to custom locations
   
Feedback appreciated,

Thanks

-- 
Amit Upadhyay
amitu.com [+1 (408) 464-8800]

-- 
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 http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.




Re: how to render data coming from server to template using ajax!

2013-02-10 Thread Amit
Hi,

Javascript does not understand django template syntax. In your case you can 
return a template rendered with django, and replace the html.

Thannks,

On Sunday, February 10, 2013 3:12:47 PM UTC+5:30, doniyor wrote:
>
> hey guys, i am stuck in this problem. i posted the problem on 
> stackoverflow.com also, 
> http://stackoverflow.com/questions/14787772/sorting-queryset-of-search-result-and-render-back-thru-ajax
>
> but till now no one could answer there, so i am asking here again. anyone 
> can 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 http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Auth app in separate database

2012-03-28 Thread Amit
While running syncdb command django uses default database to create
tables.
You can do one thing, first create default database using syncdb then
copy auth related tables to another database.
Then define router for auth. You can get more ref form django
documentatiion.

Regards,
Amit

On Mar 29, 4:08 am, Chris <crflei...@gmail.com> wrote:
> Has anyone been successful in putting the auth application in a
> separate database so that users can be shared with different django
> projects?
>
> When I try to put the auth application in a different database I get
> an error with syncdb:
>
> django.db.utils.DatabaseError: relation "auth_permission" does not
> exist
> LINE 1: ...ntent_type_id", "auth_permission"."codename" FROM
> "auth_perm...

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Tweepy Status Error

2012-03-26 Thread Amit
In the example given in doc of tweepy, the process_status is a user
defined method. You have to define this method.
Its just a reference given. Define a method process_status and do
whatever you want to do with status.



On Mar 26, 3:57 am, coded kid  wrote:
> Hi guys, I been trying to iterate over status, but I’m getting this
> error:
>
> Traceback :
>      File “”, line 2, in 
> NameError: name ‘process_status’ is not defined.
>
> Below is the codes:
>
> from tweepy import Cursor
> for status in Cursor(api.user_timeline).items():
>     process_status(status)
>
> What I’m I doing wrong? Thanks!

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: twitter timeline

2012-03-22 Thread Amit
Hi Randa,

I have used tweepy. Its easy to use.
doc link: http://packages.python.org/tweepy/html/

On Mar 21, 7:00 pm, Randa Hisham  wrote:
> hey
> iam going to make an app that read the timeline of a user from twitter what
> django package do you recommend?
>
> --
> Randa Hesham
> Software Developer
>
> Twitter:@ro0oraa 
> FaceBook:Randa Hisham 
>
> ٍ

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Is it worth refactoring a version 2 of django app to use reusable app

2012-03-05 Thread Amit Sethi
Hi all, My question is very simple , Is it worth refactoring an
existing and running app  for its version 2 , such that it uses
reusable apps. Also is there a nice blog post on the benefits of
reusable apps

-- 
A-M-I-T S|S

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



How does the multiple database concept work after django 1.2

2012-03-02 Thread Amit Sethi
Hi all , My app has started breaking after moving to django 1.3 . I
don't really understand why?

I am working  using site framework and given model definition through
app_label. The only majot change as I can see is that I use UUID
Fields rather than AutoField. Now somehow i see that my app is trying
to make a connection to some other db essentially.

ConnectionDoesNotExist: The connection myapp doesn't exist

myapp here is one of applications in my site famework and the model
definations are given as


myapp/
 __init__.py
 Circle.py
 Sqaure.py

where Circle and Square are the different models ... Can someone tell
me how this came out ...

I checked again by moving the back to 1.1 and it works like a charm
... Interesting while I have given defination of one more database in
my settings ... I am not actually using it anywhere as yet...


Thanks
Amit




-- 
A-M-I-T S|S

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Taking a sample mysql dump

2012-01-05 Thread Amit Sethi
Is there a way one could take the dump of just a few sample fields using
mysqldump or some other similar tool. ?? Such that you can use it similar
to fixture data

-- 
A-M-I-T S|S

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Integrating facebook canvas with django

2011-10-21 Thread Amit Sethi
Hi all , I have to integrate a few django apps with facebook without
having to do a major code change on the django apps side.

One of the things that I need is to do is to replace django's user
backend such that it uses the facebook authentication mechanism .But
at same time be able to use other third party django plugins . What
would be an effective way to do that such that third party django apps
can be integrated without changing any code.





-- 
A-M-I-T S|S

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Facebook csrf middleware problem

2011-09-28 Thread Amit Sethi
Hi all , I am writing that shall be a facebook canvas app as well as a
standard app at the same time. Now for the time being I am just
working with removing csrf from my middleware classes but does anyone
know about a project that handles this more effectively such that i
can use csrf middleware for my standard app and exempts it when
request comes from facebook

-- 
A-M-I-T S|S

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



circular dependency in models.py

2011-09-26 Thread Amit Sethi
I think the solution to this might actually be very simple . I have an
app stories that looks something like this at the moment . It is in
the same file ideally i would like if both of them were related by
foreignkey but that is not possible because they are in same file and
there are declaration issues(NameError).

class Story(models.Model):
"""Story model."""

author = models.ForeignKey(User, blank=True, null=True)
title = models.TextField(_('title'), )


class Vote(models.Model):
"""
A vote on an story by a User.
"""
user = models.ForeignKey(User)
story = models.ForeignKey(Story)
votes = models.SmallIntegerField(default=0)

if i make a foreignkey in story , I have to write a very complicated
query to ensure no user can vote twice.  In case I keep it in vote its
incredibly complicated to write a query to get the score for a story
and order stories by vote what should i do .


Thanks
Amit

-- 
A-M-I-T S|S

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Workflow for a django based facebook canvas app

2011-09-23 Thread Amit Sethi
Well a very common workflow for writing views in django is to do
something like this

if request.method == 'POST':
   do some form related stuff
else :
  do some other stuff


But for a facebook canvas app all requests are POST , how can I change
my workflow such that my app works for both facebook canvas and as a
normal app with out any major change to my code.


-- 
A-M-I-T S|S

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Delegating a async job from a django view

2011-08-25 Thread Amit Sethi
What is the best solution for delegating a long time taking job from a
django view. Basically i wish to query a few web api , analyze and
then create a report . The report is not to be created in a sync
manner and can be sent at a later time . But it will have a web
interface to decide a few factors . I somehow think that twisted can
be used for this but I am not sure how one can use twisted with django
. Are there any other solutions that i can use for this problem .

Thanks
Amit

-- 
A-M-I-T S|S

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Handling Efficiency issues

2011-07-13 Thread Amit Sethi
Hi all for some reason i am doing something like this
 for i in Message.objects.all():
i.read_at = datetime.now()
i.save()

now the number of Message instances are likely to increase by a lot
with time . My question is is it likely that this code piece will
become very slow over time. If yes how can handle this more
efficiently

-- 
A-M-I-T S|S

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Efficiently querying db

2011-07-13 Thread Amit Sethi
I have a db that looks something like  this .

{ message : xyz
 parent : 23
 id : 25
}
 or
{ message : abc
parent : None
id : 25
}

{ message : cde
parent : 28
id : 32
}

{ message : lbq
parent : 23
id : 35
}

I want to make seperate the lists such that messages in same thread(
The parent message and its child messages } come together . What is
the best way to query the db or a efficient algorithm to do this.


-- 
A-M-I-T S|S

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Integrity Error with generic relation using ContentType

2011-06-14 Thread Amit Sethi
On Tue, Jun 14, 2011 at 8:00 PM, christian.posta
 wrote:
> Yes, it is. Any reason why you want the content-types to be part of
> your fixtures? Why not let django build that up by itself?
>
Well essentially it was just a dumpdata from earlier that is being
used. But why should I not have it as part of fixtures ?


-- 
A-M-I-T S|S

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Integrity Error with generic relation using ContentType

2011-06-14 Thread Amit Sethi
On Tue, Jun 14, 2011 at 1:41 AM, christian.posta
 wrote:
> Are you using your own fixtures (like initial_data.json)?
> Is it possible that in your initial_data.json ( or whatever fixture
> you're using) that you're including entries into the content_types
[..]

Well i do have entries of the kind this :
 {
"pk": 47,
"model": "contenttypes.contenttype",
"fields": {
"model": "user",
"name": "user",
"app_label": "auth"
}
},

Are these what you are referring to ..

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Integrity Error with generic relation using ContentType

2011-06-13 Thread Amit Sethi
Hi all , I am trying to introduce some messaging capability in my app.
I tried to create a generic relation between some part of my messaging
app and a model in one of my previous apps. However when fixtures load
I get this error. I am not able to make head and tail of this . What
is happening can some explain to me

IntegrityError: duplicate key value violates unique constraint
"django_content_type_app_label_key"

Also what is the possible solution .


-- 
A-M-I-T S|S

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Reasons to use managers

2011-06-03 Thread Amit Sethi
> functionality to your models. (For "row-level" functionality -- i.e.,
> functions that act on a single instance of a model object -- use Model
> methods, not custom Manager methods.)
>

But what is the benefit of model methods compared to adding an extra
field and getting almost the same thing done

-- 
A-M-I-T S|S

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Reasons to use managers

2011-06-02 Thread Amit Sethi
Hi all , I have a situation in which i am contemplating using an extra
field although the same thing can be done using a manager(although the
function may take some time). In this situation normalization isn't
actually a priority. Are there some other reasons to use a manager.
Also what would be the difference in terms of efficiency.

-- 
A-M-I-T S|S

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Regarding Django Applicaiton

2011-05-28 Thread Amit Pal
Thanks for quick reply..

It's very important to me

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Regarding Django Applicaiton

2011-05-28 Thread Amit Pal
Hello,

I am Amit Pal , a undergrduate studentI need your help . I am new
at Django and just run the first application on my workstation.

I have to make a django applicaiton i.e.

TO build a website which shows the IP location (geoip) on Google
map I need your help very urgently ..

Waiting for your all response :)

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Slightly cryptic debug message

2011-05-26 Thread Amit Sethi
Well for example :

"""
Exception Type: TemplateSyntaxError
Exception Value:
Caught NameError while rendering: global name 'approved' is not defined

"""

I don't understand if it is a NameError why should django say
TemplateSyntax error when exception value it says it got caught a
NameError

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Slightly cryptic debug message

2011-05-26 Thread Amit Sethi
Hi all , I have a question , On the the new versions of django (after
1.2) a lot of syntax errors and other errors come as Templatesyntax
errors instead .. . Shouldn't django try to give more compatible debug
message.
-- 
A-M-I-T S|S

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: South migration for fixtures

2011-05-26 Thread Amit Sethi
And what process should be followed in production and for other collaborators.


-- 
A-M-I-T S|S

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



South migration for fixtures

2011-05-25 Thread Amit Sethi
Hi all , I might be wrong with some of the concepts as I am new to
south. I am using south to migrate some fixture data for a django app.
Also something worth noting is I am bringing south new into the django
app it was not part of installed apps till now . So the workflow I
have followed till now is

run syncdb to install south
create a fake initial migration using convert_to_south command
create the actual schema migration script for my app using --auto
create a data migration script with a forward function for the added field

run python manage.py migrate myapp

Now obviously I get an error related to fixtures not getting installed
. Because I haven't actually changed the data on my fixtures how can I
do that(Also when should I do that) . My confusion also is that if I
dump data now to create new fixtures I will be creating trouble for my
collaborators since when they run syncdb to install south
in the end of syncdb when fixtures are installed they will
have problems because of the change in fixtures ??

-- 
A-M-I-T S|S

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: form being deleted from base.html

2011-05-24 Thread Amit Sethi
Hi all sorry it was an issue with my html.

-- 
A-M-I-T S|S

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: GET/POST

2011-05-24 Thread Amit Sethi
I think this is csrfmiddleware issue . Just add {% csrf_token %} like this
 {% csrf_token %}


-- 
A-M-I-T S|S

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



form being deleted from base.html

2011-05-24 Thread Amit Sethi
Hi all , I am not able to understand this but it seems while extending
the base template removes form tag. Is this possible in some scenario.
This is the only explanation I am able to come up with for the
behavior I am seeing in my app.

-- 
A-M-I-T S|S

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



sqlite3 and south data migration

2011-04-27 Thread Amit Sethi
Hi all does sqlite3  not support data migration. I am trying to
implement migration on my test fixtures using
south however i get this particular error :

AttributeError: 'DatabaseFeatures' object has no attribute
'supports_tablespaces'

-- 
A-M-I-T S|S

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Urgent Requirement: - Python Developer // 9 months // San Jose, CA

2011-04-11 Thread Amit Reks
Hello,



Greetings!!!



We have an opening for a *Python Developer* in San Jose, CA.



We would highly appreciate it if you could recommend someone for it, in case
you are not interested...



Please find the job description below.



*Job Title: Python Developer*

*Job Location: San Jose, CA*

*Duration: 9 months (Extendible)
Position Type: Contract*



*Job Description*

 - Experience with Python

-  Experience with Django

If this project does not match your exact skills perhaps you know of someone
with the necessary experience and availability; if so, please feel free to
forward this e-mail at your discretion.

If you are available and interested, please do send me a word copy of resume
along with following details:

IT Experience: in years

Python:

Django:
Billing Hourly Rate__
Earliest availability for the assignment :
Earliest availability for the Interview :
Current location :
Preferred contact number :

Best time to reach you:

Work Authorization: Citizen/Green Card/EAD/H1b/TN Visa



Thanks & Regards,



*Amit |* Intelliswift Software Inc * |*
2201 Walnut Avenue, #180, Fremont, CA 94538*|* Phone: 510 870 8644  *|*
Fax: 510-578-7710  *| *www.intelliswift.com

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



[ANN] fhurl release 0.1.1

2011-03-28 Thread Amit Upadhyay
http://packages.python.org/fhurl/

This is a generic view for form handling. First release.

Feedback and comments appreciated.

-- 
Amit Upadhyay
+91-9820-295-512

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Django URL Detail

2011-02-07 Thread Amit

Hello,
In my Django application (basically handover to me), I am hitting the
Web-Server with some http request which bring me data. I would come to
know about the complete URL;

  http://domain_name/address

In order to get problem thoroughly one should visit:

http://stackoverflow.com/questions/4921331/django-url-detail



Please get me rid of this.
Thanks in advance!


Amit.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Use development server database with production server

2011-02-05 Thread Amit

Hello,
First of all one should go through with below link;

http://stackoverflow.com/questions/4887851/django-database-settings-for-production-server


Now, let come up with my hurdle. I am using a database lay out in
filesystem(windows) say;
C:/miami/data.db

I have to use same database with production server, since I don’t have
avail corresponding database in PostGreSQL.





Amit.


-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Model super class with overriding save method

2010-05-30 Thread Amit Prahesh
Hi,

because of hysterical raisins I need that the models of a simple app I
was tasked upon have their primary fields to consist of strings of
randomly generated characters (think something like
'876nce8yr85yndxw45') of a given length. I'm trying to create a super
class that provides this facility, so that the actual models derive
from it. I came up with

class CustomModel(models.Model):
id = models.CharField(max_length=12 primary_key=True)

class Meta:
abstract = True

def save(self, force_insert=False, force_update=False):
if not self.id:
try:
while True:
id = random_identifier()
self.__class__.objects.get(pk=id)
except self.__class__.DoesNotExist:
self.id = id
models.Model.save(self, force_insert, force_update)

apart for a window of collisions on clusters, is there a better way to
accomplish this? Ideas?

Thanks a lot,
Amit.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



field specific error message

2010-03-12 Thread Amit Sethi
How do you do field specific messages ... like for  a Telephone Number , if
all characters are not digit send
message (no invalid )  . I have tried raising forms.ValidationError like
specified here (http://www.djangosnippets.org/snippets/337/)

I have also tried changing forms.Form._errors ... it is this string that
seems to be used
by forms.Form._html_output to put errors in final html .. but still it does
not work for me can some one tell me how to do the above specified thing


-- 
A-M-I-T S|S

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Text Search using Python

2010-01-14 Thread Amit Sethi
Hi , I have  a project with a few static html pages , I wish to search these
static html using a django search app . Most of the tutorials I saw are
focused on searching django models but none I could see concentrates on
indexing static html pages . Can some one guide be to a library /tutorial
etc for searching and indexing static pages in a project .

-- 
A-M-I-T S|S
-- 

You received this message because you are subscribed to the Google Groups "Django users" group.

To post to this group, send email to django-us...@googlegroups.com.

To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/django-users?hl=en.



Possibility of recursive rendering

2010-01-10 Thread Amit Sethi
Hi I wish  to know if it is possible to use recursive rendering ? . What I
mean by that is that their is a template which renders no of comments on a
paragraph . SInce their are many paragraphs what i wish to send is  a list
of render_to_response calls for each paragraph. i.e send response messages
from a loop etc ...

-- 
A-M-I-T S|S
-- 

You received this message because you are subscribed to the Google Groups "Django users" group.

To post to this group, send email to django-us...@googlegroups.com.

To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/django-users?hl=en.



Using django only for request handling work

2009-12-27 Thread Amit Sethi
Hi ,I have a project that is in general written to work with wsgi server
except i wish to alter some of the environ variables provided to the app. So
I have a function:

def __call__(self, environ, start_response):   In this I want to change some
part of environ 

So my application looks something like this


apache server --->> django to do url handling and changing environ  --->>
the actual app

This is my initial brainstorm . I really don't understand if it is possible
to do this . How do I create the same kind of interface like apache or any
other server i.e environ and start_response to be sent to the app???

-- 
A-M-I-T S|S

--

You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.




Help with apache mod rewrite engine

2009-12-08 Thread Amit Sethi
Hi all , I need some help understanding the mod rewrite module of apache .
What I wished to do want that i had a comments folder by the name of
/comments/ . Now i run a django project on /sees and i want all the call to
/comments/ be redirected to /sees/comments and than be handled by the wsgi
file but the rewriting is not happening is it possible to rewrite url and
than route it through wsgi script

-- 
A-M-I-T S|S

--

You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.




modwsgi on suburl

2009-11-25 Thread Amit Sethi
Hi , can somebody tell me how i should configure mod_wsgi on a suburl I want
to set a django project on

domain.com/test/

so my urls.py at present looks like :

urlpatterns = patterns('',
 (r'^(.*)', 'sttp.views.serve'),)

and the wgi scrip alias is WSGIScriptAlias /test
/home/amit/sttp-project/django.wsgi


-- 
A-M-I-T S|S

--

You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.




how to import a library in only in django project

2009-11-25 Thread Amit Sethi
Hi ,
I want to use a library in a django project but I don't want to put it in
python path. Where am I supposed to put the sys.append so that it will
available to the whole django project.
-- 
A-M-I-T S|S

--

You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.




  1   2   3   >