Re: Django-Photologue - error deleting a photo

2019-02-11 Thread Victor H. Velasquez Rizo
Yes Mike.
I have done both:

*python manage.py makemigrations*
/home/vic/dev/scribblitt/scribblitt-app/.env/local/lib/python2.7/site-packages/django/db/models/sql/query.py:1156:
RemovedInDjango19Warning: Passing callable argumentsto queryset is
deprecated.
  value, lookups, used_joins = self.prepare_lookup_value(value, lookups,
can_reuse,allow_joins)

*No changes detected*

*python manage.py migrate*
/home/vic/dev/scribblitt/scribblitt-app/.env/local/lib/python2.7/site-packages/django/db/models/sql/query.py:1156:
RemovedInDjango19Warning: Passing callable argumentsto queryset is
deprecated.
  value, lookups, used_joins = self.prepare_lookup_value(value, lookups,
can_reuse,allow_joins)

Operations to perform:
  Synchronize unmigrated apps: anymail, filebrowser, staticfiles,
admindocs, model_utils, tinymce, messages, widget_tweaks, sitemaps,
humanize, django_extensions, rest_framework, storages, debug_toolbar,
admin_reorder
  Apply all migrations: invoices, general, chunks, makeaword, accounts,
images, comic, orders, illustrate, pressroom, sites, write, contenttypes,
book, thumbnail, django_comments, tellinstories, sessions, cart, auth,
definition, admin, gift_cards, photologue, wordsearch, stationary
Synchronizing apps without migrations:
  Creating tables...
Running deferred SQL...
  Installing custom SQL...
*Running migrations:*
*  No migrations to apply.*







On Mon, Feb 11, 2019 at 5:42 PM Mike Dewhirst  wrote:

> On 12/02/2019 10:23 am, Victor H. Velasquez Rizo wrote:
> > Hello Mike.
> > I have ran the migrations for PHOLOGUE:
> > *Running migrations:*
> > *  No migrations to apply.*
> >
>
> Ok, have you done manage.py makemigrations followed by manage.py migrate?
>
> >
> >
> >
> >
> >
> >
> > On Mon, Feb 11, 2019 at 4:02 PM Mike Dewhirst  > <mailto:mi...@dewhirst.com.au>> wrote:
> >
> > On 12/02/2019 4:31 am, victor rizo wrote:
> >> Hello everyone.
> >>
> >> I am desperate trying to find a solution for this issue...
> >>
> >>
> >>   ProgrammingError at /admin/photologue/photo/
> >>
> >> column photologue_gallery_photos.sort_value does not exist
> >
> > This says the column "sort_value" does not exist in the table
> > "gallery_photos".
> >
> > Column is database-speak for a model field. Your software thinks
> > the column exists therefore it is a programming error. My best
> > guess is that you need to do a migration.
> >
> > https://docs.djangoproject.com/en/1.11/topics/migrations/
> >
> > Cheers
> >
> > Mike
> >
> >
> >> LINE 1: ...lery_id", "photologue_gallery_photos"."photo_id",
> >> "photologu...
> >>
> >> It is happening every time I try to delete a photo from
> >> *admin/photologue/photo.*
> >> *
> >> *
> >> *Any help you can provided?*
> >> *
> >> *
> >> *Thank you 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
> >> <mailto:django-users+unsubscr...@googlegroups.com>.
> >> To post to this group, send email to
> >> django-users@googlegroups.com <mailto: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/86a16f8d-1680-4418-9f00-d9eb41312dd7%40googlegroups.com
> >> <
> https://groups.google.com/d/msgid/django-users/86a16f8d-1680-4418-9f00-d9eb41312dd7%40googlegroups.com?utm_medium=email&utm_source=footer
> >.
> >> For more options, visit https://groups.google.com/d/optout.
> >
> >
> >
> > --
> >
> >
> >
> > Atte...,.
> > Vìctor Hugo Velàsquez Rizo
> > Cali - Colombia
>
> --
> 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.

Re: Django-Photologue - error deleting a photo

2019-02-11 Thread Victor H. Velasquez Rizo
Hello mike.
Thank you for all this information.

I've been checking the migrations but I don't see anything with the
*sort_value*

Photologue <http://127.0.0.1:8000/admin/photologue/>
Galleries Add Change
Photo effects Add Change
Photo sizes Add Change
Photos Add Change
Watermarks

When I get into Photos, I see the whole list of pictures that has been
created, but once I *delete selected items, *the error comes up.

Select photo to change

   - Add photo <http://127.0.0.1:8000/admin/photologue/photo/add/>
   - Upload a zip archive
   <http://127.0.0.1:8000/admin/photologue/photo/upload_zip/>

[image: Search]

