websites building

2019-03-05 Thread Kipkirui Caleb
After setting up Django and the virtual environment what do i need to build 
website 

-- 
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/e6f5a401-6f75-42e5-811c-257065376510%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: websites building

2019-03-05 Thread Cartis Coding Hive
Basically you will need to run command "django-admin startproject " on your command line. Navigate into that directory and run another
command "python manage.py startapp ". After that run "python
manage.py runserver" , open your browser and type the url that u get from
django server on the command line. I hope that will help.

On Tue, 05 Mar 2019, 13:45 Kipkirui Caleb,  wrote:

> After setting up Django and the virtual environment what do i need to
> build website
>
> --
> 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/e6f5a401-6f75-42e5-811c-257065376510%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/CA%2BjnFn-5%2BuJ%3DR96u-Sf6AiBZ3Pg32%2BxN41zBuc72i%2BD1tvnOCg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: websites building

2019-03-05 Thread A MARAH
Great question , nice answer , I copy it to my post-it window :)

Le mar. 5 mars 2019 à 12:27, Cartis Coding Hive  a
écrit :

> Basically you will need to run command "django-admin startproject  name>" on your command line. Navigate into that directory and run another
> command "python manage.py startapp ". After that run "python
> manage.py runserver" , open your browser and type the url that u get from
> django server on the command line. I hope that will help.
>
> On Tue, 05 Mar 2019, 13:45 Kipkirui Caleb,  wrote:
>
>> After setting up Django and the virtual environment what do i need to
>> build website
>>
>> --
>> 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/e6f5a401-6f75-42e5-811c-257065376510%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/CA%2BjnFn-5%2BuJ%3DR96u-Sf6AiBZ3Pg32%2BxN41zBuc72i%2BD1tvnOCg%40mail.gmail.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>


-- 
Bonjour,


Cordialement,
+212626090018
amar.ra...@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 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%2Bdg6Uf3_QkVFK_qbV4FPcnyO7%2Bf5A1ZjyC77sRBtNBoJ7%2BSYQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Installing pdftotext library on heroku

2019-03-05 Thread joelryan2k
I'm curious about this, too. I've been using docker containers on heroku to 
avoid potential issues like this.