Action:  - Delete selected photos  Go 0 of 10 selected
Title <http://127.0.0.1:8000/admin/photologue/photo/?o=1.-3>
Date taken <http://127.0.0.1:8000/admin/photologue/photo/?o=2.-3>
<http://127.0.0.1:8000/admin/photologue/photo/?o=>
<http://127.0.0.1:8000/admin/photologue/photo/?o=3>
Date added <http://127.0.0.1:8000/admin/photologue/photo/?o=3>
Is public <http://127.0.0.1:8000/admin/photologue/photo/?o=4.-3>
View count <http://127.0.0.1:8000/admin/photologue/photo/?o=5.-3>
Thumbnail
Paris <http://127.0.0.1:8000/admin/photologue/photo/215/> (None) Feb. 11,
2019, 10:02 p.m. [image: True] 0
<http://127.0.0.1:8000/photologue/photo/paris/>
VICTOR <http://127.0.0.1:8000/admin/photologue/photo/214/> (None) Jan. 21,
2019, 11:50 a.m. [image: True] 0
<http://127.0.0.1:8000/photologue/photo/victor/>





















On Mon, Feb 11, 2019 at 8:23 PM Mike Dewhirst  wrote:

> On 12/02/2019 11:47 am, Victor H. Velasquez Rizo wrote:
> > Yes Mike.
> > I have done both:
>
> In that case, you need to inspect the database itself using PGAdmin (or
> similar for other databases) and confirm that the gallery_photos table
> does indeed have a sort_value column.
>
> If not - as the error message says - then the database might have been
> rebuilt from a dump taken prior the migration which added sort_value. Or
> perhaps restored from an earlier backup. In any case, if it doesn't
> exist you have to make it exist.
>
> I'm assuming this is a development database not in production so one way
> is to cheat.  If anyone else reading this notices a mistake please jump
> in and correct it.
>
> Look through the migrations and find the one which first added
> sort_value. Delete the migrations.AddField() call for sort_value from
> that migration. Look for any mentions of sort_value in other migrations
> and get rid of them too. There will also be an AlterTable or Options
> line referring to sort_value which needs to have sort_value removed.
>
> That will trick the migration system into thinking it doesn't exist. The
> next time you run makemigrations it will discover a new field sort_value
> and add it.
>
> There is a potential problem here. If migrations from other apps depend
> on sort_value things may come unstuck. However, it is a good bet that
> sort_value was added to adjust a display sequence and won't have wider
> impact.
>
> This is tricky territory so you should do nothing until you have dumped
> your database and proved you can restore it. Keep your dump as a
> pre-sort_value backup.
>
> Go carefully
>
> Good luck
>
> Mike
>
> >
> > *python manage.py makemigrations*
> >
> /home/vic/dev/scribblitt/scribblitt-app/.env/local/lib/python2.7/site-packages/django/db/models/sql/query.py:1156:
>
> > RemovedInDjango19Warning: Passing callable argumentsto queryset is
> > deprecated.
> >   value, lookups, used_joins = self.prepare_lookup_value(value,
> > lookups, can_reuse,allow_joins)
> >
> > *No changes detected*
> >
> > *python manage.py migrate*
> >
> /home/vic/dev/scribblitt/scribblitt-app/.env/local/lib/python2.7/site-packages/django/db/models/sql/query.py:1156:
>
> > RemovedInDjango19Warning: Passing callable argumentsto queryset is
> > deprecated.
> >   value, lookups, used_joins = self.prepare_lookup_value(value,
> > lookups, can_reuse,allow_joins)
> >
> > Operations to perform:
> >   Synchronize unmigrated apps: anymail, filebrowser, staticfiles,
> > admindocs, model_utils, tinymce, messages, widget_tweaks, sitemaps,
> > humanize, django_extensions, rest_framework, storages, debug_toolbar,
> > admin_reorder
> >   Apply all migrations: invoices, general, chunks, makeaword,
> > accounts, images, comic, orders, illustrate, pressroom, sites, write,
> > contenttypes, book, thumbnail, django_comments, tellinstories,
> > sessions, cart, auth, definition, admin, gift_cards, photologue,
> > wordsearch, stationary
> > Synchronizing apps without migrations:
> >   Creating tables...
> > Ru

Re: Django-Photologue - error deleting a photo

2019-02-11 Thread Victor H. Velasquez Rizo
Hi Mike.
I have spend hours trying to get the code where all this crazyness is
happening with no good luck.
I would like to ask you if there is any posibility you can access my
computer trhoug TEAMVIWER and guide me on this.

On Mon, Feb 11, 2019 at 9:40 PM Mike Dewhirst  wrote:

> On 12/02/2019 2:19 pm, Victor H. Velasquez Rizo wrote:
> > Hello mike.
> > Thank you for all this information.
> >
> > I've been checking the migrations but I don't see anything with the
> > *sort_value*
>
> In that case you have asked for gallery_photos.sort_value somewhere in
> your code and that is being interpreted by the Admin as a field and
> because it doesn't exist is calling it a programming error.
>
> Certainly easier to find/fix than cheating migrations!
>
> Cheers
>
> Mike
>
> >
> > Photologue <http://127.0.0.1:8000/admin/photologue/>Galleries
>  Add
> > Change
> > Photo effects Add Change
> > Photo sizes   Add Change
> > PhotosAdd Change
> > Watermarks
> >
> >
> > When I get into Photos, I see the whole list of pictures that has been
> > created, but once I *delete selected items, *the error comes up.
> >
> >
> >   Select photo to change
> >
> >   * Add photo <http://127.0.0.1:8000/admin/photologue/photo/add/>
> >   * Upload a zip archive
> > <http://127.0.0.1:8000/admin/photologue/photo/upload_zip/>
> >
> > Search
> >
> >
> >
> > Action: Go 0 of 10 selected
> >
> > Title <http://127.0.0.1:8000/admin/photologue/photo/?o=1.-3>
> >
> > Date taken <http://127.0.0.1:8000/admin/photologue/photo/?o=2.-3>
> >
> > Date added <http://127.0.0.1:8000/admin/photologue/photo/?o=3>
> >
> > Is public <http://127.0.0.1:8000/admin/photologue/photo/?o=4.-3>
> >
> > View count <http://127.0.0.1:8000/admin/photologue/photo/?o=5.-3>
> >
> > Thumbnail
> >   Paris <http://127.0.0.1:8000/admin/photologue/photo/215/>
>  (None)
> > Feb. 11, 2019, 10:02 p.m. True0
> > <http://127.0.0.1:8000/photologue/photo/paris/>
> >   VICTOR <http://127.0.0.1:8000/admin/photologue/photo/214/>
> (None)
> > Jan. 21, 2019, 11:50 a.m. True0
> > <http://127.0.0.1:8000/photologue/photo/victor/>
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > On Mon, Feb 11, 2019 at 8:23 PM Mike Dewhirst  > <mailto:mi...@dewhirst.com.au>> wrote:
> >
> > On 12/02/2019 11:47 am, Victor H. Velasquez Rizo wrote:
> > > Yes Mike.
> > > I have done both:
> >
> > In that case, you need to inspect the database itself using
> > PGAdmin (or
> > similar for other databases) and confirm that the gallery_photos
> > table
> > does indeed have a sort_value column.
> >
> > If not - as the error message says - then the database might have
> > been
> > rebuilt from a dump taken prior the migration which added
> > sort_value. Or
> > perhaps restored from an earlier backup. In any case, if it doesn't
> > exist you have to make it exist.
> >
> > I'm assuming this is a development database not in production so
> > one way
> > is to cheat.  If anyone else reading this notices a mistake please
> > jump
> > in and correct it.
> >
> > Look through the migrations and find the one which first added
> > sort_value. Delete the migrations.AddField() call for sort_value from
> > that migration. Look for any mentions of sort_value in other
> > migrations
> > and get rid of them too. There will also be an AlterTable or Options
> > line referring to sort_value which needs to have sort_value removed.
> >
> > That will trick the migration system into thinking it doesn't
> > exist. The
> > next time you run makemigrations it will discover a new field
> > sort_value
> > and add it.
> >
> > There is a potential problem here. If migrations from other apps
> > depend
> > on sort_value things may come unstuck. However, it is a good bet that
> > sort_value was added to adjust a display sequence and won't have
> > wider
> > impact.
> >
> > This is tricky territory so you should do nothing until you have
> > dumped
> &

Re: Django-Photologue - error deleting a photo

2019-02-12 Thread Victor H. Velasquez Rizo
Got it.
Thank you

On Tue, Feb 12, 2019 at 12:40 AM Mike Dewhirst 
wrote:

> On 12/02/2019 4:54 pm, Victor H. Velasquez Rizo wrote:
> > Hi Mike.
> > I have spend hours trying to get the code where all this crazyness is
> > happening with no good luck.
> > I would like to ask you if there is any posibility you can access my
> > computer trhoug TEAMVIWER and guide me on this.
>
> I would love to help except I am under time pressure myself. I am a
> procrastinator and frequently do small things to postpone doing my own
> hard things. That's why I responded to your original email.
>
> Let me recommend that you start a new thread with a new subject line to
> seek fresh assistance. Write a detailed description of your problem
> including what you have done to track it down. It might take you some
> hours to edit it and get it exactly right. I have found nine times out
> of ten doing that forces me to do extra research so my request for help
> doesn't look too half-baked. Usually I end up needing to check things in
> the docs and that frequently solves my problem.
>
> A fresh and well researched request for help will attract support from
> people much more expert than me.
>
> In this thread you didn't reveal everything you had tried and you didn't
> reveal the entire error trace nor any source which you suspected. I just
> saw what the error said and pointed that out. The actual error is your
> best lead. Try and follow that to write your story.
>
> Good luck
>
> Mike
>
> >
> > On Mon, Feb 11, 2019 at 9:40 PM Mike Dewhirst  > <mailto:mi...@dewhirst.com.au>> wrote:
> >
> > On 12/02/2019 2:19 pm, Victor H. Velasquez Rizo wrote:
> > > Hello mike.
> > > Thank you for all this information.
> > >
> > > I've been checking the migrations but I don't see anything with the
> > > *sort_value*
> >
> > In that case you have asked for gallery_photos.sort_value
> > somewhere in
> > your code and that is being interpreted by the Admin as a field and
> > because it doesn't exist is calling it a programming error.
> >
> > Certainly easier to find/fix than cheating migrations!
> >
> > Cheers
> >
> > Mike
> >
> > >
> > > Photologue <http://127.0.0.1:8000/admin/photologue/>Galleries
> >  Add
> > > Change
> > > Photo effects Add Change
> > > Photo sizes   Add Change
> > > PhotosAdd Change
> > > Watermarks
> > >
> > >
> > > When I get into Photos, I see the whole list of pictures that
> > has been
> > > created, but once I *delete selected items, *the error comes up.
> > >
> > >
> > >   Select photo to change
> > >
> > >   * Add photo <http://127.0.0.1:8000/admin/photologue/photo/add/>
> > >   * Upload a zip archive
> > > <http://127.0.0.1:8000/admin/photologue/photo/upload_zip/>
> > >
> > > Search
> > >
> > >
> > >
> > > Action: Go 0 of 10 selected
> > >
> > > Title <http://127.0.0.1:8000/admin/photologue/photo/?o=1.-3>
> > >
> > > Date taken <http://127.0.0.1:8000/admin/photologue/photo/?o=2.-3>
> > >
> > > Date added <http://127.0.0.1:8000/admin/photologue/photo/?o=3>
> > >
> > > Is public <http://127.0.0.1:8000/admin/photologue/photo/?o=4.-3>
> > >
> > > View count <http://127.0.0.1:8000/admin/photologue/photo/?o=5.-3>
> > >
> > > Thumbnail
> > >   Paris <http://127.0.0.1:8000/admin/photologue/photo/215/>
> >  (None)
> > > Feb. 11, 2019, 10:02 p.m. True0
> >     > <http://127.0.0.1:8000/photologue/photo/paris/>
> > >   VICTOR <http://127.0.0.1:8000/admin/photologue/photo/214/>
> > (None)
> > > Jan. 21, 2019, 11:50 a.m. True0
> > > <http://127.0.0.1:8000/photologue/photo/victor/>
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> >