On Wednesday, January 23, 2019 at 7:20:03 AM UTC-5, Joel Mathew wrote:
>
> pdftotext library is a requirement in requirements.txt. While trying to 
> push to heroku, I get the following error:
>
> remote:  Running setup.py install for pdftotext: started
> remote:Running setup.py install for pdftotext: finished with 
> status 'error'
> remote:Complete output from command 
> /app/.heroku/python/bin/python -u -c "import setuptools, 
> tokenize;__file__='/tmp/pip-build-rnbekz45/pdftotext/setup.py';f=getattr(tokenize,
>  'open', open)(__file__);code=f.read().replace('\r\n', 
> '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record 
> /tmp/pip-o0if2tl3-record/install-record.txt 
> --single-version-externally-managed --compile:
> remote:/app/.heroku/python/lib/python3.6/distutils/dist.py:261: 
> UserWarning: Unknown distribution option: 'long_description_content_type'
> remote:  warnings.warn(msg)
> remote:running install
> remote:running build
> remote:running build_ext
> remote:building 'pdftotext' extension
> remote:creating build
> remote:creating build/temp.linux-x86_64-3.6
> remote:gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g 
> -fwrapv -O3 -Wall -fPIC -DPOPPLER_CPP_AT_LEAST_0_30_0=0 
> -I/app/.heroku/python/include/python3.6m -c pdftotext.cpp -o 
> build/temp.linux-x86_64-3.6/pdftotext.o -Wall
> remote:pdftotext.cpp:3:10: fatal error: 
> poppler/cpp/poppler-document.h: No such file or directory
> remote: #include 
> remote:  ^~~~
> remote:compilation terminated.
> remote:error: command 'gcc' failed with exit status 1
> remote:
> remote:
> remote:Command "/app/.heroku/python/bin/python -u -c "import 
> setuptools, 
> tokenize;__file__='/tmp/pip-build-rnbekz45/pdftotext/setup.py';f=getattr(tokenize,
>  'open', open)(__file__);code=f.read().replace('\r\n', 
> '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record 
> /tmp/pip-o0if2tl3-record/install-record.txt 
> --single-version-externally-managed --compile" failed with error code 1 in 
> /tmp/pip-build-rnbekz45/pdftotext/
> remote:  ! Push rejected, failed to compile Python app.
> remote: 
> remote:  ! Push failed
>
> Normally I'd solve this by installing libpoppler-cpp-dev with apt. But on 
> heroku, I don't have root access to do that. Is there a solution for this?
> Sincerely yours,
>
>  Joel G Mathew
>
>

-- 
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/a6177122-63d0-4162-8be4-ab05d9d094d4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Installing pdftotext library on heroku

2019-03-05 Thread Joel Mathew
This was solved after a user helped me out on StackOverflow. The solution
is to use build packs.

https://help.heroku.com/IYRYW6VB/how-do-i-install-additional-software-packages-that-my-application-requires

Sincerely yours,

 Joel G Mathew



On Tue, 5 Mar 2019 at 21:02, joelryan2k  wrote:

> I'm curious about this, too. I've been using docker containers on heroku
> to avoid potential issues like this.
>
> On Wednesday, January 23, 2019 at 7:20:03 AM UTC-5, Joel Mathew wrote:
>>
>> pdftotext library is a requirement in requirements.txt. While trying to
>> push to heroku, I get the following error:
>>
>> remote:  Running setup.py install for pdftotext: started
>> remote:Running setup.py install for pdftotext: finished with 
>> status 'error'
>> remote:Complete output from command 
>> /app/.heroku/python/bin/python -u -c "import setuptools, 
>> tokenize;__file__='/tmp/pip-build-rnbekz45/pdftotext/setup.py';f=getattr(tokenize,
>>  'open', open)(__file__);code=f.read().replace('\r\n', 
>> '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record 
>> /tmp/pip-o0if2tl3-record/install-record.txt 
>> --single-version-externally-managed --compile:
>> remote:/app/.heroku/python/lib/python3.6/distutils/dist.py:261: 
>> UserWarning: Unknown distribution option: 'long_description_content_type'
>> remote:  warnings.warn(msg)
>> remote:running install
>> remote:running build
>> remote:running build_ext
>> remote:building 'pdftotext' extension
>> remote:creating build
>> remote:creating build/temp.linux-x86_64-3.6
>> remote:gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG 
>> -g -fwrapv -O3 -Wall -fPIC -DPOPPLER_CPP_AT_LEAST_0_30_0=0 
>> -I/app/.heroku/python/include/python3.6m -c pdftotext.cpp -o 
>> build/temp.linux-x86_64-3.6/pdftotext.o -Wall
>> remote:pdftotext.cpp:3:10: fatal error: 
>> poppler/cpp/poppler-document.h: No such file or directory
>> remote: #include 
>> remote:  ^~~~
>> remote:compilation terminated.
>> remote:error: command 'gcc' failed with exit status 1
>> remote:
>> remote:
>> remote:Command "/app/.heroku/python/bin/python -u -c "import 
>> setuptools, 
>> tokenize;__file__='/tmp/pip-build-rnbekz45/pdftotext/setup.py';f=getattr(tokenize,
>>  'open', open)(__file__);code=f.read().replace('\r\n', 
>> '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record 
>> /tmp/pip-o0if2tl3-record/install-record.txt 
>> --single-version-externally-managed --compile" failed with error code 1 in 
>> /tmp/pip-build-rnbekz45/pdftotext/
>> remote:  ! Push rejected, failed to compile Python app.
>> remote:
>> remote:  ! Push failed
>>
>> Normally I'd solve this by installing libpoppler-cpp-dev with apt. But
>> on heroku, I don't have root access to do that. Is there a solution for
>> this?
>> Sincerely yours,
>>
>>  Joel G Mathew
>>
>> --
> 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/a6177122-63d0-4162-8be4-ab05d9d094d4%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/CAA%3Diw_-rro5%2B%3DeY%2B9avCqVyPjCvQxmDPZFm5i1Khc4iGBmL8Qg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


How can I make users login to my site with facebook/twitter/google?

2019-03-05 Thread Sandip Nath
i want users to my site to log log in with facebook, twitter, google. While 
the development server supports only http fb/twitter/google expects https. 
What to do?

-- 
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/53f8baf2-04d4-4be9-9ce0-e9a98d5d9657%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: How can I make users login to my site with facebook/twitter/google?

2019-03-05 Thread vineeth sagar
You can use django social auth.

https://python-social-auth-docs.readthedocs.io/en/latest/configuration/django.html

If you just want to learn. Look up Oauth2 and then use developer
documentation to implement login with django.



On Tue, 5 Mar, 2019, 22:49 Sandip Nath,  wrote:

> i want users to my site to log log in with facebook, twitter, google.
> While the development server supports only http fb/twitter/google expects
> https. What to do?
>
> --
> 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/53f8baf2-04d4-4be9-9ce0-e9a98d5d9657%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/CAMMZq8OopomttBcwyWYjL%2Box6CnLACT-fHqa1ETeZxo5iWt3EA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


How to acheive search auditlog through Django auditlog package

2019-03-05 Thread desousa01071997
In django auditlog Create,Update and Delete is working fine for me.For 
search I try to customize the given default package. In that package they 
are mentioned The valid actions are :py:attr:`Action.CREATE`, 
:py:attr:`Action.UPDATE` and :py:attr:`Action.DELETE`.though I have tried 
but I am unable to achieve the goal. Here I have mentioned code below

*Models.py:*

@python_2_unicode_compatible
class LogEntry(models.Model):
"""
Represents an entry in the audit log. The content type is saved along 
with the textual and numeric (if available)
primary key, as well as the textual representation of the object when 
it was saved. It holds the action performed
and the fields that were changed in the transaction.

If AuditlogMiddleware is used, the actor will be set automatically. 
Keep in mind that editing / re-saving LogEntry
instances may set the actor to a wrong value - editing LogEntry 
instances is not recommended (and it should not be
necessary).
"""

class Action:
"""
The actions that Auditlog distinguishes: creating, updating and 
deleting objects. Viewing objects is not logged.
The values of the actions are numeric, a higher integer value means 
a more intrusive action. This may be useful
in some cases when comparing actions because the ``__lt``, 
``__lte``, ``__gt``, ``__gte`` lookup filters can be
used in queries.

The valid actions are :py:attr:`Action.CREATE`, 
:py:attr:`Action.UPDATE` and :py:attr:`Action.DELETE`.
"""
CREATE = 0
UPDATE = 1
DELETE = 2

choices = (
(CREATE, _("create")),
(UPDATE, _("update")),
(DELETE, _("delete")),
)

content_type = models.ForeignKey(to='contenttypes.ContentType', 
on_delete=models.CASCADE, related_name='+', verbose_name=_("content type"))
object_pk = models.CharField(db_index=True, max_length=255, 
verbose_name=_("object pk"))
object_id = models.BigIntegerField(blank=True, db_index=True, 
null=True, verbose_name=_("object id"))
object_repr = models.TextField(verbose_name=_("object representation"))
action = models.PositiveSmallIntegerField(choices=Action.choices, 
verbose_name=_("action"))
changes = models.TextField(blank=True, verbose_name=_("change message"))
actor = models.ForeignKey(to=settings.AUTH_USER_MODEL, 
on_delete=models.SET_NULL, blank=True, null=True, related_name='+', 
verbose_name=_("actor"))
# remote_addr = models.GenericIPAddressField(blank=True, null=True, 
verbose_name=_("remote address"))
timestamp = models.DateTimeField(auto_now_add=True, 
verbose_name=_("timestamp"))
# additional_data = JSONField(blank=True, null=True, 
verbose_name=_("additional data"))

objects = LogEntryManager()

class Meta:
get_latest_by = 'timestamp'
ordering = ['-timestamp']
verbose_name = _("log entry")
verbose_name_plural = _("log entries")

def __str__(self):
if self.action == self.Action.CREATE:
fstring = _("Created {repr:s}")
elif self.action == self.Action.UPDATE:
print("updating",self.action)
fstring = _("Updated {repr:s}")
print(fstring)
elif self.action == self.Action.DELETE:
fstring = _("Deleted {repr:s}")
else:
fstring = _("Logged {repr:s}")

return fstring.format(repr=self.object_repr)

@property
def changes_dict(self):
"""
:return: The changes recorded in this log entry as a dictionary 
object.
"""
try:
return json.loads(self.changes)
except ValueError:
return {}

@property
def changes_str(self, colon=': ', arrow=smart_text(' \u2192 '), 
separator='; '):
"""
Return the changes recorded in this log entry as a string. The 
formatting of the string can be customized by
setting alternate values for colon, arrow and separator. If the 
formatting is still not satisfying, please use
:py:func:`LogEntry.changes_dict` and format the string yourself.

:param colon: The string to place between the field name and the 
values.
:param arrow: The string to place between each old and new value.
:param separator: The string to place between each field.
:return: A readable string of the changes in this log entry.
"""
substrings = []

for field, values in iteritems(self.changes_dict):
substring = 
smart_text('{field_name:s}{colon:s}{old:s}{arrow:s}{new:s}').format(
field_name=field,
colon=colon,
old=values[0],
arrow=arrow,
new=values[1],
)
substrings.append(substring)

return separator.join(substrings)

@property
def changes_display_dict(self):
"""
:return: The changes recorded in this log entry i

Re: websites building

2019-03-05 Thread Thomas POKAM
And Usually, working on your computer, the address to connect to in your 
browser will be http://127.0.0.1:8000 or you can  use but 
http://localhost:8000 . The result on the page will be a welcomming page 
to tells you that you successfully setup your environment et you first app.


After this you can follow the polls app tutorial [1] to learn basics of 
django.


---

[1]  https://docs.djangoproject.com/en/2.1/intro/tutorial01/


Le 05/03/2019 à 12:59, Cartis Coding Hive a écrit :
Basically you will need to run command "django-admin startproject 
" on your command line. Navigate into that directory and 
run another command "python manage.py startapp ". After that 
run "python manage.py runserver" , open your browser and type the url 
that u get from django server on the command line. I hope that will help.


On Tue, 05 Mar 2019, 13:45 Kipkirui Caleb, > wrote:


After setting up Django and the virtual environment what do i need
to build website
-- 
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/e6f5a401-6f75-42e5-811c-257065376510%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/CA%2BjnFn-5%2BuJ%3DR96u-Sf6AiBZ3Pg32%2BxN41zBuc72i%2BD1tvnOCg%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/c387c766-ba4a-9313-0710-e0ae0ae2721b%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: websites building

2019-03-05 Thread Kipkirui Caleb
Thank you

On Tue, 5 Mar 2019, 15:27 Cartis Coding Hive  Basically you will need to run command "django-admin startproject  name>" on your command line. Navigate into that directory and run another
> command "python manage.py startapp ". After that run "python
> manage.py runserver" , open your browser and type the url that u get from
> django server on the command line. I hope that will help.
>
> On Tue, 05 Mar 2019, 13:45 Kipkirui Caleb,  wrote:
>
>> After setting up Django and the virtual environment what do i need to
>> build website
>>
>> --
>> 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/e6f5a401-6f75-42e5-811c-257065376510%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/CA%2BjnFn-5%2BuJ%3DR96u-Sf6AiBZ3Pg32%2BxN41zBuc72i%2BD1tvnOCg%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/CAM8nEPqXLx%3Ddqv1c9O8gFEXiTxYopVhDhK_DfdxcMdRjQtA%2BVQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Django 2 - migrating to Mysql from sqlite issues

2019-03-05 Thread Pedram Badakhchani
Hi All,

I have a problem with the source code provided on the associated git hub 
pages: https://github.com/PacktPublishing/Django-2-by-Example After 
downloading the source files, and setting up the chapter 1 example locally, 
using the default sqlite database  everything works as expected. However, 
changing the database to mysql the site breaks. This is the scenario:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'pedbad',
'USER': 'root',
'PASSWORD': 'root',
'HOST': 'localhost',
'PORT': '3306',
}
}


Changing the settings.py file to use mysql works fine, and the database is 
created, and the tables are all populated correctly. using createsuperuser 
also works and I am able to access the admin backend and create a post 
navigating to :
 http://127.0.0.1:8000/blog/ shows the post and the post title link is set 
to:
http://127.0.0.1:8000/blog/2019/1/31/test-post/ however, although this 
works fine with sqllite, on mysql the link take me to a 404 page: Page not 
found (404) Request Method: GET Request URL: 
http://127.0.0.1:8000/blog/2019/1/31/test-post/ Raised by: 
blog.views.post_detail No Post matches the given query. even though the 
blog post exists in the mysql table: table blog_post id - 1 title - Test 
Post slug - test-post body - content for test post publish - 2019-01-31 
10:56:40.00 created - 2019-01-31 10:56:59.674959 updated - 2019-01-31 
10:56:59.674976 status - published author_id -  1 I would appreciate any 
advice on why this is happening when the database is switched to MySQl 
thank you Pedram

-- 
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/270c4971-2385-41b9-b12e-cf2c6fed010b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Hi all

2019-03-05 Thread lakshmyyreddy
how can i redirect to Login.html page   

-- 
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/6ee7553c-7028-4755-84e1-c77c66deab27%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Hi all

2019-03-05 Thread Gil Obradors
With httpresoponseredirect!
https://docs.djangoproject.com/en/2.1/ref/request-response/#httpresponse-subclasses


Missatge de l'adreça  del dia dt., 5 de març 2019
a les 19:31:

> how can i redirect to Login.html page
>
> --
> 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/6ee7553c-7028-4755-84e1-c77c66deab27%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-JoTTdMDMtW-XZGWDGPUfH1xzrVjL8RbhndDO%2BowkQRhEFEw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[no subject]

2019-03-05 Thread Harryxon Ndegwa
Hae everyone

Can anyone recommend a django resource to build an online payment site like
paypal.
Thankyou

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


Re: Hi all

2019-03-05 Thread Sai Vinay Nelluri
Did you assigned an url for that view?
Try doing so and run server and go to the assigned url.

On Wed, 6 Mar 2019, 00:02 ,  wrote:

> how can i redirect to Login.html page
>
> --
> 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/6ee7553c-7028-4755-84e1-c77c66deab27%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/CAHc-LaO35xtENv1H%2BTEPrxdL6NoZqtvTsKvivParkYSjnK9_ww%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django 1.11: AttributeError: 'module' object has no attribute 'setup_environ'

2019-03-05 Thread Chi Shiek
Also failing in local dev_appserver. It seemed to work for a very short 
time (couple of queries) and then it stopped with the same error. 
Gave up and reverting back to 1.4 (which is what app engine seems to 
recommend - 1.4 or 1.11).

On Friday, 1 March 2019 08:29:42 UTC+11, Chi Shiek wrote:
>
> Didn't work in production...same error...suggestions welcome
>
> On Friday, 1 March 2019 06:41:55 UTC+11, Chi Shiek wrote:
>>
>> This is related to a bug I raised against app engine while tying to 
>> migrate from django 1.5 to 1.11.
>>
>> The issue is I have an app running on app engine using django 1.5.
>> Recently I was making a number of major updates to the app and decided to 
>> convert to django 1.11 as part of that update.
>>
>> Everything seemed to work fine on my local dev_appserver, but when I 
>> deployed it to app engine, it threw an error similar to this...
>>
>> ERROR2019-02-28 19:01:49,710 wsgi.py:263]
>> Traceback (most recent call last):
>>   File 
>> "/home/cshiek/Programs/google-cloud-sdk-1.9.83/platform/google_appengine/google/appengine/runtime/wsgi.py",
>>  
>> line 240, in Handle
>> handler = _config_handle.add_wsgi_middleware(self._LoadHandler())
>>   File 
>> "/home/cshiek/Programs/google-cloud-sdk-1.9.83/platform/google_appengine/google/appengine/runtime/wsgi.py",
>>  
>> line 299, in _LoadHandler
>> handler, path, err = LoadObject(self._handler)
>>   File 
>> "/home/cshiek/Programs/google-cloud-sdk-1.9.83/platform/google_appengine/google/appengine/runtime/wsgi.py",
>>  
>> line 96, in LoadObject
>> __import__(cumulative_path)
>> INFO 2019-02-28 19:01:49,720 module.py:861] default: "GET 
>> /Common?action=%5B%22logout%22%5D HTTP/1.1" 500 -
>>   File 
>> "/home/cshiek/Programs/google-cloud-sdk-1.9.83/platform/google_appengine/google/appengine/ext/django/main.py",
>>  
>> line 82, in 
>> management.setup_environ(settings, 
>> original_settings_path=settings_path)
>> AttributeError: 'module' object has no attribute 'setup_environ'
>>
>>
>> I downloaded the app back to my local development server and built a 
>> clean python environment using only the exact modules I needed - and then I 
>> saw the same setup_environ error.
>> The module indicated has the following code which is throwing the error.
>>
>> try:
>>   settings = __import__(settings_path)
>>   management.setup_environ(settings, original_settings_path=settings_path)
>> except ImportError:
>> pass
>>
>> I changed the code to 
>> try:
>>   settings = __import__(settings_path)
>>   management.setup_environ(settings, original_settings_path=settings_path)
>> except AttributeError:
>>   django.setup()
>> except ImportError:
>> pass
>>
>> And everything works fine.
>> My problem is that the changed module appears to be inside the 
>> google-cloud-sdk and therefore I cannot change it in production.
>>
>> My app.yaml point to django 1.11
>>
>> I've searched the net and no one seems to have encountered this problem 
>> before...there is a lot about setup_environ, but nothing that addresses 
>> this particular issue.
>>
>> I even raised a ticket against app engine (
>> https://issuetracker.google.com/issues/124539522) but received a reply 
>> that it was a django problem.
>>
>> Question is - has anyone else come across this problem in the app engine 
>> environment - and how did you resolve it?
>>
>> Thanks!
>> /Chi
>>
>>
>>
>>
>>
>>
>>
>>

-- 
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/80cd55a9-4b28-4600-9671-af909a339df8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Hi all

2019-03-05 Thread Lakshmi Reddy
thanq

On Wed, 6 Mar 2019 at 07:37, Sai Vinay Nelluri 
wrote:

> Did you assigned an url for that view?
> Try doing so and run server and go to the assigned url.
>
> On Wed, 6 Mar 2019, 00:02 ,  wrote:
>
>> how can i redirect to Login.html page
>>
>> --
>> 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/6ee7553c-7028-4755-84e1-c77c66deab27%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/CAHc-LaO35xtENv1H%2BTEPrxdL6NoZqtvTsKvivParkYSjnK9_ww%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/CAGLPFRyNHJzqGYuoUwKJyeeewSwJq8H_et171mGxfHYdXPrNeg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Hiii all,

2019-03-05 Thread lakshmyyreddy
*By default SQLite file was creating I don't want to use that and how can I 
connect with MYSQL database*

-- 
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/95d2d903-77d7-49c7-b8c3-539068bd1393%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Providing help on a website (basic CMS for on-site site documentation)

2019-03-05 Thread Derek



Bernd 

Data-driven sites, such as the ones that Django is very good at developing 
may have one or two "about" type pages but they do not typically do have "a 
pile" of other flat pages.  Such websites are usually not developed in 
Django but rather in a CMS-type application.

Unfortunately, you seem to be in some less-common "middle ground" where you 
need both a pile of flat pages and a pile of dynamic pages a chance for 
creativity on your part!

On Monday, 4 March 2019 12:08:36 UTC+2, Bernd Wechner wrote:
>
> Derek, 
>
> Empirically by evidence of the lack of material on-line or obvious 
> solutions, you may be right. But I respectfully disagree. Almost every 
> website has an About Us page for example and a pile of other simple flat 
> pages. 
>
> And Django supports flatpages natively, just not with a well documented 
> easy way to edit them easily!
>
> Regards,
>
> Bernd.
>
> On Monday, 4 March 2019 17:40:35 UTC+11, Derek wrote:
>>
>> "Surely it's a ubiquitous need"
>>
>> No, I think not. In the dim and distant past I used to write copious help 
>> files for various Windows apps ... but on the web?  No one really reads 
>> manuals or help files any more - your app needs to be simple and obvious to 
>> use.  
>>
>> If you are that noble as to still want to write a manual, I'd suggest 
>> using any number of really good off-line tools and make the manual 
>> downloadable as a PDF - most of those tools will also generate a series of 
>> static webpages which you can host quite easily.   Suggestion: ReadTheDocs 
>> uses Sphinx to generate docs for Python libraries; but there is no reason 
>> you could not also use that to write end-user documentation.
>>
>> HTH.
>>
>> On Friday, 22 February 2019 12:02:27 UTC+2, ukeplayer01 wrote:
>>>
>>> Sorry to go off topic but I can recommend HuGo for simple markdown web 
>>> pages.
>>> Cheers
>>> Roger
>>> On 22/2/19 5:24 pm, Bernd Wechner wrote:
>>>
>>> Hmmm, no-one has any thoughts here ... and I'm on ma' own reinventing 
>>> the wheel? Surely tehre's a canonical way to provide help on Django website 
>>> . I'm leaning toward simple flatpages app with a tinymce editor for them 
>>> for the admin.
>>>
>>> On Tuesday, 19 February 2019 16:26:57 UTC+11, Bernd Wechner wrote: 

 I'm at the point of wanting to write some help for a website, the 
 standard helpfile sort of scenario ;-). If that means little to you, just 
 a 
 hierarchy of pages that document things and can be linked. 

 I wrote page one with the Django flatpages app:

 https://docs.djangoproject.com/en/2.1/ref/contrib/flatpages/

 But it's not real comfy in terms of editing and maintaining. So I 
 looked on-line for solutions and of course nothing with "help" in the 
 search terms is going anywhere fast (finds me a lot of help about Django 
 ;-). so better keywordss needed but I have found a pile of maybe options 
 and am suddenly bamboozled by what is vogue, current, maintained, has a 
 lasting future etc.

 https://github.com/klen/django_markdown

 Untouched in 4 years with 22 open issues Hmm.

 And this looks nice:

 https://github.com/mjr27/django-flatpages-tinymce

 but untouched in 7 years and 4 open issues. 

 Now untouched doesn't mean bad, could just be mature, stable and works 
 perfectly, already fro 7 years. These are the things it's hard to gauge. 
 But if I'm looking at TinyMCE how about:

 https://github.com/aljosa/django-tinymce

 on which it depends. NO bad, updated a month ago to make it work with 
 Django 2.1 so seems alive! But my site is math heavy so I want equation 
 ease so how about:

 And this looks good:

 https://www.codecogs.com/latex/integration/tinymce_v3/install.php

 This looks maybe:

 https://github.com/iCAPLyon1/tinymce-formula

 This looks unconvincing:

 https://github.com/foraker/tinymce_equation_editor

 and do we want this:

 https://github.com/Tivix/django-flatpages-nav

 or this as well:

 Or hang on why do this piecemeal why not use Wagtail from the word go:

 http://docs.wagtail.io/en/v2.4/index.html

 Or would wagtail introduce too much coordination trouble between its 
 templates and my sites ... etc. etc. I'm full of questions and really just 
 wondering, is there a canonical solution to a site documentation page 
 hierarchy and managing it nicely?

 Regards,

 Bernd.


 -- 
>>> 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 https://groups.google.com/group/django-users.
>>> To view this discussion on the web

Re: Hiii all,

2019-03-05 Thread Omar Abou Mrad
Did you go through the official documentation?

https://docs.djangoproject.com/en/2.1/ref/databases/#connecting-to-the-database

On Wed, Mar 6, 2019 at 8:12 AM  wrote:

> *By default SQLite file was creating I don't want to use that and how can
> I connect with MYSQL database*
>
> --
> 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/95d2d903-77d7-49c7-b8c3-539068bd1393%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/CAFwtXp2AxnqtVdDYhfeiYbvJd_o0e4UkoCu7MA_d%2BOH0Z8S28A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.