Re: urls con clases

2019-02-19 Thread Victor H. Velasquez Rizo
Hola Abel.
Que exactamente en lo que estas teniendo problemas para configurar?


On Tue, Feb 19, 2019 at 11:21 AM Abel Sena  wrote:

> no puedo configuralo
>
> --
> 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/d42a1294-cf06-471f-bc13-ee492482a361%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>


-- 



Atte...,.
Vìctor Hugo Velàsquez Rizo
Cali - Colombia

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


Re: Django Tutorials: NoReverseMatch at /polls/1/vote/

2019-02-21 Thread Victor H. Velasquez Rizo
Daniel
Share your urls.py file

On Thu, Feb 21, 2019 at 5:32 AM  wrote:

> please let me know the particular solution for version 2.1 i m stucked
>
> On Friday, 21 March 2014 14:31:29 UTC+5:30, Daniel Roseman wrote:
>>
>> On Thursday, 20 March 2014 23:07:47 UTC, wasingej wrote:
>>>
>>> I am trying to create the project described by the Django Tutorials.
>>> However, I have reached a problem that I am stuck on after implementing the
>>> voting forms described in tutorial 4 (
>>> https://docs.djangoproject.com/en/1.6/intro/tutorial04/).  When I run
>>> my website and go to the url:http://localhost:8000/polls/1/vote/, I am
>>> greeted with an exception:
>>>
>>> NoReverseMatch at /polls/1/vote/
>>> value: u'polls' is not a registered namespace
>>>
>>> 
>>>
>>> It seems strange that 'polls' is not a registered namespace because it
>>> is the name of my django application.  Any ideas as to what I could be
>>> doing wrong here?
>>>
>>
>> Are you sure you've followed the instructions at the end of the previous
>> part?
>>
>> https://docs.djangoproject.com/en/1.6/intro/tutorial03/#namespacing-url-names
>> --
>> DR.
>>
> --
> 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/274e59fa-fd4c-4535-afc7-dea30195ddc6%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>


-- 



Atte...,.
Vìctor Hugo Velàsquez Rizo
Cali - Colombia

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


Re:

2019-02-21 Thread Victor H. Velasquez Rizo
Jayesh

The class Choice()
Indentation is wrong.

It has to be at the same column alignement of Question


On Thu, Feb 21, 2019 at 12:43 PM bhushan patil 
wrote:

> I am trying to build my first app  in django but an error has occurred
> starting 'Question is not defined'.can anyone help me with 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/CAJ%3Ds-MyAsVK0ihGnxgdKcFBsxfFa1D-KiSOE4sxDp8gt-LuB9w%40mail.gmail.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>


-- 



Atte...,.
Vìctor Hugo Velàsquez Rizo
Cali - Colombia

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


Re:

2019-02-21 Thread Victor H. Velasquez Rizo
Jayesh.
It will be more helpful if you can share a view of your models...

On Thu, Feb 21, 2019 at 2:10 AM bhushan patil  wrote:

> I am running the command 'python manage.py makemigrations polls' but it's
> showing that django.db.models has no attribute model.
>
> --
> 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/CAJ%3Ds-Myumw2o8mxYcbjQXjG0Zy%2BVao6kPjmL7dxaajaGDG5MsA%40mail.gmail.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>


-- 



Atte...,.
Vìctor Hugo Velàsquez Rizo
Cali - Colombia

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


Re:

2019-03-30 Thread Victor H. Velasquez Rizo
Hello Carol.

Try this
https://tutorial.djangogirls.org/en/

On Sat, Mar 30, 2019 at 9:12 AM carol caro  wrote:

> Hello. I am a new or beginner django developer. Where do I start from
> I have installed python and integrated with Django framework but I don't
> know what to do next
>
> --
> 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/CAN%2Bowc-S7n3OX0jc_fLjro6unDSNZJU4yGbYsxTLGeh55%3DFQvA%40mail.gmail.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>


-- 



Atte...,.
Vìctor Hugo Velàsquez Rizo
Cali - Colombia

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


Re: Venv

2019-03-30 Thread Victor H. Velasquez Rizo
Hello John:
You have to be in the folder where the enviroment was created, then type
source /bin/activate

On Sat, Mar 30, 2019 at 1:32 PM John  wrote:

> Good evening
>
> I've created and activated venv like this:
> $ python3 -m venv 
> $ source /bin/activate
>
> Now Ive ‘deactivate’ the venv
>
> How do I re-activate please?
>
> 🙏
>
>
> --
> 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/EA2E8453-8CF9-4F32-9EB6-D364C71D3FD4%40gmail.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>


-- 



Atte...,.
Vìctor Hugo Velàsquez Rizo
Cali - Colombia

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


Re: url not redirecting?

2019-04-21 Thread Victor H. Velasquez Rizo
*Hello Silver.*

*- On your URLCONFIG add *
path('', include('public_posts.urls')),*<=== Add*

-* On your  public_posts/urls.py add*
app_name = 'public_posts'
urlpatterns = [
path('', views.pub_post_list, name='pub_posts'),
path('', views.post_new, name='new_post'),
path('new-post/', TemplateView.as_view(template_name='new_post.html'),
 name='new_post'),   *<=== Change*
path('', TemplateView.as_view(template_name='pub_posts.html'), name=
'pub_posts'),
]

- On your HTML add
New Post*<===
Change*

try and let me know if that works.


On Sun, Apr 21, 2019 at 9:18 AM  wrote:

> Hello, i'm attempting to redirect to a 'new post' page when someone clicks
> 'New Post'. Problem is, it redirects back to the public_posts page. the url
> in my HTML is {%  url 'new_post' %} but when i inspect the element in my
> browser, it says the href=/public_posts/ and no matter what I do, I can't
> get it to redirect/link correctly.
>
>
> *RELEVANT FILES*
>
> #public_posts/forms.py
>
>
>
> from django import forms
> from .models import Post
>
> class PublicPostForm(forms.ModelForm):
>
> class Meta:
> model = Post
> fields = ('title', 'text',)
>
>
>
> #public_posts/urls.py
>
>
> from django.urls import path
> from django.conf.urls import url
> from . import views
> from django.views.generic import TemplateView
>
> urlpatterns = [
> path('', views.pub_post_list, name='pub_posts'),
> path('', views.post_new, name='new_post'),
> path('', TemplateView.as_view(template_name='new_post.html'), name=
> 'new_post'),
> path('', TemplateView.as_view(template_name='pub_posts.html'), name=
> 'pub_posts'),
> ]
>
>
>
> #public_posts/views.py
>
>
> from django.shortcuts import render
> from django.utils import timezone
> from .models import Post
> from django.urls import reverse_lazy
> from django.views import generic
> from django.http import HttpResponseRedirect
> from django.shortcuts import render
> from .forms import PublicPostForm
>
> # Create your views here.
>
> def pub_post_list(request):
>
> posts = Post.objects.filter(published_date__lte=timezone.now()).
> order_by('published_date')
> return render(request, 'public_posts/pub_posts.html', {'posts': posts
> })
>
> def post_new(request):
> form = PublicPostForm()
> posts = Post.objects.filter(published_date__lte=timezone.now()).
> order_by('published_date')
>
> #if this is a POST request we need to process the form data
>
> if request.method == 'POST':
> # create a form instance and populate it with data from the
> request:
> form = PublicPostForm(request.POST)
> # check whether it's valid:
> if form.is_valid():
> # process the data in form.cleaned_data as required
> post.publish()
> post.save()
>
> # redirect to a new URL:
> #return HttpResponseRedirect('/new_post/') Commented out to
> try render()
> return render(request, 'public_posts/new_post.html', {'form':
> form})
>
> # if a GET (or any other method) we'll create a blank form
> else:
> form = PublicPostForm()
> return render(request,  'public_posts/new_post.html', {'posts': posts
> })
>
>
>
>
> #public_posts/models.py
>
>
> from django.conf import settings
> from django.db import models
> from django.utils import timezone
> from django.utils.http import urlquote
> from django.utils.translation import ugettext_lazy as _
> from django.core.mail import send_mail
> from django.contrib.auth.models import AbstractBaseUser, PermissionsMixin
> from django.contrib.auth.models import BaseUserManager
> from django.contrib.auth import get_user_model
>
>
> User = get_user_model()
>
>
> class Post(models.Model):
> author = models.ForeignKey(User, related_name='pub_poster', on_delete=
> models.CASCADE)
> title = models.CharField(max_length=200)
> text = models.TextField()
> created_date = models.DateTimeField(default=timezone.now)
> published_date = models.DateTimeField(blank=True, null=True)
>
> def publish(self):
> self.published_date = timezone.now()
> self.save()
>
> def __str__(self):
> return self.title
>
> *URLCONFIG*
>
> from django.contrib import admin
> from django.urls import path, include, resolve
> from django.conf.urls import url
> from admin_posts.views import home
> from public_posts.views import post_new, pub_post_list
> from django.views.generic.base import TemplateView
>
> urlpatterns = [
> path('admin/', admin.site.urls),
> path('', home, name='home'),
> path('admin_posts/', include('admin_posts.urls')),
> path('', pub_post_list, name='pub_posts'),
> path('', post_new, name='post_new'),
> path('public_posts/', include('public_posts.urls')),
> url(r'^accounts/', include('allauth.urls')),
> path('users/', include('users.urls')),
>
> ]
>
>
>
>
>
> REVELANT HTML
>
>
>
> 
> New Post
> 
>
>
>
>
>
>
>
> --
> You received

Re: problems with url and views - new to django

2019-04-21 Thread Victor H. Velasquez Rizo
*Hello Rob.*
With the url "hello/", your trying to call the "hello" function on your
view.py.
*First*, you need to import "hello" to be able to use it. from  *from
lct_app.views import hello*
*Second,* call the function. path('hello/', hello),

*urls.py*
from django.contrib import admin
from django.urls import path
from  lct_app.views import hello

urlpatterns = [
path('admin/', admin.site.urls),
path('hello/', hello),
]

*views.py*

from django.shortcuts import render

def hello(request):
   return render(request, "lct_app/templates/hello.html", {})

On Sun, Apr 21, 2019 at 5:07 PM Rob W  wrote:

> setting up a new project.
> all good, loaded up the project on localhost.
>
> however, when creating a view then setting the url, it doesn't work.
>
>
> *urls.py*
>
> from django.contrib import admin
> from django.urls import path
>
> urlpatterns = [
> path('admin/', admin.site.urls),
> path('hello/', lct_app.site.urls),
>
>
> *views.py*
>
> from django.shortcuts import render
>
> def hello(request):
>return render(request, "lct_app/templates/hello.html", {})
>
> i comment out the path in urls.py, django comes back. what am i missing?
>
>
>
> --
> 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/4872beca-597c-4689-a12e-9e888c5266ca%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>


-- 



Atte...,.
Vìctor Hugo Velàsquez Rizo
Cali - Colombia

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


Re: problems with url and views - new to django

2019-04-23 Thread Victor H. Velasquez Rizo
Whats the structure of your project.?

On Tue, Apr 23, 2019, 7:13 AM Deepali Singh 
wrote:

> I have new to django ad i have created my project my pieshopI don't
> know how it is showing 3 folders in the app
>
> On Mon, 22 Apr 2019 at 22:08, Robert Wahoo  wrote:
>
>> Actually, I found why I got that last message, was a typo on my part.
>>
>>
>>
>> On to the next problem…Thank you.
>>
>>
>>
>> *From: *"django-users@googlegroups.com" 
>> on behalf of "Victor H. Velasquez Rizo" 
>> *Reply-To: *"django-users@googlegroups.com" <
>> django-users@googlegroups.com>
>> *Date: *Sunday, April 21, 2019 at 9:02 PM
>> *To: *"django-users@googlegroups.com" 
>> *Subject: *Re: problems with url and views - new to django
>>
>>
>>
>> *Hello Rob.*
>>
>> With the url "hello/", your trying to call the "hello" function on your
>> view.py.
>>
>> *First*, you need to import "hello" to be able to use it. from  *from
>> lct_app.views import hello*
>>
>> *Second,* call the function. path('hello/', hello),
>>
>>
>>
>> *urls.py*
>>
>> from django.contrib import admin
>>
>> from django.urls import path
>>
>> from  lct_app.views import hello
>>
>>
>>
>> urlpatterns = [
>>
>> path('admin/', admin.site.urls),
>>
>> path('hello/', hello),
>>
>> ]
>>
>>
>>
>> *views.py*
>>
>>
>>
>> from django.shortcuts import render
>>
>>
>>
>> def hello(request):
>>
>>return render(request, "lct_app/templates/hello.html", {})
>>
>>
>>
>> On Sun, Apr 21, 2019 at 5:07 PM Rob W  wrote:
>>
>> setting up a new project.
>>
>> all good, loaded up the project on localhost.
>>
>>
>>
>> however, when creating a view then setting the url, it doesn't work.
>>
>>
>>
>>
>>
>> *urls.py*
>>
>>
>>
>> from django.contrib import admin
>>
>> from django.urls import path
>>
>>
>>
>> urlpatterns = [
>>
>> path('admin/', admin.site.urls),
>>
>> path('hello/', lct_app.site.urls),
>>
>>
>>
>>
>>
>> *views.py*
>>
>>
>>
>> from django.shortcuts import render
>>
>>
>>
>> def hello(request):
>>
>>return render(request, "lct_app/templates/hello.html", {})
>>
>>
>>
>> i comment out the path in urls.py, django comes back. what am i missing?
>>
>>
>>
>>
>>
>>
>>
>> --
>> 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/4872beca-597c-4689-a12e-9e888c5266ca%40googlegroups.com
>> <https://groups.google.com/d/msgid/django-users/4872beca-597c-4689-a12e-9e888c5266ca%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>>
>>
>>
>> --
>>
>>
>>
>>
>> Atte...,.
>> Vìctor Hugo Velàsquez Rizo
>> Cali - Colombia
>>
>> --
>> 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/CAFCXTzga%3DFAMdPFwhfp3yMEtyZkA7rzmjhB29rAG160ALuP3Og%40mail.gmail.com
>> <https://groups.google.com/d/msgid/django-users/CAFCXTzga%3DFAMdPFwhfp3yMEtyZkA7rzmjhB29rAG160ALuP3Og%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>> --
>> You received this message because you are subscribed to t

Re: problems with url and views - new to django

2019-04-23 Thread Victor H. Velasquez Rizo
But. Did you get it to work?

On Mon, Apr 22, 2019, 11:38 AM Robert Wahoo  wrote:

> Actually, I found why I got that last message, was a typo on my part.
>
>
>
> On to the next problem…Thank you.
>
>
>
> *From: *"django-users@googlegroups.com" 
> on behalf of "Victor H. Velasquez Rizo" 
> *Reply-To: *"django-users@googlegroups.com"  >
> *Date: *Sunday, April 21, 2019 at 9:02 PM
> *To: *"django-users@googlegroups.com" 
> *Subject: *Re: problems with url and views - new to django
>
>
>
> *Hello Rob.*
>
> With the url "hello/", your trying to call the "hello" function on your
> view.py.
>
> *First*, you need to import "hello" to be able to use it. from  *from
> lct_app.views import hello*
>
> *Second,* call the function. path('hello/', hello),
>
>
>
> *urls.py*
>
> from django.contrib import admin
>
> from django.urls import path
>
> from  lct_app.views import hello
>
>
>
> urlpatterns = [
>
> path('admin/', admin.site.urls),
>
> path('hello/', hello),
>
> ]
>
>
>
> *views.py*
>
>
>
> from django.shortcuts import render
>
>
>
> def hello(request):
>
>return render(request, "lct_app/templates/hello.html", {})
>
>
>
> On Sun, Apr 21, 2019 at 5:07 PM Rob W  wrote:
>
> setting up a new project.
>
> all good, loaded up the project on localhost.
>
>
>
> however, when creating a view then setting the url, it doesn't work.
>
>
>
>
>
> *urls.py*
>
>
>
> from django.contrib import admin
>
> from django.urls import path
>
>
>
> urlpatterns = [
>
> path('admin/', admin.site.urls),
>
> path('hello/', lct_app.site.urls),
>
>
>
>
>
> *views.py*
>
>
>
> from django.shortcuts import render
>
>
>
> def hello(request):
>
>return render(request, "lct_app/templates/hello.html", {})
>
>
>
> i comment out the path in urls.py, django comes back. what am i missing?
>
>
>
>
>
>
>
> --
> 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/4872beca-597c-4689-a12e-9e888c5266ca%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/4872beca-597c-4689-a12e-9e888c5266ca%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>
>
>
>
> --
>
>
>
>
> Atte...,.
> Vìctor Hugo Velàsquez Rizo
> Cali - Colombia
>
> --
> 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/CAFCXTzga%3DFAMdPFwhfp3yMEtyZkA7rzmjhB29rAG160ALuP3Og%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAFCXTzga%3DFAMdPFwhfp3yMEtyZkA7rzmjhB29rAG160ALuP3Og%40mail.gmail.com?utm_medium=email&utm_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/BL0PR01MB4354017875EE71CD3DF45828F4220%40BL0PR01MB4354.prod.exchangelabs.com
> <https://groups.google.com/d/msgid/django-users/BL0PR01MB4354017875EE71CD3DF45828F4220%40BL0PR01MB4354.prod.exchangelabs.com?utm_medium=email&utm_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/CAFCXTzh9yhW5%3DECndL8sst4Z4FB8_YEc4EpMqWuD%3D8xLpdfS7g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Mostrar datos en un formulario (inputs) en un template.

2019-04-25 Thread Victor H. Velasquez Rizo
Hola Tatiana.
Vira este tutorial en que te guian para que hagas las operaciones basicas
de *CRUD (Create, Read, Update, Delete)*

https://www.youtube.com/watch?v=twXF1VpK5ak

Saludos !

On Thu, Apr 25, 2019 at 10:39 AM Tatiana Mesa 
wrote:

> Hola,
>
> 1.tengo un formulario donde inicialmente lo lleno y guardo unos datos en
> la base.
> 2. hago una consulta para traer esos registros de la base de datos.
> 3. Ahora quiero que en ese mismo formulario, en el inicial, se muestren
> esos datos que guarde en un principio.
>
> para hacer un tipo de update, pero sobre ese mismo formulario, es como si
> el usuario viera lo que guardo en un principio y pueda decidir si quiere
> cambiarlo o no
>
> El jue., 25 de abr. de 2019 a la(s) 09:44, Gil Obradors (
> gil.obrad...@gmail.com) escribió:
>
>> Buenas,
>>
>> Un update, en caso que los datos ya existen quizas? Sino no lo entiendo?
>>
>>
>>
>>
>>
>>
>>
>> El dj., 25 d’abr. 2019, 16:09,  va escriure:
>>
>>> Buen día,
>>>
>>> Vengo trabajando con un formulario en html que captura los datos
>>> mediante AJAX y los guarda en una base de datos postgres.
>>>
>>> Ahora quiero realizar un update, en ese mismo formulario,
>>>
>>> De que manera puedo mostrar los datos que guarde en la base de datos, en
>>> los inputs del formulario, para decidir si quiero dejar esos datos o quiero
>>> actualizarlos.
>>>
>>>
>>> Agradezco mucho sus soluciones.
>>>
>>>
>>> Este es mi formulario en el que guardo inicialmente
>>>
>>>
>>> {%csrf_token%}
>>> 
>>> 
>>> 
>>> Tags
>>> >> placeholder='Write your tags'
>>> class='flexdatalist data_tags'
>>> params='["name"]',
>>> data-search-in='name'
>>> data-visible-properties='["name"]'
>>> data-selection-required='true'
>>> data-value-property='id'
>>> data-min-length='2'
>>> multiple='multiple'
>>> name='country_id_multiple' required>
>>> 
>>> Tono
>>> 
>>> 
>>> {% for t in tones %}
>>> 
>>> {{ t.nombre }}
>>> 
>>> {% endfor %}
>>> 
>>> 
>>> 
>>> Tema
>>> 
>>> 
>>> 
>>> Añadir Tema
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>>
>>> --
>>> 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/202a9a2b-e6da-49ff-83ec-d884e994b5a9%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/CAK-JoTSaJyJogke1fJ-uWbOia5uWt2Eai23HuUensoKPY8AdjA%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/CAHAr%3D_2%2B04CK3EW_RrL8M25Cukcv3%2BkVrpfX2J6cMjJa0kh36g%40mail.gmail.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>


-- 



Atte...,.
Vìctor Hugo Velàsquez Rizo
Cali - Colombia

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


Re: Redirect

2019-05-14 Thread Victor H. Velasquez Rizo
*Hi Soumen.*

your are trying to re-direct an user to a customized url. To do that you
need to create an URL that receive the name as an argument.

*urls.py*
path('url/', view, name='view_name'),

*View.py*
*from *django.shortcuts* import *redirect

return redirect('app:view_name', user_name=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/CAFCXTzgf0vZqSFht%3D_4dr1TUfewsRF3WOQYYKfYATmHUKgrHiQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Redirect

2019-05-14 Thread Victor H. Velasquez Rizo
What I sent was just assuming that the user already meet the requirements
youn describe.

Share the code that you have so far and we can work base on it.!


On Tue, May 14, 2019 at 3:55 PM Soumen Khatua 
wrote:

> Thanks for your help. But it should be redirect to these custom page if
> and only if  I'll click login button and at the same time it should not
> redirect to custom page if it is coming by loginrequired functionality.
>
> Can you share me the code, please if it is possible.
>
> Thank you once again.
>
>
>
> On Wed, 15 May 2019, 01:20 Victor H. Velasquez Rizo, <
> rizo.vic...@gmail.com> wrote:
>
>> *Hi Soumen.*
>>
>> your are trying to re-direct an user to a customized url. To do that you
>> need to create an URL that receive the name as an argument.
>>
>> *urls.py*
>> path('url/', view, name='view_name'),
>>
>> *View.py*
>> *from *django.shortcuts* import *redirect
>>
>> return redirect('app:view_name', user_name=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/CAFCXTzgf0vZqSFht%3D_4dr1TUfewsRF3WOQYYKfYATmHUKgrHiQ%40mail.gmail.com
>> <https://groups.google.com/d/msgid/django-users/CAFCXTzgf0vZqSFht%3D_4dr1TUfewsRF3WOQYYKfYATmHUKgrHiQ%40mail.gmail.com?utm_medium=email&utm_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/CAPUw6WbAqXhgqh3rh47gmxmYo5DvDcw-MnhonNtEkHXgpWBpWg%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAPUw6WbAqXhgqh3rh47gmxmYo5DvDcw-MnhonNtEkHXgpWBpWg%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>


-- 



Atte...,.
Vìctor Hugo Velàsquez Rizo
Cali - Colombia

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


Re: URL conf error

2019-05-28 Thread Victor H. Velasquez Rizo
Hi Madhur.

On your urls.py,
*change: *url('^$', views.index, name=index),
*to:* url('^$', views.index, name="index"),

I assume that you imported the *views.*

On Tue, May 28, 2019 at 12:31 PM Madhur Kabra 
wrote:

> I am getting the url conf error. I  have attached the relevant files.
> Thanks for the assistance
>
> --
> 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/37eedb50-637a-45bf-839a-cbe52a410f4e%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>


-- 



Atte...,.
Vìctor Hugo Velàsquez Rizo
Cali - Colombia

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